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

Parser support enhancements #46

Open
hzongaro opened this issue Apr 13, 2018 · 0 comments
Open

Parser support enhancements #46

hzongaro opened this issue Apr 13, 2018 · 0 comments

Comments

@hzongaro
Copy link
Member

The pg command of org.transscript.Tool will generate a parser and lexer for a Tosca meta-parser for the target language. @mmatsa suggests that it would be good to be able to generate a regular parser that will generate Tosca terms as well.

Also, the parser generation only supports Java. It would nice to be able to generate a parser that's implemented in C++.

hzongaro added a commit that referenced this issue Apr 13, 2018
1. Added cpp|java options to org.transscript.Tool to specify the target parser implementation language for the pg command, and regular|meta options to select whether to generate a regular parser or a meta parser.  The defaults are java and meta.

2. Sketched out part of the changes needed in genparser.tsc to select whether to generate a Java or C++ parser.  The C++ case simply produces comments in the 'header' and 'members' sections of the generated g4 file indicating there's no implementation yet.
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