diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-05T16·27+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-05T16·27+0000 |
commit | fa18f1f184ba89b3dfe592e77a276da42d326f42 (patch) | |
tree | 886b09a52f176178190f24c095192fac32b11bab /src/fix-ng/fix.sdf | |
parent | e17e95a82892b31c8063f2ace1b21c79e82e6f6d (diff) |
* Assertions.
* Logical operators (!, &&, ||, ->).
Diffstat (limited to 'src/fix-ng/fix.sdf')
-rw-r--r-- | src/fix-ng/fix.sdf | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/fix-ng/fix.sdf b/src/fix-ng/fix.sdf index 9dc04d937391..0cc486e14d80 100644 --- a/src/fix-ng/fix.sdf +++ b/src/fix-ng/fix.sdf @@ -38,6 +38,8 @@ exports Id -> Formal {cons("NoDefFormal")} Id "?" Expr -> Formal {cons("DefFormal")} + "assert" Expr ";" Expr -> Expr {cons("Assert"), right} + "rec" "{" Binds "}" -> Expr {cons("Rec")} "let" "{" Binds "}" -> Expr {cons("LetRec")} "{" Binds "}" -> Expr {cons("Attrs")} @@ -55,7 +57,13 @@ exports "if" Expr "then" Expr "else" Expr -> Expr {cons("If")} - Expr "==" Expr -> Expr {cons("OpEq")} + Expr "==" Expr -> Expr {cons("OpEq"), non-assoc} + Expr "!=" Expr -> Expr {cons("OpNEq"), non-assoc} + + "!" Expr -> Expr {cons("OpNot")} + Expr "&&" Expr -> Expr {cons("OpAnd"), right} + Expr "||" Expr -> Expr {cons("OpOr"), right} + Expr "->" Expr -> Expr {cons("OpImpl"), right} Bool -> Expr {cons("Bool")} @@ -64,6 +72,13 @@ exports Expr "." Id -> Expr > Expr ExprList -> ExprList > Expr Expr -> Expr + > "!" Expr -> Expr + > Expr "==" Expr -> Expr + > Expr "!=" Expr -> Expr + > Expr "&&" Expr -> Expr + > Expr "||" Expr -> Expr + > Expr "->" Expr -> Expr + > "assert" Expr ";" Expr -> Expr > "{" {Formal ","}* "}" ":" Expr -> Expr @@ -78,6 +93,7 @@ exports "rec" -> Id {reject} "true" -> Id {reject} "false" -> Id {reject} + "assert" -> Id {reject} [0-9]+ -> Int |