comparison src/lacweb.grm @ 67:9f89f0b00b84

Elaborating cfold
author Adam Chlipala <adamc@hcoop.net>
date Thu, 26 Jun 2008 09:48:54 -0400
parents 48b6d2c3df46
children 6431b315a1e3
comparison
equal deleted inserted replaced
66:1ec5703c09c4 67:9f89f0b00b84
38 EOF 38 EOF
39 | STRING of string | INT of Int64.int | FLOAT of Real64.real 39 | STRING of string | INT of Int64.int | FLOAT of Real64.real
40 | SYMBOL of string | CSYMBOL of string 40 | SYMBOL of string | CSYMBOL of string
41 | LPAREN | RPAREN | LBRACK | RBRACK | LBRACE | RBRACE 41 | LPAREN | RPAREN | LBRACK | RBRACK | LBRACE | RBRACE
42 | EQ | COMMA | COLON | DCOLON | TCOLON | DOT | HASH | UNDER | UNDERUNDER 42 | EQ | COMMA | COLON | DCOLON | TCOLON | DOT | HASH | UNDER | UNDERUNDER
43 | CON | LTYPE | VAL 43 | CON | LTYPE | VAL | FOLD
44 | TYPE | NAME 44 | TYPE | NAME
45 | ARROW | LARROW | DARROW 45 | ARROW | LARROW | DARROW
46 | FN | PLUSPLUS | DOLLAR 46 | FN | PLUSPLUS | DOLLAR
47 | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | EXTERN | INCLUDE | OPEN 47 | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | EXTERN | INCLUDE | OPEN
48 48
188 | cexp ARROW cexp (TFun (cexp1, cexp2), s (cexp1left, cexp2right)) 188 | cexp ARROW cexp (TFun (cexp1, cexp2), s (cexp1left, cexp2right))
189 | SYMBOL kcolon kind ARROW cexp (TCFun (kcolon, SYMBOL, kind, cexp), s (SYMBOLleft, cexpright)) 189 | SYMBOL kcolon kind ARROW cexp (TCFun (kcolon, SYMBOL, kind, cexp), s (SYMBOLleft, cexpright))
190 190
191 | cexp PLUSPLUS cexp (CConcat (cexp1, cexp2), s (cexp1left, cexp1right)) 191 | cexp PLUSPLUS cexp (CConcat (cexp1, cexp2), s (cexp1left, cexp1right))
192 192
193 | FN SYMBOL DCOLON kind DARROW cexp (CAbs (SYMBOL, kind, cexp), s (FNleft, cexpright)) 193 | FN SYMBOL DARROW cexp (CAbs (SYMBOL, NONE, cexp), s (FNleft, cexpright))
194 | FN SYMBOL DCOLON kind DARROW cexp (CAbs (SYMBOL, SOME kind, cexp), s (FNleft, cexpright))
194 195
195 | LPAREN cexp RPAREN DCOLON kind (CAnnot (cexp, kind), s (LPARENleft, kindright)) 196 | LPAREN cexp RPAREN DCOLON kind (CAnnot (cexp, kind), s (LPARENleft, kindright))
196 197
197 | UNDER DCOLON kind (CWild kind, s (UNDERleft, UNDERright)) 198 | UNDER DCOLON kind (CWild kind, s (UNDERleft, UNDERright))
198 199
212 | DOLLAR cterm (TRecord cterm, s (DOLLARleft, ctermright)) 213 | DOLLAR cterm (TRecord cterm, s (DOLLARleft, ctermright))
213 | HASH CSYMBOL (CName CSYMBOL, s (HASHleft, CSYMBOLright)) 214 | HASH CSYMBOL (CName CSYMBOL, s (HASHleft, CSYMBOLright))
214 215
215 | path (CVar path, s (pathleft, pathright)) 216 | path (CVar path, s (pathleft, pathright))
216 | UNDER (CWild (KWild, s (UNDERleft, UNDERright)), s (UNDERleft, UNDERright)) 217 | UNDER (CWild (KWild, s (UNDERleft, UNDERright)), s (UNDERleft, UNDERright))
218 | FOLD (CFold, s (FOLDleft, FOLDright))
217 219
218 rcon : ([]) 220 rcon : ([])
219 | ident EQ cexp ([(ident, cexp)]) 221 | ident EQ cexp ([(ident, cexp)])
220 | ident EQ cexp COMMA rcon ((ident, cexp) :: rcon) 222 | ident EQ cexp COMMA rcon ((ident, cexp) :: rcon)
221 223