Skip to content
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

Drop --json_ast from plcc and always copy over ParseJsonAst.java #124

Open
StoneyJackson opened this issue Apr 22, 2024 · 0 comments
Open

Comments

@StoneyJackson
Copy link
Member

Now that we no longer pass around classpaths, and now that scripts update CLASSPATH to include the JARs from jackson, maybe we should just have plcc copy over ParseJsonAst.java by default and drop its --json_ast flag. This would simplify plcc in general, and specifically simplifies the process to generate an AST.

Currently, to produce an AST

$ plccmk --json_ast lang.plcc
$ plcc --json_ast < prog.lang

With this issue's suggestion...

$ plccmk lang.plcc
$ parse --json_ast < prog.lang

With this issue and #123 ...

$ plccmk lang.plcc
$ ast < prog.lang

The disadvantage of this issue's suggestion is that if one wants to manually compile Java/*, they would need to include the JARs from jackson in their CLASSPATH. If we agree that using plccmk to compile would be more common, then we could add a --no_ast option to plcc to prevent copying ParseJsonAst.java, and thus avoid requiring adding jackson's JARs to the CLASSPATH when compiling manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant