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

Opaque snapshot handle. More...

Data Fields

uint32_t action_count
 Number of entries in yy_action.
 
ParserModule *uint64_t create_time_ns
 < Owning module metadata, or NULL
 
void * jit_ctx
 Reserved for a future JIT compilation context that can cache machine code generated from the action tables.
 
uint32_t lookahead_count
 Number of entries in yy_lookahead.
 
uint8_t merkle_root [32]
 Content hash of grammar data.
 
uint32_t nrule
 Total number of rules.
 
uint32_t nstate
 Total number of parser states.
 
uint32_t nsymbol
 Total number of symbols.
 
uint32_t nterminal
 Number of terminal symbols.
 
atomic_uint_fast32_t refcount
 Atomic reference count.
 
struct rule * rules
 Linked list of production rules.
 
struct state ** states
 Array of pointers to state structs.
 
struct symbol ** symbols
 Array of pointers to symbol structs.
 
uint64_t version
 Monotonically increasing version number.
 
uint16_t * yy_action
 Combined shift+reduce action array.
 
uint16_t * yy_default
 Default action for each state.
 
uint16_t * yy_lookahead
 Lookahead values parallel to yy_action.
 
int16_t * yy_reduce_ofst
 Per-state offset into yy_action for reduces.
 
int16_t * yy_shift_ofst
 Per-state offset into yy_action for shifts.
 

Detailed Description

Opaque snapshot handle.

See src/snapshot.h for the full definition.

Definition at line 117 of file snapshot.h.

Field Documentation

◆ action_count

uint32_t ParserSnapshot::action_count

Number of entries in yy_action.

Definition at line 147 of file snapshot.h.

◆ create_time_ns

ParserModule* uint64_t ParserSnapshot::create_time_ns

< Owning module metadata, or NULL

Nanosecond-precision wall-clock time when this snapshot was created.

Definition at line 156 of file snapshot.h.

◆ jit_ctx

void* ParserSnapshot::jit_ctx

Reserved for a future JIT compilation context that can cache machine code generated from the action tables.

Definition at line 160 of file snapshot.h.

◆ lookahead_count

uint32_t ParserSnapshot::lookahead_count

Number of entries in yy_lookahead.

Definition at line 148 of file snapshot.h.

◆ merkle_root

uint8_t ParserSnapshot::merkle_root[32]

Content hash of grammar data.

Definition at line 152 of file snapshot.h.

◆ nrule

uint32_t ParserSnapshot::nrule

Total number of rules.

Definition at line 135 of file snapshot.h.

◆ nstate

uint32_t ParserSnapshot::nstate

Total number of parser states.

Definition at line 138 of file snapshot.h.

◆ nsymbol

uint32_t ParserSnapshot::nsymbol

Total number of symbols.

Definition at line 131 of file snapshot.h.

◆ nterminal

uint32_t ParserSnapshot::nterminal

Number of terminal symbols.

Definition at line 132 of file snapshot.h.

◆ refcount

atomic_uint_fast32_t ParserSnapshot::refcount

Atomic reference count.

Starts at 1 on creation. Every call to snapshot_acquire() adds 1; every call to snapshot_release() subtracts

  1. When the count drops to 0 the snapshot is destroyed.

Definition at line 126 of file snapshot.h.

◆ rules

struct rule* ParserSnapshot::rules

Linked list of production rules.

Definition at line 134 of file snapshot.h.

◆ states

struct state** ParserSnapshot::states

Array of pointers to state structs.

Definition at line 137 of file snapshot.h.

◆ symbols

struct symbol** ParserSnapshot::symbols

Array of pointers to symbol structs.

Definition at line 130 of file snapshot.h.

◆ version

uint64_t ParserSnapshot::version

Monotonically increasing version number.

Each new snapshot produced from a grammar modification gets a higher version than the last.

Definition at line 121 of file snapshot.h.

◆ yy_action

uint16_t* ParserSnapshot::yy_action

Combined shift+reduce action array.

Definition at line 142 of file snapshot.h.

◆ yy_default

uint16_t* ParserSnapshot::yy_default

Default action for each state.

Definition at line 146 of file snapshot.h.

◆ yy_lookahead

uint16_t* ParserSnapshot::yy_lookahead

Lookahead values parallel to yy_action.

Definition at line 143 of file snapshot.h.

◆ yy_reduce_ofst

int16_t* ParserSnapshot::yy_reduce_ofst

Per-state offset into yy_action for reduces.

Definition at line 145 of file snapshot.h.

◆ yy_shift_ofst

int16_t* ParserSnapshot::yy_shift_ofst

Per-state offset into yy_action for shifts.

Definition at line 144 of file snapshot.h.


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