Skip to content

PalAditya/CompilerDesignLab

Repository files navigation

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 😄

A basic usage of the library is as easy as follows:

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 for a full understanding of the library.

For release build:

<dependency>
  <groupId>io.github.PalAditya</groupId>
  <artifactId>parser-library</artifactId>
  <version>0.1.1</version>
</dependency>

For snapshot build:

<dependency>
  <groupId>io.github.PalAditya</groupId>
  <artifactId>parser-library</artifactId>
  <version>0.1-SNAPSHOT</version>
</dependency>

In case you want the pre-release (latest) versions, you can download it manually from here

Note: This is not being maintained anymore. Please see here to get the latest version of the code.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy