-
Notifications
You must be signed in to change notification settings - Fork 5
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
Grammar railroad diagram #41
Comments
|
And here the
|
Wrong on everything written above, with no basis in fact. I wrote the lexer and the parser grammar from scratch, so I think I have a pretty good idea what I'm talking about. No tool of any kind was ever used to expand the grammar rules. There was no BNF grammar for OpenQasm3 at the time the Lexer and Parser were written. The Lexer is not reused from another project. There was no other project in existence that could lex OpenQasm3. You should be much more careful before making these kinds of statements. The only thing you've done here is: you copied-and-pasted the grammar rules from the existing Bison parser, re-formatted them to make them look like BNF, and them claimed the work as your own. Impressive. |
I've just added the grammar/lexer of this project to https://mingodad.github.io/parsertl-playground/playground/ an
Yacc/Lex
compatible online editor/interpreter (selectQasm parser (be patient) (partially working)
fromExamples
then clickParse
to see a parse tree for the content inInput source
) and also generated anEBNF
understood by https://github.com/GuntherRademacher/rr to generate a nice navigable railroad diagram (see next comment with instructions at the top).In doing so I've noticed that the lexer seems to be reused from another project and has several unused tokens and several duplicates for other tokens, the parser grammar seems to be generated from a tool that inline/expand several rules (maybe https://github.com/BNFC/bnfc ?) what make the grammar bigger and slower.
I hope https://mingodad.github.io/parsertl-playground/playground/ can help develop/test/debug this project grammar.
The text was updated successfully, but these errors were encountered: