Skip to content

This repository contains the code for the arithmetic expression interpreter written in Java with REPL support. It uses a recursive descent parsing technique and visitor pattern for evaluation.

License

Notifications You must be signed in to change notification settings

shashankkhasare/expression-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expression Interpreter

This repository contains the code for scanning, parsing and interpreting the expressions. It is based on the expression grammar. The abstract syntax tree generated using expression grammar is interpreted using a visitor design pattern. Here is the article for a detailed explanation.

Usage

  1. Use the following command to build the application.
    $ mvn clean install -DskipTests
  2. Use the following command to run the application.
    $ java -jar target/interpreters-1.0.jar

References

  1. https://en.wikipedia.org/wiki/Parsing_expression_grammar
  2. https://en.wikipedia.org/wiki/Visitor_pattern
  3. The Medium article

About

This repository contains the code for the arithmetic expression interpreter written in Java with REPL support. It uses a recursive descent parsing technique and visitor pattern for evaluation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages