Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-06-09

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:43 sivoais joined #marpa
00:52 sivoais joined #marpa
01:02 sivoais joined #marpa
03:07 ronsavage joined #marpa
03:16 jeffreykegler joined #marpa
03:17 jeffreykegler And, while I'm stumbling onto cool features Marpa already has, I've found a way of dealing with premature exhaustion of a parse.
03:20 * jeffreykegler when he says "exhausted" means that the parser has reached a point where further input cannot lead to a successful parse.  This can happen when a parse succeeds, and for some grammars (like string ::= 'abc') a parse is successful if and only if it is exhausted.
03:21 jeffreykegler Anyway, currently if the parse is exhausted but there are still characters left in the input, the SLIF's read() treats it as a failure and throws an exception ...
03:22 jeffreykegler This can be caught, but some users, who have grammars where success == exhaustion, have wanted to use exhaustion to detect end of parse.
03:23 jeffreykegler It's been a feature I've considered adding, but now I've found a very nice way to do it with the current features:
03:25 jeffreykegler you just create a "completed symbol" event for the start (or top-level) symbol -- if a SLIF parse is both exhausted and at an event, the SLIF always reports the event, and will never report failure due to exhaustion.
11:01 Mifta joined #marpa
11:06 Mifta left #marpa
14:50 jeffreykegler joined #marpa

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary