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 21, 2025
1 parent 46610da commit 2a69c4c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
19 changes: 19 additions & 0 deletions contrib/githwxi/BOOTJS1/Makefile_xjsemit
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ dynexp0_sats: \
$(SRCGEN2)/SATS/dynexp0.sats; \
$(NODE) --stack-size=4096 $(XATSOPT_TCHECK00) $<
########################################################################
boot_sats:: \
parsing_sats
parsing_sats: \
$(SRCGEN2)/SATS/parsing.sats; \
$(NODE) --stack-size=4096 $(XATSOPT_TCHECK00) $<
########################################################################
########################################################################
boot_dats:: \
xbasics_dats
Expand Down Expand Up @@ -300,6 +306,17 @@ dynexp0_print0_dats: \
$(SRCGEN2)/DATS/dynexp0_print0.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
boot_dats:: \
parsing_dats
parsing_dats: \
$(SRCGEN2)/DATS/parsing.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
boot_dats:: \
parsing_basics_dats
parsing_basics_dats: \
$(SRCGEN2)/DATS/parsing_basics.dats; \
$(NODE) --stack-size=4096 $(XATS2JS_JSEMIT00) $< > BUILD/$@_out.js
########################################################################
########################################################################
clean:: ; rm -f *~
cleanall:: ; rm -f *~
Expand Down Expand Up @@ -341,6 +358,8 @@ cleanall:: ; rm -f BUILD/staexp0_dats_out.js
cleanall:: ; rm -f BUILD/staexp0_print0_dats_out.js
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
########################################################################
########################################################################
SRCGEN2_XSHARED=$(SRCGEN2)/xats2js/srcgenx/xshared/runtime
Expand Down
31 changes: 24 additions & 7 deletions srcgen2/DATS/parsing_basics.dats
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
** 02110-1301, USA.
*)

(* ****** ****** *)
(* ****** ****** *)
//
(*
Expand All @@ -34,21 +35,31 @@ Authoremail: gmhwxiATgmailDOTcom
*)
//
(* ****** ****** *)
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
(* ****** ****** *)
#include
"./../HATS/xatsopt_sats.hats"
#include
"./../HATS/xatsopt_dats.hats"
(* ****** ****** *)
#define
ATS_PACKNAME
"ATS3.XANADU.xatsopt-20220500"
(* ****** ****** *)
#staload "./../SATS/lexing0.sats"
(* ****** ****** *)
#staload "./../SATS/parsing.sats"
(* ****** ****** *)
(* ****** ****** *)
#symload getk0 with tokbuf_getk0
#symload getk1 with tokbuf_getk1
#symload skip1 with tokbuf_skip1
(* ****** ****** *)
(* ****** ****** *)
#symload node with token_get_node
(* ****** ****** *)
(* ****** ****** *)

#implfun
t0_t0int(tnd) =
Expand Down Expand Up @@ -276,8 +287,11 @@ case+ tnd of
#implfun
p1_EQ0(buf, err) =
let
//
val e00 = err
val tok = buf.getk0()
val tok =
tokbuf_getk0(buf)
//
in//let
case+
tok.node() of
Expand All @@ -286,7 +300,8 @@ T_EQ0() =>
let val () = buf.skip1() in tok end
|
_(* non-EQ0 *) =>
let val () = (err := e00 + 1) in tok end
let
val () = (err := e00 + 1) in tok end
end (*let*)//end-of-[p1_EQ0(buf,err)]

#implfun
Expand Down Expand Up @@ -321,7 +336,8 @@ T_GT0() =>
let val () = buf.skip1() in tok end
|
_(* non-GT0 *) =>
let val () = (err := e00 + 1) in tok end
let
val () = (err := e00 + 1) in tok end
end (*let*)//end-of-[p1_GT0(buf,err)]

(* ****** ****** *)
Expand All @@ -339,7 +355,8 @@ T_BAR() =>
let val () = buf.skip1() in tok end
|
_(* non-BAR *) =>
let val () = (err := e00 + 1) in tok end
let
val () = (err := e00 + 1) in tok end
end (*let*) // end of [p1_BAR(buf,err)]
//
#implfun
Expand Down

0 comments on commit 2a69c4c

Please sign in to comment.