Generating Parsers in C++ with Maphoon - Part 1 of 2
summary
Tool generates C++17 parser generator code and runtime automata, producing LALR parsers plus a tokenizer that mixes generated automata with handwritten token functions (interface named read_and_classify). Demonstrates building nondeterministic automata, determinizing and minimizing them, emitting C++ code for speed (automata-to-code emission). Claims cover handling nested comments, Python‑style indentation edge cases, runtime operator definitions and tunable error messages, and reports performance comparable to handwritten tokenizers and useful visualizations for teaching.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:30About Kazakhstan
- 2:26How did it start
- 4:24Parser generators
- 5:38What is parsing
- 7:12Tokenizing
- 8:56Why tokenizing
- 9:51Lack of flexibility
- 12:32Flexibility
- 14:25FileReader
- 16:00Token Recognition
- 17:17Try Identifier
- 19:39Automata
- 21:54Formal Verification
- 24:04States
- 28:39Lambda
- 29:25Auto
- 30:54deterministic
- 32:20extra words
- 33:18Classifier
- 38:41Replacing the code
- 39:23Conclusion








