1- [ ![ CircleCI ] ( https://circleci .com/gh/IITH-SBJoshi/haskell-11/tree/master .svg?style=svg&circle-token=72b4ba1854966fc5f4e58b1e3d0fc5a05cf4ad66 )] ( https://circleci .com/gh/IITH-SBJoshi/haskell-11/tree/master )
1+ [ ![ Build Status ] ( https://travis-ci .com/vijayphoenix/Compiler-written-in-Haskell .svg?token=67qmZmyfex1ST6G5tpZK&branch=master )] ( https://travis-ci .com/vijayphoenix/Compiler-written-in-Haskell )
22
33# Implementing a JIT Compiled Language with Haskell
44
55## About
66
7- The aim of the project was to implement a simple procedural language.
7+ The project aimed to implement a simple procedural language.
88We named it ** HASKULL** :-)
99The frontend is written in Haskell and the backend it managed LLVM-hs-pure package.
1010The project extensively uses Monads, State Monads, Applicative functors and Transformers.
@@ -18,7 +18,7 @@ You will need GHC 7.8 or newer as well as LLVM 4.0.
1818Clone the repository:
1919
2020```
21- git clone " https://github.com/IITH-SBJoshi/haskell-11 .git"
21+ git clone https://github.com/vijayphoenix/Compiler-written-in-Haskell .git
2222```
2323
2424Browse to the directory where all the files of this repository are located.
@@ -37,7 +37,7 @@ stack repl
3737```
3838Type "main" in the interactive console.
3939
40- Write any code using following Syntax rules
40+ Write any code using the following Syntax rules.
4141
4242```
4343Syntax rules:
@@ -47,14 +47,13 @@ All the symbol starting with lower-case letter are terminal(lexer units).
4747All the operators are left associative
4848
4949Command = Expr ;
50- Expr : DeclarationStmt | FuncCallStmt | LiteralStmt | Var | ifthenStmt | (Expr)
50+ Expr : DeclarationStmt| FuncCallStmt | LiteralStmt | ifthenStmt | (Expr)
5151
52- DeclarationStmt : ExternDecl | VarDecl
52+ DeclarationStmt : ExternDecl
5353
5454ExternDecl : extern Name([ArgList]) : Type
55- VarDecl : Type VList
5655
57- Type : int | string
56+ Type : int
5857VList: Name[, VList]
5958
6059FuncCallStmt : Call
@@ -63,13 +62,12 @@ Call : Name ( [Args] )
6362BinOpCallStmt : BinOpCall
6463BinOpCall : Expr Op Expr
6564
66- Op : + | - | * | / | ; | = | <
65+ Op : + | - | * | / | ; | <
6766reserved keywords: int char def extern string if then else
6867Args : Expr[, Args]
6968
70- LiteralStmt : StrLiteral | IntLiteral
69+ LiteralStmt : IntLiteral
7170IntLiteral : integer
72- StrLiteral : string
7371
7472Name : ident
7573ArgList : Type Name[, ArgList]
@@ -79,7 +77,8 @@ Command-list = Command [Command-list]
7977
8078Command = Expr ;
8179```
82- For more insight on the language grammer, refer to Language.hs, Lexer.hs, Parser.hs files.
80+ Some sample example functions are provided in examples.txt file.
81+ For more insight on the language grammar, refer to Language.hs, AST.hs files.
8382
8483
8584### Documentation
@@ -100,7 +99,7 @@ stack haddock
10099* [ ** Yogesh Singh** ] ( https://github.com/yo5sh )
101100
102101#### License
103- * [ LICENSE] ( https://github.com/IITH-SBJoshi/haskell-11/blob/master/ LICENSE)
102+ * [ LICENSE] ( LICENSE )
104103
105104#### Acknowledgments
106- * [ Haskell LLVM JIT Compiler Tutorial] ( http://www.stephendiehl.com/llvm )
105+ * [ Haskell LLVM JIT Compiler Tutorial] ( http://www.stephendiehl.com/llvm )
0 commit comments