-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Online grammar editor #2046
Comments
The lexer picks the first rule that matches, so the second one is redundant. I suspect the same is the case for the fixity declarations, but I really don't know. I'll fix it. Thanks for noticing. |
Actually, for the fixity declaration I think the last one is probably the one that counts, as else I don't think the parser would have worked correctly. And the cause of the mistake is probably when we removed |
Also when giving the converted grammar to bison-3.8.2 we get this:
Converted grammar:
|
Also the token
|
See also haskell/happy#260 |
I've just added
/src/Language/Futhark/Parser/Parser.y
to https://mingodad.github.io/parsertl-playground/playground/ anYacc/Lex
compatible online editor/tester (selectFuthark parser (partially working)
then clickParse
to see a parser tree for the content inInput source
).While doing so I found that the token
Bang
("!..."
) appears twice on theprecedence
declarations:futhark/src/Language/Futhark/Parser/Parser.y
Line 171 in 4add83b
futhark/src/Language/Futhark/Parser/Parser.y
Line 179 in 4add83b
Also I'm not sure how the lexer is supposed to differentiate between
NATLIT
herefuthark/src/Language/Futhark/Parser/Lexer.x
Line 93 in 4add83b
INTLIT
herefuthark/src/Language/Futhark/Parser/Lexer.x
Line 135 in 4add83b
The text was updated successfully, but these errors were encountered: