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

Deep copy of a grammar-specific parser state. More...

#include <parser_fork.h>

Data Fields

uint32_t stack_capacity
 Total entry slots in the cloned stack.
 
void * stack_data
 Separately allocated stack (if stack was on heap)
 
uint32_t stack_depth
 Number of entries currently on the stack.
 
bool stack_is_inline
 True if stack lives inside state_data (yystk0)
 
size_t stack_size
 Number of bytes in the cloned stack.
 
void * state_data
 Deep copy of the yyParser struct (malloc'd)
 
size_t state_size
 sizeof(yyParser) for this grammar
 

Detailed Description

Deep copy of a grammar-specific parser state.

The parser state internals are grammar-specific (the yyParser struct is generated per-grammar), so the cloned state is stored as a raw byte buffer plus metadata about its layout.

Definition at line 83 of file parser_fork.h.

Field Documentation

◆ stack_capacity

uint32_t ClonedParserState::stack_capacity

Total entry slots in the cloned stack.

Definition at line 90 of file parser_fork.h.

◆ stack_data

void* ClonedParserState::stack_data

Separately allocated stack (if stack was on heap)

Definition at line 87 of file parser_fork.h.

◆ stack_depth

uint32_t ClonedParserState::stack_depth

Number of entries currently on the stack.

Definition at line 89 of file parser_fork.h.

◆ stack_is_inline

bool ClonedParserState::stack_is_inline

True if stack lives inside state_data (yystk0)

Definition at line 92 of file parser_fork.h.

◆ stack_size

size_t ClonedParserState::stack_size

Number of bytes in the cloned stack.

Definition at line 88 of file parser_fork.h.

◆ state_data

void* ClonedParserState::state_data

Deep copy of the yyParser struct (malloc'd)

Definition at line 84 of file parser_fork.h.

◆ state_size

size_t ClonedParserState::state_size

sizeof(yyParser) for this grammar

Definition at line 85 of file parser_fork.h.


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