Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
Loading...
Searching...
No Matches
GLRParser Struct Reference

GLR parser context, wrapping an underlying LALR(1) parser. More...

#include <glr.h>

Data Fields

GSSNode ** active_heads
 Array of active stack top nodes.
 
LimeArenaarena
 Arena for GSSNode allocation.
 
GLRDisambiguateFn disambiguate
 User disambiguation callback.
 
void * disambiguate_data
 User data for callback.
 
bool has_ambiguity
 True if unresolved ambiguity detected.
 
uint32_t max_heads
 Capacity of active_heads.
 
uint32_t nheads
 Number of active heads.
 
uint32_t total_forks
 Statistics: total forks.
 
uint32_t total_merges
 Statistics: total merges.
 

Detailed Description

GLR parser context, wrapping an underlying LALR(1) parser.

Manages the set of active parse stack heads (the "frontier") and performs forking on conflicts and merging on convergence.

Definition at line 52 of file glr.h.

Field Documentation

◆ active_heads

GSSNode** GLRParser::active_heads

Array of active stack top nodes.

Definition at line 53 of file glr.h.

◆ arena

LimeArena* GLRParser::arena

Arena for GSSNode allocation.

Definition at line 56 of file glr.h.

◆ disambiguate

GLRDisambiguateFn GLRParser::disambiguate

User disambiguation callback.

Definition at line 57 of file glr.h.

◆ disambiguate_data

void* GLRParser::disambiguate_data

User data for callback.

Definition at line 58 of file glr.h.

◆ has_ambiguity

bool GLRParser::has_ambiguity

True if unresolved ambiguity detected.

Definition at line 61 of file glr.h.

◆ max_heads

uint32_t GLRParser::max_heads

Capacity of active_heads.

Definition at line 55 of file glr.h.

◆ nheads

uint32_t GLRParser::nheads

Number of active heads.

Definition at line 54 of file glr.h.

◆ total_forks

uint32_t GLRParser::total_forks

Statistics: total forks.

Definition at line 59 of file glr.h.

◆ total_merges

uint32_t GLRParser::total_merges

Statistics: total merges.

Definition at line 60 of file glr.h.


The documentation for this struct was generated from the following file: