Skip to content

Commit

Permalink
Updating: very very minorly
Browse files Browse the repository at this point in the history
  • Loading branch information
githwxi committed Jan 22, 2025
1 parent c397ff1 commit cfa89c6
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 70 deletions.
6 changes: 6 additions & 0 deletions contrib/githwxi/BOOTJS1/Makefile_xjsemit
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ parsing_basics_dats
parsing_basics_dats: \
$(SRCGEN2)/DATS/parsing_basics.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
parsing_tokbuf_dats
parsing_tokbuf_dats: \
$(SRCGEN2)/DATS/parsing_tokbuf.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
########################################################################
clean:: ; rm -f *~
Expand Down Expand Up @@ -360,6 +365,7 @@ cleanall:: ; rm -f BUILD/dynexp0_dats_out.js
cleanall:: ; rm -f BUILD/dynexp0_print0_dats_out.js
cleanall:: ; rm -f BUILD/parsing_dats_out.js
cleanall:: ; rm -f BUILD/parsing_basics_dats_out.js
cleanall:: ; rm -f BUILD/parsing_tokbuf_dats_out.js
########################################################################
########################################################################
SRCGEN2_XSHARED=$(SRCGEN2)/xats2js/srcgenx/xshared/runtime
Expand Down
16 changes: 7 additions & 9 deletions srcgen1/prelude/DATS/VT/arrn000_vt.dats
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
HX: for pure C-arrays
*)
(* ****** ****** *)
(*
#staload
"./..\
/SATS/arrn000.sats"
#staload
"./..\
/SATS/VT/arrn000_vt.sats"
*)
(* ****** ****** *)
//
#staload UN =
"srcgen1\
/prelude/SATS/unsafex.sats"
//
(* ****** ****** *)
(*
#staload
"./../../SATS/arrn000.sats"
#staload
"./../../SATS/VT/arrn000_vt.sats"
*)
(* ****** ****** *)
//
(*
**HX: 0-dimensional
Expand Down
20 changes: 9 additions & 11 deletions srcgen1/prelude/DATS/VT/arrn001_vt.dats
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,32 @@ HX: for arrays with size
Wed Dec 20 23:11:33 EST 2023
*)
(* ****** ****** *)
(*
#staload
"./..\
/SATS/arrn000.sats"
#staload
"./..\
/SATS/VT/arrn000_vt.sats"
*)
(* ****** ****** *)
//
#staload UN =
"srcgen1\
/prelude/SATS/unsafex.sats"
//
(* ****** ****** *)
(*
#staload
"./../../SATS/arrn000.sats"
#staload
"./../../SATS/VT/arrn000_vt.sats"
*)
(* ****** ****** *)
//
local
//
datavwtp
a1psz_dt //
a1psz_ //
(a:vwtp,int(*sz*)) =
{n:int}
A1PSZ of
(a1ptr(a, n), sint(n))
//
#absimpl
a1psz_vt_i0_x0
( a:vt, n:i0 ) = a1psz_dt(a, n)
( a:vt, n:i0 ) = a1psz_(a, n)
//
(* ****** ****** *)
in(*local*)
Expand Down
6 changes: 6 additions & 0 deletions srcgen2/DATS/fperr30_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,15 @@ prints("D3Eannot(", "...", ")")
//
|D3Et2pck
(d3e1, t2p2) =>
let
val
t2p1 = d3e1.styp()
in//let
( print("D3Et2pck(")
; auxdexp(out, d3e1)
; print(";"); print(t2p1)
; print(";"); prints(t2p2, ")"))
end//let//end-of-[D3Et2pck(...)]
//
(* ****** ****** *)
//
Expand Down
11 changes: 7 additions & 4 deletions srcgen2/DATS/parsing_tokbuf.dats
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
//
#include
"./../HATS/xatsopt_sats.hats"
#include
"./../HATS/xatsopt_dats.hats"
//
(* ****** ****** *)
(* ****** ****** *)
#staload "./../SATS/parsing.sats"
Expand All @@ -54,7 +56,7 @@ ATS_PACKNAME
local
//
datavwtp
tkbf0 =
tkbf0_ =
|
{n:pos}
{i:nat}
Expand All @@ -64,7 +66,7 @@ TKBF0 of
, sint(i) (*idx*) )
//
#absimpl tmark_type = sint
#absimpl tkbf0_vtbx = tkbf0
#absimpl tkbf0_vtbx = tkbf0_
//
(* ****** ****** *)

Expand All @@ -79,8 +81,9 @@ case+ buf of
| ~
TKBF0
( A0
, n0
, i0) => a1ptr_free(A0, n0)
, n0, i0) =>
(
a1ptr_free<token>(A0, n0))
) (*case*)//end-of(tokbuf_free)
//
(* ****** ****** *)
Expand Down
2 changes: 2 additions & 0 deletions srcgen2/HATS/xatsopt_sats.hats
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ For ATS3/XATSOPT
/prelude/SATS/VT/strm001_vt.sats"
//
(* ****** ****** *)
//
#staload
"srcgen1\
/prelude/SATS/VT/arrn000_vt.sats"
#staload
"srcgen1\
/prelude/SATS/VT/arrn001_vt.sats"
//
(* ****** ****** *)
(* ****** ****** *)
//
Expand Down
14 changes: 10 additions & 4 deletions srcgen2/SATS/dynexp0.sats
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,28 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
(* ****** ****** *)
//
#staload
LAB = "./xlabel0.sats"
#staload
LOC = "./locinfo.sats"
//
#typedef lab_t = $LAB.lab_t
#typedef label = $LAB.label
//
(* ****** ****** *)
//
#staload
LOC = "./locinfo.sats"
//
#typedef loc_t = $LOC.loc_t
#typedef loctn = $LOC.loctn
#typedef lcsrc = $LOC.lcsrc
Expand Down
18 changes: 14 additions & 4 deletions srcgen2/SATS/filpath.sats
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
#staload "./../SATS/xsymbol.sats"
(* ****** ****** *)
//
#staload
SYM = "./xsymbol.sats"
#typedef sym_t = $SYM.sym_t
//
(* ****** ****** *)
(* ****** ****** *)
//
#include
"./../HATS/xatsopt_sats.hats"
//
(* ****** ****** *)
(* ****** ****** *)
//
fun theDirSep_get(): char
Expand Down Expand Up @@ -124,7 +134,7 @@ fpath_get_fnm1
#symload fnm1 with fpath_get_fnm1
fun
fpath_get_fnm2
(fpx: fpath): symbl // fnorm
(fpx: fpath): sym_t // fnorm
#symload fnm2 with fpath_get_fnm2
(* ****** ****** *)
//
Expand Down
5 changes: 2 additions & 3 deletions srcgen2/SATS/parsing.sats
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
** 02110-1301, USA.
*)

(* ****** ****** *)
(* ****** ****** *)
//
(*
Expand All @@ -34,14 +35,12 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
#include
"./..\
/HATS/xatsopt_sats.hats"
(* ****** ****** *)
#define
ATS_PACKNAME // namespace
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
//
#staload
LEX = "./lexing0.sats"
Expand Down
9 changes: 5 additions & 4 deletions srcgen2/SATS/xatsmtp.sats
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ of meta-programming in ATS3
*)
(* ****** ****** *)
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
#staload "./staexp2.sats"
#staload "./dynexp2.sats"
(* ****** ****** *)
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
#staload "./../SATS/staexp2.sats"
#staload "./../SATS/dynexp2.sats"
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
(* ****** ****** *)
//
Expand Down
32 changes: 18 additions & 14 deletions srcgen2/SATS/xatsopt.sats
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,34 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
#staload
S0E = "./../SATS/staexp0.sats"
S0E = "./staexp0.sats"
#staload
S1E = "./../SATS/staexp1.sats"
S1E = "./staexp1.sats"
#staload
S2E = "./../SATS/staexp2.sats"
S2E = "./staexp2.sats"
#staload
T2P = "./../SATS/statyp2.sats"
T2P = "./statyp2.sats"
(* ****** ****** *)
#staload
D0E = "./../SATS/dynexp0.sats"
D0E = "./dynexp0.sats"
#staload
D1E = "./../SATS/dynexp1.sats"
D1E = "./dynexp1.sats"
#staload
D2E = "./../SATS/dynexp2.sats"
D2E = "./dynexp2.sats"
#staload
D3E = "./../SATS/dynexp3.sats"
D3E = "./dynexp3.sats"
(* ****** ****** *)
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
//
#absvwtp
Expand Down
5 changes: 5 additions & 0 deletions srcgen2/SATS/xbasics.sats
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,24 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
(* ****** ****** *)
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
//
(*
#typedef int0 = sint
#typedef btf0 = bool
#typedef chr0 = char
#typedef str0 = strn
*)
//
(* ****** ****** *)
#symload & with land of 0
#symload << with lsln of 0
Expand Down
Loading

0 comments on commit cfa89c6

Please sign in to comment.