You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do users think about defining Arlington's internal predicate grammar using ANTLR?
This would then mean there is a single "truth" for the syntax of every predicate, while also being able to code-gen parsers in Python, Java, C, C#, etc. This would also replace the manually maintained documentation, which would be integrated into the ANTLR grammar as comments, etc. The current PoCs might also then be migrated to use the code-gen'd parsers (esp. the Python and Java PoCs which are not actively maintained).
Why ANTLR? Because it is environment agnostic, supports code-gen across many programming languages, and has a CLI so introducing new predicates doesn't require a full development cycle. And iText pdfcop for PDF content streams also uses ANTLR.
The main downside is users have to learn how to use and integrate an ANTLR-generated parser, vs rolling your own from the doco.
Other options I think are either more work, less popular and/or less flexible include: yacc/bison, XText, custom DSL.
Would defining Arlington's internal predicate grammar using ANTLR be helpful?
Yes - and I'd switch to use the code-generated parser
0%
Yes - but I would NOT use the code-generated parsers
0%
Yes - but don't use ANTLR, use a different tool X (please suggest and justify in a comment)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What do users think about defining Arlington's internal predicate grammar using ANTLR?
This would then mean there is a single "truth" for the syntax of every predicate, while also being able to code-gen parsers in Python, Java, C, C#, etc. This would also replace the manually maintained documentation, which would be integrated into the ANTLR grammar as comments, etc. The current PoCs might also then be migrated to use the code-gen'd parsers (esp. the Python and Java PoCs which are not actively maintained).
Why ANTLR? Because it is environment agnostic, supports code-gen across many programming languages, and has a CLI so introducing new predicates doesn't require a full development cycle. And iText pdfcop for PDF content streams also uses ANTLR.
The main downside is users have to learn how to use and integrate an ANTLR-generated parser, vs rolling your own from the doco.
Other options I think are either more work, less popular and/or less flexible include: yacc/bison, XText, custom DSL.
0 votes ·
Beta Was this translation helpful? Give feedback.
All reactions