RedlineResearch / floorplan

Spatial layout specifications for memory management systems.
https://redlineresearch.github.io/floorplan/
Other
19 stars 0 forks source link

Parser Error with Parenthetical size-arith #1

Closed InnPatron closed 5 years ago

InnPatron commented 5 years ago

Built with latest master.

flp fails to compile the following (a simplified snippet taken from the pre-print):

Foo -> (1 words - 1 bytes)

with error:

flp: Parse error with remaining input: [TokenWords,TokenMinus,TokenNum 1, TokenBytes, TokenRParen]
...
Parser.hs:1325:17
InnPatron commented 5 years ago

Ah, I see the issue.

There is a rule exponent -> '(' litArith ')' which is the only rule for parsing for parenthetical arithmetic. However, sizePrim is not expected within litArith, causing an error.

Probably a simple fix of adding the rule sizeArith -> '(' sizeArith ')'

cronburg commented 5 years ago

Thanks for reporting this!