[antlr-interest] New user

Sinan sinan.karasu at boeing.com
Thu Aug 29 11:03:00 PDT 2002


Matt Benson wrote:
> 
> Okay, but I must say I'm disappointed that there's not
> some magic answer... ;)
> 

One thing you can do, is take a simple example, but make sure that 
it is something that generates an AST tree. (java is one, tinybasic is
another).

 See how it show a tree with -showtree option.

 Next make yourself a antlr.jar that has everything.
I think antlrall.jar might already have everything you need.

I usually do

 % cd antlr-version
 % find antlr -name "*.class" -exec rm {} \;
 % javac -g `find antlr -name "*.java" -print`
 % jar cvf myantlr.jar antlr

 This gets you the sources and everything in your jar file.


 The  when you run the example run it with

 java Main -showtree filename

 When the example whatever it is is read in, it will show you the AST
tree
it generated.

 Seeing is believing.

 One caveat tho'....

 When tree is shown down direction is the siblings and across 
direction is the children ( it would have been better if english 
was typed in the down direction and scrolled in the right direction.
which would have made everything much easier for tree builders...
but I digress...)

Sinan

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list