/ocaml-flap

A deterministic parser with fused lexing

Primary LanguageOCamlMIT LicenseMIT

flap: Fused Lexing and Parsing

flap is a parsing library that fuses lexers and parsers together during code generation to improve performance.

The following paper has many more details:

            flap: A Deterministic Parser with Fused Lexing (pdf)
            Jeremy Yallop, Ningning Xie and Neel Krishnaswami
            PLDI 2023

Trying out flap

There is a Docker image available on Zenodo with accompanying tutorial instructions for trying out flap and reproducing the results in the paper.

Installation

  1. Install the BER MetaOCaml compiler using OPAM:

    opam switch create 4.11.1+BER
    eval $(opam env)
    
  2. Add the metaocaml-opam repository:

    opam remote add metaocaml git+https://github.com/metaocaml/metaocaml-opam.git
    
  3. Install the flap package:

    opam install flap