From f8a9785b1f4f94c182bc50fed69914c436deaf83 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Thu, 18 Dec 2014 14:55:29 +0000 Subject: Add negative literals such as -1. WARNING may not generate valid lem in the presence of negative literals --- src/lexer.mll | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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( -- cgit v1.2.3