Discussion:
Graphical AST
Diego Martínez
2012-11-20 17:48:23 UTC
Permalink
Hi,

I following step by step the next wiki entry:

http://www.antlr.org/wiki/display/ANTLR3/How do I display ASTs graphically

DOTTreeGenerator gen = new DOTTreeGenerator();
StringTemplate st = gen.toDOT(t);
System.out.println(st);

I use the antlr-3.4-complete-no-antlrv2.jar

When invoke gen.toDot(...) method it has StringTemplate class in your
return type (StringTemplate 3?), and the StringTemplate bundled within the
jar is 4 (name is ST instead of StringTemplate, etc).

I'm a novice in antlr, what is wrong with the dependencies?.. i need it to
generate a graphical view of my AST.

Thank you!! Diego Martínez

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
Juancarlo Añez
2012-11-20 18:32:19 UTC
Permalink
Hello Diego,

I don't know about the specific problem you describe, but I do know that
3.4 is not the latest version of the 3.x series. It is 3.4.1-snapshot, and
you must get it from Github.

Things that did not work for me with 3.4 work perfectly with 3.4.1-snapshot.

Cheers,
Post by Diego Martínez
Hi,
http://www.antlr.org/wiki/display/ANTLR3/How do I display ASTs graphically
DOTTreeGenerator gen = new DOTTreeGenerator();
StringTemplate st = gen.toDOT(t);
System.out.println(st);
I use the antlr-3.4-complete-no-antlrv2.jar
When invoke gen.toDot(...) method it has StringTemplate class in your
return type (StringTemplate 3?), and the StringTemplate bundled within the
jar is 4 (name is ST instead of StringTemplate, etc).
I'm a novice in antlr, what is wrong with the dependencies?.. i need it to
generate a graphical view of my AST.
Thank you!! Diego Martínez
List: http://www.antlr.org/mailman/listinfo/antlr-interest
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
Juancarlo *Añez*

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-intere
Mandy Neumann
2012-11-20 18:37:22 UTC
Permalink
Hi,

I'm definitely no ANTLR crack, but this DOT thing works just fine for
me. So maybe it's just the "no-antlrv2" part? I use antlr-3.4-complete.jar.
Post by Juancarlo Añez
Hello Diego,
I don't know about the specific problem you describe, but I do know that
3.4 is not the latest version of the 3.x series. It is 3.4.1-snapshot, and
you must get it from Github.
Things that did not work for me with 3.4 work perfectly with 3.4.1-snapshot.
Cheers,
Post by Diego Martínez
Hi,
http://www.antlr.org/wiki/display/ANTLR3/How do I display ASTs graphically
DOTTreeGenerator gen = new DOTTreeGenerator();
StringTemplate st = gen.toDOT(t);
System.out.println(st);
I use the antlr-3.4-complete-no-antlrv2.jar
When invoke gen.toDot(...) method it has StringTemplate class in your
return type (StringTemplate 3?), and the StringTemplate bundled within the
jar is 4 (name is ST instead of StringTemplate, etc).
I'm a novice in antlr, what is wrong with the dependencies?.. i need it to
generate a graphical view of my AST.
Thank you!! Diego Martínez
List: http://www.antlr.org/mailman/listinfo/antlr-interest
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/
Diego Martínez
2012-11-20 19:34:31 UTC
Permalink
Thank you for the answers!!

"no-antlrv2" part, are the bad boy in this movie :p

I proved the antlr-3.4-complete.jar and all works ok.

Thank you!!! Diego Martínez
Post by Mandy Neumann
Hi,
I'm definitely no ANTLR crack, but this DOT thing works just fine for
me. So maybe it's just the "no-antlrv2" part? I use antlr-3.4-complete.jar.
Post by Juancarlo Añez
Hello Diego,
I don't know about the specific problem you describe, but I do know that
3.4 is not the latest version of the 3.x series. It is 3.4.1-snapshot,
and
Post by Juancarlo Añez
you must get it from Github.
Things that did not work for me with 3.4 work perfectly with
3.4.1-snapshot.
Post by Juancarlo Añez
Cheers,
Post by Diego Martínez
Hi,
http://www.antlr.org/wiki/display/ANTLR3/How do I display ASTs
graphically
Post by Juancarlo Añez
Post by Diego Martínez
DOTTreeGenerator gen = new DOTTreeGenerator();
StringTemplate st = gen.toDOT(t);
System.out.println(st);
I use the antlr-3.4-complete-no-antlrv2.jar
When invoke gen.toDot(...) method it has StringTemplate class in your
return type (StringTemplate 3?), and the StringTemplate bundled within
the
Post by Juancarlo Añez
Post by Diego Martínez
jar is 4 (name is ST instead of StringTemplate, etc).
I'm a novice in antlr, what is wrong with the dependencies?.. i need it
to
Post by Juancarlo Añez
Post by Diego Martínez
generate a graphical view of my AST.
Thank you!! Diego Martínez
List: http://www.antlr.org/mailman/listinfo/antlr-interest
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
Loading...