Skip to content

interpreterz/lexical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEXICAL Language Evaluator

To run the parser:

(1) Open ghci, the Haskell interactive prompt. (2) Load the file AST.hs (3) Give any expression- belonging to the LEXICAL language- as a string to the function run.

(note: the evaluator has not been implemented yet!)

$ ghci
Prelude> :l AST.hs
Prelude> :l AST.hs
[1 of 3] Compiling ParseUtils       ( ParseUtils.hs, interpreted )
[2 of 3] Compiling ASTParser        ( ASTParser.hs, interpreted )
[3 of 3] Compiling Main             ( AST.hs, interpreted )
Ok, three modules loaded.
*Main> run "( + 1 2 )"
3