rpgoldman / europa-pso

Automatically exported from code.google.com/p/europa-pso
0 stars 0 forks source link

Automated way of matching Java constants with generated NDDL3.tokens #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Java side gets AST as a string. When parsing the AST, the Java code uses
constants in AstNodeTypes.java to figure out node types. These constants
should match the numbers generated by Antlr on the C++ side (NDDL3.tokens).
Often changes to the NDDL grammar cause these constants to shift, in which
case AstNodeTypes.java needs to be updated. For now this update is manual,
which is bad.

At the very least we need some unittests to verify that constants still
match. Better yet, AstNodeTypes could take values directly from
NDDL3.tokens, either during build process for JavaEuropaUI or dynamically
(in which case NDDL3.tokens would need to be available to Java code).

Original issue reported on code.google.com by kichkaylo@gmail.com on 6 Oct 2009 at 6:54