heyrutvik / simple-lang

SIMPLE language implementation in Scala. It is a toy language which is explained in Tom Stuart's book Understanding Computation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-lang

SIMPLE language implementation in Scala. It is a toy language which is explained in Tom Stuart's book Understanding Computation.

Tasks

  • Operational Semantics
    • Small-Step Semantics
    • Big-Step Semantics
  • Denotational Semantics
  • Parser

Setup Steps

  • clone this repo
  • change directory to the root of cloned repo and enter command sbt
    • to print abstract syntax tree of the program run -ast <program.simple>
    • to interpret program and see steps and output run -interpret <program.simple>
    • to compile program in javascript run -compile <program.simple> -o <program.js>

Note

  • <program.simple> must be a file in current directory, it doesn't expect file path!
  • hello.simple file is available in root directory to execute above commands.

About

SIMPLE language implementation in Scala. It is a toy language which is explained in Tom Stuart's book Understanding Computation.

License:MIT License


Languages

Language:Scala 100.0%