allow negative integers in the grammar syntax

This commit is contained in:
krasimir
2010-02-08 12:59:22 +00:00
parent 1e7cb24e70
commit 8c4fd9de9b

View File

@@ -36,8 +36,8 @@ $white+ ;
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \" { tok (T_String . unescapeInitTail . BS.unpack) }
$d+ { tok (T_Integer . read . BS.unpack) }
$d+ \. $d+ (e (\-)? $d+)? { tok (T_Double . read . BS.unpack) }
(\-)? $d+ { tok (T_Integer . read . BS.unpack) }
(\-)? $d+ \. $d+ (e (\-)? $d+)? { tok (T_Double . read . BS.unpack) }
{