Mercurial > urweb
comparison src/urweb.grm @ 1732:4a03aa3251cb
Initial support for reusing elaboration results
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 29 Apr 2012 13:17:31 -0400 |
parents | f7d9dc5d57eb |
children | f9e5a8e09cdf |
comparison
equal
deleted
inserted
replaced
1731:27e731a65934 | 1732:4a03aa3251cb |
---|---|
260 | DATATYPE | OF | 260 | DATATYPE | OF |
261 | TYPE | NAME | 261 | TYPE | NAME |
262 | ARROW | LARROW | DARROW | STAR | SEMI | KARROW | DKARROW | BANG | 262 | ARROW | LARROW | DARROW | STAR | SEMI | KARROW | DKARROW | BANG |
263 | FN | PLUSPLUS | MINUSMINUS | MINUSMINUSMINUS | DOLLAR | TWIDDLE | CARET | 263 | FN | PLUSPLUS | MINUSMINUS | MINUSMINUSMINUS | DOLLAR | TWIDDLE | CARET |
264 | LET | IN | 264 | LET | IN |
265 | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | EXTERN | SQL | SELECT1 | 265 | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | SQL | SELECT1 |
266 | INCLUDE | OPEN | CONSTRAINT | CONSTRAINTS | EXPORT | TABLE | SEQUENCE | VIEW | 266 | INCLUDE | OPEN | CONSTRAINT | CONSTRAINTS | EXPORT | TABLE | SEQUENCE | VIEW |
267 | COOKIE | STYLE | TASK | POLICY | 267 | COOKIE | STYLE | TASK | POLICY |
268 | CASE | IF | THEN | ELSE | ANDALSO | ORELSE | 268 | CASE | IF | THEN | ELSE | ANDALSO | ORELSE |
269 | 269 |
270 | XML_BEGIN of string | XML_END | XML_BEGIN_END of string | 270 | XML_BEGIN of string | XML_END | XML_BEGIN_END of string |
491 | VAL vali ([(DVal vali, s (VALleft, valiright))]) | 491 | VAL vali ([(DVal vali, s (VALleft, valiright))]) |
492 | VAL REC valis ([(DValRec valis, s (VALleft, valisright))]) | 492 | VAL REC valis ([(DValRec valis, s (VALleft, valisright))]) |
493 | FUN valis ([(DValRec valis, s (FUNleft, valisright))]) | 493 | FUN valis ([(DValRec valis, s (FUNleft, valisright))]) |
494 | 494 |
495 | SIGNATURE CSYMBOL EQ sgn ([(DSgn (CSYMBOL, sgn), s (SIGNATUREleft, sgnright))]) | 495 | SIGNATURE CSYMBOL EQ sgn ([(DSgn (CSYMBOL, sgn), s (SIGNATUREleft, sgnright))]) |
496 | STRUCTURE CSYMBOL EQ str ([(DStr (CSYMBOL, NONE, str), s (STRUCTUREleft, strright))]) | 496 | STRUCTURE CSYMBOL EQ str ([(DStr (CSYMBOL, NONE, NONE, str), s (STRUCTUREleft, strright))]) |
497 | STRUCTURE CSYMBOL COLON sgn EQ str ([(DStr (CSYMBOL, SOME sgn, str), s (STRUCTUREleft, strright))]) | 497 | STRUCTURE CSYMBOL COLON sgn EQ str ([(DStr (CSYMBOL, SOME sgn, NONE, str), s (STRUCTUREleft, strright))]) |
498 | FUNCTOR CSYMBOL LPAREN CSYMBOL COLON sgn RPAREN EQ str | 498 | FUNCTOR CSYMBOL LPAREN CSYMBOL COLON sgn RPAREN EQ str |
499 ([(DStr (CSYMBOL1, NONE, | 499 ([(DStr (CSYMBOL1, NONE, NONE, |
500 (StrFun (CSYMBOL2, sgn1, NONE, str), s (FUNCTORleft, strright))), | 500 (StrFun (CSYMBOL2, sgn1, NONE, str), s (FUNCTORleft, strright))), |
501 s (FUNCTORleft, strright))]) | 501 s (FUNCTORleft, strright))]) |
502 | FUNCTOR CSYMBOL LPAREN CSYMBOL COLON sgn RPAREN COLON sgn EQ str | 502 | FUNCTOR CSYMBOL LPAREN CSYMBOL COLON sgn RPAREN COLON sgn EQ str |
503 ([(DStr (CSYMBOL1, NONE, | 503 ([(DStr (CSYMBOL1, NONE, NONE, |
504 (StrFun (CSYMBOL2, sgn1, SOME sgn2, str), s (FUNCTORleft, strright))), | 504 (StrFun (CSYMBOL2, sgn1, SOME sgn2, str), s (FUNCTORleft, strright))), |
505 s (FUNCTORleft, strright))]) | 505 s (FUNCTORleft, strright))]) |
506 | EXTERN STRUCTURE CSYMBOL COLON sgn ([(DFfiStr (CSYMBOL, sgn), s (EXTERNleft, sgnright))]) | |
507 | OPEN mpath (case mpath of | 506 | OPEN mpath (case mpath of |
508 [] => raise Fail "Impossible mpath parse [1]" | 507 [] => raise Fail "Impossible mpath parse [1]" |
509 | m :: ms => [(DOpen (m, ms), s (OPENleft, mpathright))]) | 508 | m :: ms => [(DOpen (m, ms), s (OPENleft, mpathright))]) |
510 | OPEN mpath LPAREN str RPAREN (let | 509 | OPEN mpath LPAREN str RPAREN (let |
511 val loc = s (OPENleft, RPARENright) | 510 val loc = s (OPENleft, RPARENright) |
514 [] => raise Fail "Impossible mpath parse [4]" | 513 [] => raise Fail "Impossible mpath parse [4]" |
515 | m :: ms => | 514 | m :: ms => |
516 foldl (fn (m, str) => (StrProj (str, m), loc)) | 515 foldl (fn (m, str) => (StrProj (str, m), loc)) |
517 (StrVar m, loc) ms | 516 (StrVar m, loc) ms |
518 in | 517 in |
519 [(DStr ("anon", NONE, (StrApp (m, str), loc)), loc), | 518 [(DStr ("anon", NONE, NONE, (StrApp (m, str), loc)), loc), |
520 (DOpen ("anon", []), loc)] | 519 (DOpen ("anon", []), loc)] |
521 end) | 520 end) |
522 | OPEN CONSTRAINTS mpath (case mpath of | 521 | OPEN CONSTRAINTS mpath (case mpath of |
523 [] => raise Fail "Impossible mpath parse [3]" | 522 [] => raise Fail "Impossible mpath parse [3]" |
524 | m :: ms => [(DOpenConstraints (m, ms), s (OPENleft, mpathright))]) | 523 | m :: ms => [(DOpenConstraints (m, ms), s (OPENleft, mpathright))]) |