diff options
| author | Kathy Gray | 2014-12-18 14:55:29 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-12-18 14:55:29 +0000 |
| commit | f8a9785b1f4f94c182bc50fed69914c436deaf83 (patch) | |
| tree | 9e60efd7f7dc067e256dc656d9957f48f30eddde /src | |
| parent | 178a6229cd225c3566468c6ea7bf9d6cb05f668d (diff) | |
Add negative literals such as -1. WARNING may not generate valid lem in the presence of negative literals
Diffstat (limited to 'src')
| -rw-r--r-- | src/lexer.mll | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lexer.mll b/src/lexer.mll index e39d7c65..60d4c532 100644 --- a/src/lexer.mll +++ b/src/lexer.mll @@ -297,6 +297,7 @@ rule token = parse | "2^" oper_char+ as i { (TwoCarrotI(r i)) } | digit+ as i { (Num(int_of_string i)) } + | "-" digit+ as i { (Num(int_of_string i)) } | "0b" (binarydigit+ as i) { (Bin(i)) } | "0x" (hexdigit+ as i) { (Hex(i)) } | '"' { (String( |
