Skip to content

Latest commit

 

History

588 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iguana

Iguana is a practical GLL parser generator. It reads a grammar written in Iggy, a declarative grammar definition language, and generates a parser from that grammar. The generated code and parser runtime are written entirely in Rust. Generated parsers can be used as libraries or command-line tools and can also be compiled to WebAssembly.

Iguana's parsing model has three defining properties:

  • General parsing. Iguana accepts any context-free grammar, including grammars with left recursion and ambiguity, and returns all derivations of an ambiguous input as a shared parse forest.
  • Lossless parse trees. The parse tree includes whitespace and comments. Its leaves cover the whole input, so the source can be reconstructed from the tree alone.
  • Declarative disambiguation. Disambiguation in Iguana is explicit. The grammar states precedence, associativity, and restrictions to remove the unintended derivations.

Iguana is based on PhD research in generalized parsing and declarative disambiguation conducted at CWI. The Java implementation was developed during that research. This repository reimplements the same ideas in Rust. The publications are listed on the research page.

The Iguana documentation covers installing Iguana, writing Iggy grammars, using generated parsers, and understanding how Iguana parses.

Contributing

See CONTRIBUTING.md before submitting a change. The development guide covers setup, building, testing, bootstrapping, and generated-code changes. The architecture guide describes the repository structure and generation pipeline.

About

A fast, practical GLL parser generator

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages