Skip to content

cordx56/slip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slip

slip - Small LIsP compiler project

Run

Install LLVM 11 using llvmenv

  • install cmake, make, ninja, g++/clang++
  • cargo install llvmenv
  • llvmenv init
  • llvmenv build-entry 11.0.0
  • set -x LLVM_SYS_110_PREFIX (llvmenv prefix)

Run test code

$ cargo run test.slip

Print test code LLVM IR

$ cargo run test.slip --llvmir

Language specification

BNF

<program>    ::= (<multispace>* <expression> <multispace>*)*
<expression> ::= <atom> | <list>
<list>       ::= "(" <multispace>* <expression> (<multispace>+ <expression>)* <multispace>* ")" | "(" <multispace>* ")"
<atom>       ::= <identifier> | <constant>
<constant>   ::= <number> | <string>

About

Small LIsP (toy) language compiler project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published