-
Notifications
You must be signed in to change notification settings - Fork 3
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
53 add option to parsejava to print ast in json #68
53 add option to parsejava to print ast in json #68
Conversation
StoneyJackson
commented
Nov 8, 2023
•
edited
Loading
edited
This reverts commit 2bcabca.
Fixes #61, allowing PLCC to work with Java 11 or higher. --- Co-authored-by: Timothy Fossum <[email protected]>
ReviewExcellent! Now we need to get the design, the UI, and the documentation right. On the design side, it would be good if the new JSON generator is copied over to Java/ when it is needed. So this needs to be an extra option to plcc.py. This is important so existing systems, when updated do not need to update their classpaths. Also we need to update the installation documentation to explain how to add the 3rd party libraries, and when that is necessary. We also need docs on how to use this stuff. All docs are in the project's wiki. We should also update the docker images so they install the jackson libraries. Here's a todo-list.
|
src/plcc.py
Outdated
STDT = ['ILazy','IMatch','IScan','ITrace', 'Trace', 'PLCCException', 'Scan'] | ||
STDP = ['ProcessFiles','Parse','Rep'] | ||
print(argv) | ||
if len(argv) > 1: | ||
if argv[0] == "--python": |
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.
plcc.py has a mechanism for handling command-line arguments. Unless there is a good reason, we should probably work within that framework.
Specifically, there is a loop in main() that walks through all the command line arguments and calls processFlag() to populate a global dict with flags. The rest of the system interrogates flags to decide what to do.
Let's use The next phase of this project can add |
src/Std/ParseJsonAst.java
Outdated
_Start parseTree = _Start.parse(scn, trace); | ||
parseTree.$ok(); | ||
try { | ||
objectMapper.writeValue(new File("ASTroot.json"), parseTree); |
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.
Ideally, we should print the AST to stdout. Can we do that?
I've added a test that should pass when:
|
Great work on you recent commits! I just overhauled the docs in main. Please synch this branch before updating docs. |
NOPE |
I just overhauled the docs again! Now everything we either update the README.md in the root, or write a separate document about the new options. At the moment, the first sounds better. |
🎉 This PR is included in version 6.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |