The objective of this practical is to learn the general principles involved in constructing source code parsers. This will be done using JavaCC (the Java Compiler Compiler – javacc.java.net). JavaCC is complex, and this prac will not cover all aspects of it indepth
- First You have to Install https://javacc.org/
- Clone this Repo
- I have complete the All the Prac untill to Last Question
- Access the Prac from Here https://goo.gl/kf2xen
Use this for Reference Pourposes Only!!! Empty Class is my sample output class that I am going to input to parser.
-
To convert the grammar into Java source code, run JavaCC as follows:
[user@pc]$ javacc SimpleJavaParser.jj
-
The generated parser then needs to be compiled:
[user@pc]$ javac SimpleJavaParser.java
-
Run the compiled parser as follows:
[user@pc]$ java SimpleJavaParser < Example.java
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
If you are Doing Curtin. Please do not thank me. Thank for all who helped me.
MIT License