Skip to content

A toy interpreter for an introductory course on compilers.

Notifications You must be signed in to change notification settings

stefanagapie/Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interpreter

A toy interpreter for an introductory course on compilers.

Grammar:

Program --> Assignment*

Assignment --> Identifier = Exp;

Exp --> Exp + Term | Exp - Term | Term

Term --> Term * Fact | Term / Fact | Fact

Fact --> ( Exp ) | - Fact | + Fact | Literal | Identifier

Identifier --> Letter [Letter | Digit]*

Letter --> a|...|z|A|...|Z|_

Literal --> 0 | NonZeroDigit Digit*

NonZeroDigit --> 1|...|9

Digit --> 0|1|...|9

About

A toy interpreter for an introductory course on compilers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages