Skip to content

PetrKudr/jbinterpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Interpreter for the following language:

  • expr ::= expr op expr | atom | + atom | - atom
  • atom ::= (expr) | identifier | { expr, expr } | number | map(expr, identifier -> expr) | reduce(expr, expr, identifier identifier -> expr)
  • op ::= + | - | * | / | ^
  • stmt ::= var identifier = expr | out expr | print "string"
  • program ::= stmt | program stmt

How to build and run (using Maven)

  • cd to the project folder
  • mvn install
  • mvn exec:java

Interpreter requirements

  • Interpreter should report parsing errors and mismatched types errors (adding number to a sequence, applying map/reduce to a number, etc).
  • Support of calculations on long sequences (millions of elements)
  • Map/reduce should be executed in parallel using rational execution strategy

UI requirements

  • Program should be interpreted on the fly
  • Time-consuming calculations should not block the UI and should be cancellable
  • Errors from the interpreter should be shown in the editor

Dependencies

  • ANTLR4 for lexer/parser
  • RSyntaxTextArea for editor
  • JUnit for tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published