Skip to content

AndreiCNitu/while

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

While

Interpreter implementing the denotational semantics of the While language, as defined in Chapter 4 of the book Semantics With Applications: A Formal Introduction.

Usage

Start by running

ghci while.hs

Parse a program, given as a string

parse <parser> <program>
-- returns all possible parses as a list of (String, Stm) tuples

Evaluate the final state of a program

eval <program>

Check the value of a variable at the end of the program

value <var> <program>

Only single letters ('a' - 'z') can be used as variable names.

Examples

About

Compiler for the While language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published