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 Sep 10, 2024
1 parent 3ee9896 commit 75cebc9
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 101 deletions.
48 changes: 30 additions & 18 deletions srcgen2/DATS/fperr20_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ ATS_PACKNAME
#staload "./../SATS/staexp2.sats"
#staload "./../SATS/dynexp2.sats"
(* ****** ****** *)
#staload "./../SATS/tread01.sats"
#staload "./../SATS/tread12.sats"
(* ****** ****** *)
#staload "./../SATS/fperr20.sats"
(* ****** ****** *)
(* ****** ****** *)
#define FPERR20_ERRVL 2
(* ****** ****** *)
#symload lctn with token_get_lctn
Expand All @@ -73,13 +77,13 @@ local
fun
auxmain
( out: FILR
, dcl: d2ecl): void =
, dcl0: d2ecl): void =
let
#impltmp
g_print$out<>() = out
in//let
case+
dcl.node() of
dcl0.node() of
//
|
D2Cstatic
Expand Down Expand Up @@ -193,26 +197,33 @@ val () = fperr20_s2cstlst(s2cs)
*)
endlet // end of [ D2Cdatatype(...) ]
//
| D2Cnone0() => ( (*void*) )
| D2Cnone1(d1cl) => ( (*void*) )
| D2Cnone2(d2cl) => ( (*void*) )
|
D2Cerrck(_,_) => fperr20_d2ecl(out, dcl)
(* ****** ****** *)
//
|D2Cnone0 _ => ( (*void*) )
|D2Cnone1
( d1cl ) => d1ecl_fpemsg(out, d1cl)
|D2Cnone2
( d2cl ) => fperr20_d2ecl(out, d2cl)
//
|D2Cerrck
(lvl1,dcl1) => fperr20_d2ecl(out, dcl0)
//
(* ****** ****** *)
//
|
_(*otherwise*) =>
let
//
val
loc = dcl.lctn()
val () = prerrsln
("fperr20_d2ecl: auxmain: loc = ", loc)
val () = prerrsln
("fperr20_d2ecl: auxmain: dcl = ", dcl)
//
val
loc0 = dcl0.lctn()
val () = prerrsln
("fperr20_d2ecl: auxmain: loc0 = ", loc0)
val () = prerrsln
("fperr20_d2ecl: auxmain: dcl0 = ", dcl0)
endlet
//
end (*let*) // end-of-[ auxmain(out, dcl) ]
(* ****** ****** *)
//
end (*let*) // end-of-[ auxmain(out, dcl0) ]

(* ****** ****** *)
in(* in-of-local *)
Expand Down Expand Up @@ -255,8 +266,9 @@ if
>FPERR20_ERRVL) then () else
let
val loc0 = dcl0.lctn() in
printsln
("FPERR20-ERROR:",loc0,":",dcl0)
printsln();
printsln("\
FPERR20-ERROR:", loc0, ":", dcl0)
end
)
//
Expand Down
15 changes: 7 additions & 8 deletions srcgen2/DATS/fperr20_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,8 @@ then ((*void*)) else
let
val loc0 = d2p0.lctn()
in//let
(*
prerrsln
("FPERR20-ERROR:",loc0,":",d2p0)
*)
printsln("\
FPERR20-ERROR:", loc0, ":", d2p0)
end//let
)
| _(* otherwise *) => ( (* skipped *) )
Expand Down Expand Up @@ -519,10 +517,11 @@ if
then ((*void*)) else
let
val
loc0 = d2e0.lctn() in // let
printsln
("FPERR20-ERROR:",loc0,":",d2e0)
end // let // else // end-of-[if]
loc0 = d2e0.lctn()
in//let
printsln("\
FPERR20-ERROR:", loc0, ":", d2e0)
end//let
//
) (* end-of-[D2Eerrck(lvl, d2e1)] *)
| // non-D2Eerrck // ... // ... // ...
Expand Down
48 changes: 30 additions & 18 deletions srcgen2/DATS/fperr30_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ATS_PACKNAME
#staload "./../SATS/dynexp2.sats"
#staload "./../SATS/dynexp3.sats"
(* ****** ****** *)
#staload "./../SATS/fperr20.sats"
#staload "./../SATS/fperr30.sats"
(* ****** ****** *)
#define FPERR30_ERRVL 2
Expand All @@ -74,7 +75,7 @@ local
fun
auxmain
( out: FILR
, dcl: d3ecl): void =
, dcl0: d3ecl): void =
let
//
#impltmp
Expand All @@ -83,7 +84,7 @@ g_print$out<>() = out
in//let
//
case+
dcl.node() of
dcl0.node() of
//
|D3Cstatic
(tknd, dcl1) =>
Expand Down Expand Up @@ -189,26 +190,34 @@ val () = fperr30_d3exp(out, dexp)
//
endlet//end of [ D3Cimplmnt0(...) ]
//
(* ****** ****** *)
//
|D3Cnone0 _ => ( (*void*) )
|D3Cnone1 _ => () | D3Cnone2 _ => ()
|D3Cnone1
( d2cl ) => fperr20_d2ecl(out, d2cl)
|D3Cnone2
( d3cl ) => fperr30_d3ecl(out, d3cl)
//
|
D3Cerrck(_,_) => fperr30_d3ecl(out, dcl)
|D3Cerrck
(lvl1,dcl1) => fperr30_d3ecl(out, dcl0)
//
(* ****** ****** *)
//
|
_(*otherwise*) =>
let
val
loc0 = dcl0.lctn()
//
val
loc = dcl.lctn()
val () = prerrsln
("fperr30_d3ecl: auxmain: loc = ", loc)
val () = prerrsln
("fperr30_d3ecl: auxmain: dcl = ", dcl)
val () = prerrsln
("fperr30_d3ecl: auxmain: loc0 = ", loc0)
val () = prerrsln
("fperr30_d3ecl: auxmain: dcl0 = ", dcl0)
endlet
//
end (*let*) // end-of-[ (* otherwise *) ]
(* ****** ****** *)
//
end (*let*) // end-of-[ auxmain(out, dcl) ]
end (*let*) // end-of-[ auxmain(out, dcl0) ]

