https://github.com/anicolaspp/pcf-compiler
A compiler for PCF (Programming Language for Computable Functions) Ported from F# to Scala
https://github.com/anicolaspp/pcf-compiler
Last synced: 11 months ago
JSON representation
A compiler for PCF (Programming Language for Computable Functions) Ported from F# to Scala
- Host: GitHub
- URL: https://github.com/anicolaspp/pcf-compiler
- Owner: anicolaspp
- Created: 2015-11-10T04:46:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T18:25:38.000Z (about 10 years ago)
- Last Synced: 2025-01-16T13:21:12.526Z (over 1 year ago)
- Language: XSLT
- Size: 600 KB
- Stars: 19
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PCF-Compiler [](https://travis-ci.org/anicolaspp/PCF-Compiler)
A compiler for PCF (Programming Language for Computable Functions) ported from F# to Scala.
PCF is functional and Turing Complete!
- More details about the language can be found [here](http://www.springer.com/cda/content/document/cda_downloaddocument/9780857290755-c2.pdf?SGWID=0-0-45-1052237-p174031776)
and [here](https://medium.com/@anicolaspp/building-a-compiler-in-scala-8d51b467baec).
- Be aware that this is a project to show the power of functional programming so avoiding imperative style is priority.
- TDD is required to commit.
## The grammar
```
Exp ::= x | n
| true
| false
| succ
| pred
| iszero
| if Exps then Exps else Exps
| fun x -> Exps
| rec x -> Exps
| (Exps)
| let x = Exps in Exps
Exps ::= Exps Exp | Exp
```