Parboiled2: better parsing in Scala
summary
parboiled2 is a macro-based parser generator for Scala that claims several hundred times faster parsing than Scala parser combinators and produces type-safe internal DSLs via Scala macros and type-level programming. The demo builds a calculator grammar that generates an AST, runs as inputLine.run returning Success/Failure, and shows precise error locations with an arrow. It accepts Strings, Char arrays or byte arrays, implements PEG semantics, and replaces fragile regexes or external generators while compiling directly into fast parser bytecode.
AI-written summary · about








