News for hackers. Stuff that matters.
Re:Show HN: Pest – Fast parser generator written in Rust by reificator on Sunday August 27, 2017 @03:02PM (#15112123)
Exactly what I came into this thread expecting. Was curious why when it looks like there's already great IDE support for Rust with existing tools.
Re:Show HN: Pest – Fast parser generator written in Rust by dikaiosune on Sunday August 27, 2017 @03:42PM (#15112328)
There's actually a parser for rust called syn, and it's very useful for procedural macros, as the current API exposes a stream of tokens, not a full AST.
Re:Show HN: Pest – Fast parser generator written in Rust by steveklabnik on Sunday August 27, 2017 @04:03PM (#15112409)
To elaborate a bit on that, exposing an AST directly means that you're tied to that version of the AST; this was considered really hard for compatibility over versions. Token streams are much easier to define an interface for, and more flexible: you're not just stuck with whatever AST representation we'd have given you.

For example: https://doc.rust-lang.org/book/first-edition/procedural-macr...