Building parse tree with ANTLR and Java

evan kareem April 4, 2015

Hello I need some help regarding building a simple parse tree with antlr and java .
I have tried to work with powershell to compile and run the grammar file ( which is the
pascal.g4 file ) and I was hoping to generate some java files out of it , however at times when I tried to
run it using the command " .\antlr.bat -package pdl -o pdl .\pascal.g4 " I get a message on the powershell
stating " The system cannot find the file specified " .

I think the command I typed in might be wrong but anyway I have got the grammar file and I have got the
.bat files ( grun.bat , java.bat & javac.bat ) and the antlr-4.5-complete.jar file ,
I think these are basically all the files you need to build the parse tree .

As for the folder location where all these files are located is C:\Users\Lenovo\Documents\test2
I have looked at some examples from others however I really now cannot go any further , can anybody please
help me out here to build this .

Thank you

( I have also provided an image of all the files that are in that folder . )

files picture.jpg

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2015

Please explain what this has to do with an Atlassian product?

evan kareem April 4, 2015

Well I saw this page   https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4 

which was talking about antlr , so I thought this would be a good place to ask a question regarding this topic .

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2015

I'm not quite sure why you'd pick a word out of a url or off the "powered by" link at the bottom of a page like that - surely it would make a lot more sense to at least start the search with "antlr"? This community is friendly and extremely helpful (the reason I post is because I've got so much from the people here, I feel I ought to give something back), and you might well get a good answer. But, we're Atlassian users, not Antlr experts (well, some of us might be both). I think you will probably get a faster and better answer if you asked in an Antlr forum

evan kareem April 4, 2015

Thank you Nic Brough , I thought since that url  had something to do with this website I thought I could post my question here to get some answers , I guess I just misunderstood this website , but anyway thank you for your help .

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2015

I understand, it's not obvious that a link to "help with software powering this site" is not the same as "help with what we're talking about here". People do land here from all sorts of places that use Atlassian stuff for their issue tracking and documentation. (Mojang for example, seem to be particularly guilty of pointing their users here instead of better places for help with Minecraft) It's not that we don't want to help, it's just more likely that you'll get more/better/faster help in forums that are focussed on the right thing!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events