4 ms·
Thank you for inputs on the specifics. Would you say the reviewer/author is misunderstanding Perl6, or that I am misunderstanding the review?
by wodenokoto 9y ago
Thank you for inputs on the specifics.
Would you say the reviewer/author is misunderstanding Perl6, or that I am misunderstanding the review?
- Ultimatt 9y agoI think you are reading in too much the criticism of how grammars work. Ultimately the leading compiler uses the Perl 6 grammar engine and tooling to implement the language compiler! So if your needs are substantially less complex than needing to implement your own programming language, say parse some XML or something. Then the grammar engine is more than competent. The authors criticism of how to handle errors during parse and making a really advanced robust parser is definitely fair. However, the technology for doing this in a deep way does exist. It's already found in the grammar debugger module from one of the core devs (https://github.com/jnthn/grammar-debugger https://github.com/jnthn/grammar-debugger). There just isn't perhaps a nicer "user" level API for you handling parsing in a flexible way when something goes wrong. There are mechanisms for making your grammar flexible though such as proto rules/tokens/regexes https://docs.perl6.org/language/grammars#Protoregexes https://docs.perl6.org/language/grammars#Protoregexes here when different options are encountered you can trigger different code to handle whats being parsed.
- perlgeek 9y agoThe review touches the basics, and can't go into all the options that are available.
- zengargoyle 9y agoCheck out Perl 6's (or Rakudo's if you prefer) error messages. If they are LTA (Less Than Awesome), it's a bug. Often the Perl 6 Grammar that is parsing my Perl 6 code actually tells me things I didn't notice.... The stuff you need is available, but Perl 6 isn't going to give you an automagic generic error that's any better than "Parse failed at line 5 character 13". You can do that yourself rather easily, and if you want no LTA errors, you'll need to do them yourself.
- raiph 9y agoEvan did not intend folk to read what he wrote as a definitive testimonial. https://www.reddit.com/r/programming/comments/6thwnx/a_review_of_perl_6/dllv7uh/ https://www.reddit.com/r/programming/comments/6thwnx/a_revie...