You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
cpp-peglib/pl0
yhirose 75cdfaf350 Code cleanup 2 years ago
..
samples Moved PL/0 sample directory 7 years ago
CMakeLists.txt Changed to use gtest 3 years ago
Makefile Fixed C++11 bulid errors 4 years ago
README.md Added build documentation for PL/0. 7 years ago
pl0.cc Code cleanup 2 years ago

README.md

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