LSL tools: implement grammar, parser tables, precedence, and recovery #82
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Re-express or faithfully port the LSL grammar/parser machine with production, precedence, shift/reduce, stack, and recovery semantics.
Deliverables
Validation
Prerequisite
All global API/test gates and the foundational/world implementations needed by these extension crates are complete.
Project constraints
Implemented and pushed in commit
656d837.The LSL tools now have a fully native Rust parser runtime: validated grammar construction, canonical LR(0) cores with deterministic LALR(1) lookahead propagation, stable action/goto tables, yacc-compatible precedence and associativity conflict handling, typed parse trees, mapped parser/action/production/transition APIs, top-relative parser stack semantics, error-token recovery, structured syntax/recovery diagnostics, and explicit state/stack/step/recovery bounds. Compatibility CSymbol production registration and SymbolSet FIRST/FOLLOW state preserve shared reference behavior without unsafe code or self-referential Arc leaks. Builder-driven checked-in source generation remains explicitly assigned to #83 and returns InvalidOperation rather than false success.
Validation completed:
The related pre-created extension target type-checks. Its runnable YyParser constructor assertion passes; the same shared test then fails on an unrelated stale RLV constructor expectation, which is outside #82 and was left unchanged.
No C#, CLR, unsafe code, platform-only API, or runtime source generation was introduced.