From b27a89cc1770cf91bc42fc86091f3d333bee9357 Mon Sep 17 00:00:00 2001 From: Ilya Rezvov Date: Mon, 16 Apr 2018 20:00:20 -0700 Subject: [PATCH] fix int literals parsing --- src/Language/Wasm/Lexer.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Language/Wasm/Lexer.x b/src/Language/Wasm/Lexer.x index 365a266..1c6a16a 100644 --- a/src/Language/Wasm/Lexer.x +++ b/src/Language/Wasm/Lexer.x @@ -40,8 +40,8 @@ $doublequote = \" @linecomment = ";;" $linechar* \x0A @startblockcomment = "(;" @endblockcomment = ";)" -@num = $digit (\_? $digit*)* -@hexnum = $hexdigit (\_? $hexdigit*)* +@num = $digit (\_? $digit+)* +@hexnum = $hexdigit (\_? $hexdigit+)* @id = "$" $idchar+ @floatfrac = @num "." (@num)? @exp = [Ee] $sign? @num