Expand description
Common code generation utilities shared across all code generators.
Structs§
- Error
Fields - Common error structure fields
- Lexer
Fields - Common lexer structure fields
- Parser
Fields - Common parser structure fields
- Rule
Signature - Helper to generate rule method signature parts
- Token
Fields - Common token structure fields (for documentation)
- Token
Type Info - Common patterns and utilities for code generation. Token type information for code generation
Functions§
- extract_
all_ lexer_ rules - Extract all lexer rules (including fragments) for reference
- extract_
parser_ rules - Extract parser rules
- extract_
token_ types - Extract token types from grammar (excluding fragments)
- format_
identifier - Format identifier according to language conventions
- format_
type_ name - Format type name according to language conventions
- generate_
header_ comment - Generate standard header comment
- generate_
header_ comment_ python - Generate standard header comment (Python style)
- get_
lexer_ named_ action - Get lexer-specific named action
- get_
named_ action - Get named action code if present
- get_
parser_ named_ action - Get parser-specific named action