cpp-peglib/pl0
2020-01-24 23:06:30 -05:00
..
samples Moved PL/0 sample directory 2017-08-08 07:06:37 -04:00
CMakeLists.txt Updated cmake files 2020-01-24 22:54:03 -05:00
Makefile Fixed C++11 bulid errors 2020-01-24 21:32:54 -05:00
pl0.cc Fixed build problem with LLVM 8.0 or lower 2020-01-24 23:06:30 -05:00
README.md Added build documentation for PL/0. 2017-08-17 17:57:30 -04:00

PL/0 language example

https://en.wikipedia.org/wiki/PL/0

  • PL/0 PEG syntax
  • AST generation with symbol scope
  • Interpreter (slow...)
  • LLVM Code generation
  • LLVM JIT execution (fast!)

Build

brew install llvm
export PATH="$PATH:/usr/local/opt/llvm/bin"
make

Usage

pl0 PATH [--ast] [--llvm] [--jit]

  --ast: Show AST tree
  --llvm: Dump LLVM IR
  --jit: LLVM JIT execution