Skip to content

Web Application calculator that covers all the concepts of Compiler Design such as First & Follow, Left factoring, Left Recursion, and Token Generation. Even created Self-Designed Compiler for parsing and evaluating the String, Char and Int based operation.

Notifications You must be signed in to change notification settings

Shyam-Makwana/All-In-One-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All In One Compiler Project

Click here to view project online.

Project definition

Make a compiler for language described as follows:- Following is a valid sentence in a string, char and int operation based compiler. Generate its appropriate language description and compiler

Valid sentences in language :

  • string s;
  • string str = “Shyam”;
  • string str = pqr + xyz;
  • string str = “Shyam” + “Makwana”;
  • char c;
  • char c = ‘S’;
  • int pos = pqr ? xyz;

Grammar for Compiler

START ->  EXPR SEMICOLON NEWLINE

EXPR  ->  'string' VARNAME STR 
       |  'char' VARNAME CHAR
       |  'int' VARNAME INT

STR   ->  ASSGN STR1 
       |  ε  
STR1  ->  VARNAME SOP VARNAME 
       |  "VALUESTR" STR2     
STR2  ->  SOP "VALUESTR" 
       |  ε                                 

CHAR  ->  ASSGN CHAR1                                	      
CHAR1 ->  'VALUECHAR'                                    

INT   ->  ASSGN INT1                                  	    	   
INT1  ->  VARNAME IOP VARNAME                     

ASSGN ->  '='
SOP   ->  '+' 
       | '-' 
       | '<->'
IOP   ->  '?'
 

Technologies used

HTML, Js, Ajax, bootstrap, jquery, NodeJS, Express

To Run locally

  • clone the repo
  • run npm install
  • run npm start

alt text

About

Web Application calculator that covers all the concepts of Compiler Design such as First & Follow, Left factoring, Left Recursion, and Token Generation. Even created Self-Designed Compiler for parsing and evaluating the String, Char and Int based operation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published