3 ms·
Hmm this article really misses out on what makes the recursive decent parser special by not diving deep into the "recursive" part. An example grammar one level
by mdoms 4y ago
Hmm this article really misses out on what makes the recursive decent parser special by not diving deep into the "recursive" part. An example grammar one level more complex would have been great.
- eatonphil 4y agoThe post shows how parsing functions call each other so it isn't really so far off: fn parse_money(&mut self) -> ParseResult<MoneyNode> { let currency = self.parse_currency_symbol()?; let amount = self.parse_amount()?; return Ok(MoneyNode { currency, amount }); }
- KptMarchewa 4y agoThat code could be copied directly from some real-world examples - sqlparser-rs code looks pretty much exactly the same. https://github.com/sqlparser-rs/sqlparser-rs https://github.com/sqlparser-rs/sqlparser-rs