I'm looking for ANTLR grammars which are ready for printing tree in readable format. When I try to print Java.g (http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g) the results were inconvenient. But I find one grammar(including java project), which prints AST good. This grammar is Pascal grammar from Marton Papp (http://www.antlr.org/grammar/1279217060704/pascal3.zip).
Something like:
VARDECL text="Var"
VARLIST text=""
VAR text="a"
VAR text="b"
VARTYPE text="Integer"
it is for Pascal(pascal3.zip).
Do you ever see such things for: C, Java, C#, VB. Maybe, you see it for some other languages?
- The required target language (of Parser and Lexer) is only Java.