fix tokenizing of numbers and expressions of offset

This commit is contained in:
Ilya Rezvov
2018-03-20 21:33:11 -07:00
parent 3400a7c1ad
commit 682e71defc
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -33,8 +33,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
+1 -1
View File
@@ -960,7 +960,7 @@ start :: { StartFunction }
-- but collection of testcases omits 'offset' in this position
-- I am going to support both options for now, but maybe it has to be updated in future.
offsetexpr :: { [Instruction] }
: 'offset' foldedinstr ')' { $2 }
: 'offset' list(foldedinstr) ')' { concat $2 }
| foldedinstr1 { $1 }
elemsegment :: { ElemSegment }