Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 1000 Bytes

File metadata and controls

21 lines (16 loc) · 1000 Bytes

ocaml-func

An OCaml library that provides an AST and a battle-hardened parser for FunC.

Usage

The library exposes two main components:

  1. The AST definition: ast.ml
  2. The parse function that takes the filepath and parses it: func.ml

See the complete usage example that parses FunC code to AST: driver.ml.

Limitations

The parser successfully handles all real-world FunC contracts used in our tests, but some edge cases may arise due to the language's design.

If parsing fails, consider:

  1. Migrate to a properly designed language
  2. Rewrite unparsable code
  3. Submit a pull request with a fix

See also