https://github.com/paladitya/compilerdesignlab
Code for Compiler Design Lab, Semester 7
https://github.com/paladitya/compilerdesignlab
assembly-x86 bottom-up-parser compiler-design java-8 java-library lalr-parser lexical-parser regex-to-dfa-java regex-to-nfa slr-parser top-down-parser-with-backtracking
Last synced: about 2 months ago
JSON representation
Code for Compiler Design Lab, Semester 7
- Host: GitHub
- URL: https://github.com/paladitya/compilerdesignlab
- Owner: PalAditya
- Created: 2019-07-26T17:16:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-03T06:41:26.000Z (over 5 years ago)
- Last Synced: 2025-03-25T05:34:36.082Z (2 months ago)
- Topics: assembly-x86, bottom-up-parser, compiler-design, java-8, java-library, lalr-parser, lexical-parser, regex-to-dfa-java, regex-to-nfa, slr-parser, top-down-parser-with-backtracking
- Language: Java
- Size: 4.3 MB
- Stars: 17
- Watchers: 0
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CompilerDesignLab
Code for Compiler Design Lab, Semester 7
Will contain **images** and **README** files for each assignment if possible.The work is now available in the form of a library :smile:
A basic usage of the library is as easy as follows:
```java
LR1Parser obj=new LR1Parser();//Create an instance of the desired parser-In this case LR1 type parser
obj.read_grammar("D://Documents/Lab4/LR0.txt");//Read the grammar file
obj.buildDFA();//Build a dfa from the file
System.out.println(obj.states);//Prints the transitions in all states
obj.print_transitions();//Print all the transitions
obj.getParsingTable(true);//Use false to avoid printing the table after creation
obj.parse("a c e",true);//Parse the string; use false to prevent the stack actions from displaying on screen
```
Please move to [docs](Parser_Library/README.md) for a full understanding of the library.For **release** build:
```java
io.github.PalAditya
parser-library
0.1.1```
For **snapshot** build:
```java
io.github.PalAditya
parser-library
0.1-SNAPSHOT```
In case you want the pre-release (latest) versions, you can download it manually from [here](https://oss.sonatype.org/content/repositories/central_bundles-18962/io/github/PalAditya/parser-library/0.1.1/)
**Note**: This is not being maintained anymore. Please see [here](https://github.com/PalAditya/JParser) to get the latest version of the code.