pierce-arith

所属分类:数值算法/人工智能
开发工具:Haskell
文件大小:0KB
下载次数:0
上传日期:2014-06-15 17:23:03
上 传 者sh-1993
说明:  皮尔斯类型和编程语言中的无类型算术表达式
(Untyped arithmetic expressions from Pierce s Types and Programming Languages)

文件列表:
AST.hs
Evaluator.hs
LICENSE
Lexer.x
Main.hs
Parser.y
Setup.hs
arith.cabal

Implementation of simple arithmetic expressions from Chapter 3 of Pierce's 'Types and Programming Languages' in Haskell. The evaluator is a big-step evaluator in Pierce's terminology. The package provides an executable `arith`, which presents the user with a REPL at which arithmetic expressions can be typed. The sytem prints out a parse tree and the value of the expression. It was an experiment for me to see how to implement a little language in Happy and Alex. In particular it uses monadic lexers and parsers in order to gracefully recover from errors. We also demonstrate the StateT monad transformer and Error monad from the mtl library. If you have Cabal installed you can build with cabal build and run with cabal run Otherwise see instructions for building [here](http://www.haskell.org/ghc/docs/7.0.2/html/Cabal/builders.html). Please send your comments to jyotirmoy@jyotirmoy.net

近期下载者

相关文件


收藏者