[][src]Crate lemon_tree

Famous Lemon Parser Generator, designed as library that builds your parser transparently during cargo build. To describe parser rules you add annotation attributes to rust functions, structs and enums.

You can find usage examples here

Structs

LemonMint

The compiled parser that can be saved to a rust file. Use LemonMintBuilder to build it.

LemonMintBuilder

Builder class that will finally generate LemonMint. Call builder methods to supply parser rules and options - everything that you would normally put to Lemon's Y-grammar file. Or you can feed the Y-file itself (it's syntax is similar to Lemon's one).

LemonMintError

Traits

LemonTree

Parser "start symbol" can be represented as a struct or enum. You need to annotate it with #[derive(LemonTree)], and implementation of this trait will be generated. The implementation contains 2 associated types:

LemonTreeNode

Attribute Macros

lem_fn

Derive Macros

LemonTree
LemonTreeNode