Skip to content

wojzaremba/interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Project require

  • haskell
  • bnfc
  • happy
  • alex

Overview

Project contains simple code interpreter developed in haskell. File Ast.cl contains description of a grammar. In order to complile entire project please execute make file. All tests are available in examples directory. Test procedure might be start by executing start.sh script. Project is based on syntax from JavaLight programming language. Project is also available on github https://github.com/wojzaremba/interpreter

Capabilities

This interpreter supports

  • basic constructions like
    • function calls
    • loops - while and for
    • if-statements
  • statements as expressions
  • post/pre incrementation, decrementation (++, --)
  • data types like boolean, int, double
  • lazy evaluation of boolean expressions (in expression a && b, b is called only if a is false)
  • arrays
    • dynamic size allocation
    • passing arrays by reference
    • multi-dimensional arrays
  • type casting (int <-> bool <-> double)

Author

Developed by Wojciech Zaremba. You can reach me at woj.zaremba (at) gmail (dot) com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published