-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Use bison for ilasm parser generator #101415
Conversation
Thank you @hez2010 ! Will review this soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far this looks good. Going to look at it a bit deeper.
/azp run runtime-coreclr ilasm |
Azure Pipelines successfully started running 1 pipeline(s). |
I question this is no longer being maintained. What IL grammar changes have we introduced since 2021 that haven't made it in? |
For example, byreflike on generics. |
I wrote that feature and it was updated. See |
Okay I see, sorry for missed that. I can bring it back but note that there's no public tool that can auto generate the asmparser.grammar file now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work @hez2010 ! Glad to see this be done.
I'll make a follow-up PR that adds a small README.md on how to generate the parser.
* Use bison for ilasm parser generator * Bring back asmparse.grammar
Supersedes #89704. Fixes #4776.
Bison for Windows: https://github.com/lexxmark/winflexbison
For other platforms: https://www.gnu.org/software/bison
To generate the
asmparse.cpp
:yacc asmparse.y -o asmparse.cpp
(orwin_bison asmparse.y -o asmparse.cpp
)/cc: @TIHan @JulieLeeMSFT