Crate peggen_core

Source
Expand description

§[peggen-core]

§Two-phase Parsing w/o Memorization

In most PEG-based approaches, the target type is constructed during parsing. However, some of them might be discarded in the near future, causing unwanted allocation/deallocation. In this crate, we seperate parsing and type construction into two phases. In the first phase, syntax items are represented as tags, which are storage-agnostic. Then, an analysis pass run over the tags and generate a final result.

Re-exports§

pub use stacker;

Structs§

LazyCell
A value which is initialized on the first access.
LazyLock
A value which is initialized on the first access.
Parser
A simple wrapper to make ParseImpl easier to use.
Regex
A compiled regular expression for searching Unicode haystacks.
Span
Annoted value
Tag
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Statics§

PEGGEN_COUNT

Traits§

AstImpl
FromStr
Num
ParseImpl
PushImpl
RuleImpl
SkipSpace
ToSpan

Functions§

stack_sanity_check