comparison src/lacweb.grm @ 175:b2d752455182

Elaborating record patterns
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 13:08:57 -0400
parents 7ee424760d2f
children 3eb53c957d10
comparison
equal deleted inserted replaced
174:7ee424760d2f 175:b2d752455182
354 | LPAREN pat RPAREN (pat) 354 | LPAREN pat RPAREN (pat)
355 | LBRACE RBRACE (PRecord ([], false), s (LBRACEleft, RBRACEright)) 355 | LBRACE RBRACE (PRecord ([], false), s (LBRACEleft, RBRACEright))
356 | UNIT (PRecord ([], false), s (UNITleft, UNITright)) 356 | UNIT (PRecord ([], false), s (UNITleft, UNITright))
357 | LBRACE rpat RBRACE (PRecord rpat, s (LBRACEleft, RBRACEright)) 357 | LBRACE rpat RBRACE (PRecord rpat, s (LBRACEleft, RBRACEright))
358 358
359 rpat : STRING EQ pat ([(STRING, pat)], false) 359 rpat : CSYMBOL EQ pat ([(CSYMBOL, pat)], false)
360 | DOTDOTDOT ([], true) 360 | DOTDOTDOT ([], true)
361 | STRING EQ pat COMMA rpat ((STRING, pat) :: #1 rpat, #2 rpat) 361 | CSYMBOL EQ pat COMMA rpat ((CSYMBOL, pat) :: #1 rpat, #2 rpat)
362 362
363 rexp : ([]) 363 rexp : ([])
364 | ident EQ eexp ([(ident, eexp)]) 364 | ident EQ eexp ([(ident, eexp)])
365 | ident EQ eexp COMMA rexp ((ident, eexp) :: rexp) 365 | ident EQ eexp COMMA rexp ((ident, eexp) :: rexp)
366 366