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

A forked parser instance. More...

#include <parser_fork.h>

Data Fields

ClonedParserState cloned_state
 Deep copy of parser state.
 
uint32_t error_count
 Cumulative error count.
 
uint64_t fork_id
 Unique identifier for tracing/debugging.
 
void(* free_result )(void *)
 Optional destructor for semantic_result.
 
int priority
 Fork priority.
 
void * semantic_result
 Result produced by semantic actions.
 
struct ParserSnapshotsnapshot
 Grammar snapshot (ref acquired)
 
ParseForkStatus status
 Current status of this fork.
 
uint32_t tokens_consumed
 Number of tokens fed to this fork.
 

Detailed Description

A forked parser instance.

Created by fork_parser(), each fork holds an independent copy of the parser state and a reference to the grammar snapshot it should parse with.

Definition at line 111 of file parser_fork.h.

Field Documentation

◆ cloned_state

ClonedParserState ParseFork::cloned_state

Deep copy of parser state.

Definition at line 112 of file parser_fork.h.

◆ error_count

uint32_t ParseFork::error_count

Cumulative error count.

Definition at line 143 of file parser_fork.h.

◆ fork_id

uint64_t ParseFork::fork_id

Unique identifier for tracing/debugging.

Definition at line 145 of file parser_fork.h.

◆ free_result

void(* ParseFork::free_result) (void *)

Optional destructor for semantic_result.

If NULL, free() is used. Set this when the result requires custom cleanup.

Definition at line 140 of file parser_fork.h.

◆ priority

int ParseFork::priority

Fork priority.

Lower value = higher priority. When two forks both succeed, the one with the lower priority number wins.

Definition at line 122 of file parser_fork.h.

◆ semantic_result

void* ParseFork::semantic_result

Result produced by semantic actions.

Interpretation is grammar-specific. Owned by the fork; freed on destroy.

Definition at line 132 of file parser_fork.h.

◆ snapshot

struct ParserSnapshot* ParseFork::snapshot

Grammar snapshot (ref acquired)

Definition at line 114 of file parser_fork.h.

◆ status

ParseForkStatus ParseFork::status

Current status of this fork.

Definition at line 124 of file parser_fork.h.

◆ tokens_consumed

uint32_t ParseFork::tokens_consumed

Number of tokens fed to this fork.

Definition at line 142 of file parser_fork.h.


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