-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add ANTLR4 grammar and C++ parser #28
Conversation
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.
As you are adding C++ code this repo, you should also set up our normal set of C++ compliance checks (I believe there are copies in the prjxray repository?).
Can you give some more concrete numbers? |
Should delete textx schema? |
What about tests? |
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.
Overall looks like a good start. Relatively simple C++ -> Python boundry. I think we are missing some internal state assertions on the Python side, and I've tried to comment on them when I see them. What do you think about having more focused unit tests on the Python and C++ side?
@HackerFoo Please transition the CI from Travis to GH actions in a separate PR. It will significantly aid in CI runtime. |
I've been using |
I've figured out how to get the error, running
|
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.
Can you add an argument to fasm/tool.py
to select the parse? Similar to what you've done in test_simple.py
?
@HackerFoo, review is in. |
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
11c8ed2
to
e4379f4
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
Signed-off-by: Dusty DeWeese <[email protected]>
e4379f4
to
77e7170
Compare
@litghost I've addressed all of your comments, thanks. |
Yep, things are looking pretty good. I noticed something wrong when uninstalling the package. Try this, with ANTLR4 runtime installed:
I get the following message when running
Note the lines under |
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.
Please fix package uninstall not removing all parts of the package.
61f03bc
to
77e7170
Compare
@litghost It doesn't look like there's a way to fix this presently. Here's the code responsible for deciding what to skip: https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_uninstall.py#L167-L215 It won't remove anything without a From https://www.activestate.com/resources/quick-reads/how-to-uninstall-python-packages/
|
|
I just tried it. Adding them to |
I think this is just how |
Signed-off-by: Dusty DeWeese <[email protected]>
5bba628
to
8cd652c
Compare
Signed-off-by: Dusty DeWeese <[email protected]>
@litghost Thanks, this works. Could you please include where you found this solution on #37 for future reference? Thanks. |
This PR replaces the textX pearser with a C++ implementation using ANTLR to improve parsing speed 16x: 80 seconds down to 5 seconds, parsing the LiteX 35T fasm with this: