Skip to main content

Crate oxidized_yacc

Crate oxidized_yacc 

Source
Expand description

§oxidized-yacc — Zainium Dynamics LALR(1) parser generator

Product of Zainium Dynamics. Converts annotated context-free grammars (Yacc/Bison-class .y files) into LALR(1) parsers.

reader → reduce → derives/nullable → LR(0) → LALR(1) → conflicts → tables → output

§Library usage

use oxidized_yacc::{run, config::Config};
use std::path::PathBuf;

let mut cfg = Config::default();
cfg.grammar_file = PathBuf::from("grammar.y");
cfg.header = true;
cfg.verbose = true;
run(&cfg).expect("oxidized-yacc failed");

Modules§

automaton
LR(0)/LALR(1)/canonical-LR(1)/IELR automaton construction and conflict resolution. LR automaton construction: reduce, nullable, derives, LR0/LALR/LR1, conflicts, GLR.
cli
Command-line argument parsing (clap-based) into a config::Config. Command-line interface (clap) for Zainium Dynamics oxidized-yacc.
codegen
Parser source/header generation for the C, C++, Java, and D skeletons. Code generation (skeleton output). C / C++ / Java / D — behavioural reference: Bison 3.8.2 skeletons (not linked).
common
Shared source locations, diagnostics, and the crate’s error type. Shared utilities: source locations, diagnostics, and error types.
config
Run configuration: CLI flags, %defines, and their resolved defaults. Configuration and flags for Zainium Dynamics oxidized-yacc.
models
Grammar, symbol, state, and token data structures shared across phases. AST, tokens, symbols, grammar, and LR state models.
parser
Grammar-file scanning and parsing into a models::Grammar. Grammar file reading: scanner + parser for Bison/Yacc .y files.
report
*.output / DOT / XML / HTML report rendering. Human-readable grammar reports (print.c / *.output).
tables
LALR/LR action and goto table construction. Parser table generation.
utils
Small shared helpers (versioning, path defaults, array formatting). Helper functions used across the Zainium Dynamics parser-generator pipeline.

Structs§

CompileResult
Full result of an oxidized-yacc run (useful for tests and tooling).

Functions§

run
Run the complete Zainium Dynamics parser-generator pipeline.
run_str
Compile a grammar from an in-memory string (tests).