(* ****** ****** *)
in(* in-of-local *)
Expand All @@ -228,7 +237,7 @@ val loc0 = dcl0.lctn()
in//let
(*
prerrsln
("fperr30_d3pat: loc0 = ", loc0)
("fperr30_d3ecl: loc0 = ", loc0)
*)
end//let
(*
Expand All @@ -245,14 +254,17 @@ dcl0.node() of
|
D3Cerrck(lvl, d3cl) =>
(
auxmain( out, d3cl );
(
auxmain(out, d3cl));
if
(lvl
>FPERR30_ERRVL) then () else
>FPERR30_ERRVL)
then ((*void*)) else
let
val loc0 = dcl0.lctn() in
printsln
("FPERR30-ERROR:",loc0,":",dcl0)
printsln();
printsln("\
FPERR30-ERROR:", loc0, ":", dcl0)
end
)
//
Expand Down
50 changes: 32 additions & 18 deletions srcgen2/DATS/fperr30_dynexp.dats
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,11 @@ if
>FPERR30_ERRVL)
then ((*void*)) else
let
val loc0 = d3p0.lctn((*0*))
val
loc0 = d3p0.lctn((*0*))
in//let
(*
prerrsln
("FPERR30-ERROR:",loc0,":",d3p0)
*)
printsln("\
FPERR30-ERROR:", loc0, ":", d3p0)
end//let
)
| _(* otherwise *) => ( (* skipped *) )
Expand Down Expand Up @@ -314,6 +313,22 @@ end(*let*)//end-of-[D3Eassgn]
//
(* ****** ****** *)
//
|
D3Et2pck
( d3e1, t2p2) =>
let
val () =
(
fperr30_d3exp(out, d3e1) )
(*
val () =
(
fperr30_s2typ(out, t2p2) )
*)
end(*let*)//end-of-[D3Et2pck]
//
(* ****** ****** *)
//
|D3Enone0 _ => ( (*void*) )
|D3Enone1 _ => () | D3Enone2 _ => ()
|
Expand All @@ -323,15 +338,15 @@ D3Eerrck(_,_) => fperr30_d3exp(out, d3e)
_(*otherwise*) =>
let
//
val loc = d3e.lctn((*void*))
val t2p = d3e.styp((*void*))
val loc = d3e.lctn((*void*))
val t2p = d3e.styp((*void*))
//
val ( ) = prerrsln
("fperr30_d3exp: auxmain: loc = ", loc)
val ( ) = prerrsln
("fperr30_d3exp: auxmain: t2p = ", t2p)
val ( ) = prerrsln
("fperr30_d3exp: auxmain: d3e = ", d3e)
val ( ) = prerrsln
("fperr30_d3exp: auxmain: loc = ", loc)
val ( ) = prerrsln
("fperr30_d3exp: auxmain: t2p = ", t2p)
val ( ) = prerrsln
("fperr30_d3exp: auxmain: d3e = ", d3e)
//
endlet
//
Expand Down Expand Up @@ -375,12 +390,11 @@ if
>FPERR30_ERRVL)
then ((*void*)) else
let
val loc0 = d3e0.lctn((*0*))
val
loc0 = d3e0.lctn()
in//let
(*
prerrsln
("FPERR30-ERROR:",loc0,":",d3e0)
*)
printsln("\
FPERR30-ERROR:", loc0, ":", d3e0)
end//let
)
| _(* otherwise *) => ( (* skipped *) )
Expand Down
18 changes: 9 additions & 9 deletions srcgen2/DATS/fperr40_decl00.dats
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ local
fun
auxmain
( out: FILR
, dcl: d4ecl): void =
, dcl0: d4ecl): void =
let
//
#impltmp
Expand All @@ -83,23 +83,23 @@ g_print$out<>() = out
in//let
//
case+
dcl.node() of
dcl0.node() of
//
|
_(*otherwise*) =>
let
//
(*
val loc = dcl.lctn()
val ( ) = prerrsln("\
fperr40_d4ecl: auxmain(40): loc = ", loc)
val ( ) = prerrsln("\
fperr40_d4ecl: auxmain(40): dcl = ", dcl)
val loc = dcl0.lctn()
val ( ) = prerrsln
("fperr40_d4ecl: auxmain: loc0 = ", loc0)
val ( ) = prerrsln
("fperr40_d4ecl: auxmain: dcl0 = ", dcl0)
*)
//
end (*let*) // end-of-[ (* otherwise *) ]
endlet
//
end (*let*) // end-of-[ auxmain(out, dcl) ]
end (*let*) // end-of-[ auxmain(out, dcl0) ]

(* ****** ****** *)
in(* in-of-local *)
Expand Down
Loading

0 comments on commit 75cebc9

Please sign in to comment.