Skip to content

rgwohlbold/interpreter-ice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

interpreter-ice

Description

This is a simple Java interpreter and parser, inspired by Ruslan Spivak's tutorials on writing a Pascal interpreter in Python. The language syntax (currently named iCe) is just C without semicolons (who needs those anyway?). The interpreter currently supports arithmetic expressions and variable assignments and prints out all assigned variables.

Structure

The Program is divided into three parts:
  1. The Lexer, also called Tokenizer, reads in the Text and converts it into Tokens with defined TokenTypes.
  2. The Parser receives the Tokens from the Lexer and creates an Abstract Syntax Tree (AST)
  3. The Interpreter gets the Abstract Syntax Tree from the Parser and recursively "visits" every Node and executes the actions specified.

Links

Ruslan Spivak's tutorials

About

Java lexer, parser and interpreter for a c-style programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages