Added support for a not-equals operator in Rain

This commit is contained in:
Neil Brown 2008-03-24 23:44:40 +00:00
parent b672900f46
commit c37e183879
2 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ $decimalDigit = [0-9]
$hexDigit = [0-9 a-f A-F]
@reserved = "[" | "]" | "(" | ")" | "{" | "}"
| ":" | "==" | "," | ";"
| ":" | "==" | "<>" | "," | ";"
| "?" | "!" | "=" | "+=" | "-=" | "*=" | "/=" | "%="
| "+" | "-" | "*" | "/" | "%"
| ">=" | "<="

View File

@ -102,6 +102,7 @@ dyadicCompOp
<|> do {m <- reserved "<=" ; return (m,A.LessEq) }
<|> do {m <- reserved ">=" ; return (m,A.MoreEq) }
<|> do {m <- reserved "==" ; return (m,A.Eq) }
<|> do {m <- reserved "<>" ; return (m,A.NotEq) }
monadicArithOp :: RainParser (Meta,A.MonadicOp)
monadicArithOp