I am new to ANTLRWorks and I am doing my final year project. Could anyone please help me in how to write ANTLR grammar just for recognising a class in java "and printing it in any file as an output". On the same lines then I will be able to write the grammar for my project.
0
votes
1 Answers
2
votes
Creating all required java classes from grammar.
Executejava -cp antlr-3.3-complete.jar org.antlr.Tool Java.g
OR
java -jar antlr-3.3-complete.jar Java.g
from the directory where you have antlr-3.3-complete.jar
and Java.g
file.
Java Grammer which is compatible with Java 1.3 to 1.6
Reference Resources: