Skip to content

A C++ based compiler designed to follow certain BNF grammar

License

Notifications You must be signed in to change notification settings

deep-jain/Lexical-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lexical-Compiler

Lexical Compiler uses the following Backus-Naur Form(BNF) grammar:

Prog := Slist
Slist := Ssep { Slist } | Stmt Ssep { Slist }
Ssep := NL | SC
Stmt := IfStmt | PrintStmt | SetStmt | LoopStmt
IfStmt := IF Expr BEGIN Slist END
PrintStmt := PRINT Expr
SetStmt := SET IDENT Expr
LoopStmt := LOOP Expr BEGIN Slist END
Expr := Prod { (PLUS | MINUS) Prod }
Prod := Primary { (STAR | SLASH) Primary }
Primary := IDENT | ICONST | SCONST | LPAREN Expr RPAREN

About

A C++ based compiler designed to follow certain BNF grammar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages