Menhir and Friends: the State of the Art of Parsing in Rust
summary
Menhir is ported to Rust with a table-based backend that generates parsers plus a separate Rust runtime crate, and packaging is solved by a wrapper crate for Cargo and build-script trickery that prints linker flags so generated parsers can find the runtime. A simple lexer iterator adapter bridges common Rust lexers to Menhir’s interface. Error reporting uses generated error description files to produce precise runtime messages. An incremental API exists but remains unsafe and currently unexposed; overall the system works and is usable with caveats.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:57What is Menhir
- 1:27What is a Low Passing
- 2:10Example of a Low Passing
- 3:36Menhir to Rust
- 9:45Print Tips
- 11:48Runtime
- 12:58Cargo
- 14:37Lexer
- 16:39iteratecelexa
- 17:13end
- 17:33example
- 19:09Nam
- 19:45Pros and Cons
- 24:17Compile Errors
- 27:12Accumulation of Menhir
related talks
27mParsing Rust code considered harmful
58m(Almost) Everything You Should Know About The Compiler Frontend
11mEasy analysis of Rust code with Charon
15mBuilding Little Languages with Rust
37mCompiler Errors in rustc: A UX Perspective
31mThe Anatomy of Error Messages in Rust
23mRebuilding in Rust for Good Reason
38mMaking Rust Delightful
