Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-10-23

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

All times shown according to UTC.

Time Nick Message
01:48 ilbot3 joined #marpa
01:48 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
02:15 ronsavage joined #marpa
03:53 kaare__ joined #marpa
05:07 ronsavage joined #marpa
06:47 ronsavage joined #marpa
06:52 pczarn joined #marpa
15:26 jdurand joined #marpa
15:26 jdurand Hello
15:27 jdurand In Marpa::R2::SLR there is a comment saying "For a reliable way to detect exhaustion use the $slr->exhausted() method."
15:28 jdurand I do not invlidate this, but wonder if this is stricly equivalent to calling marpa_r_terminals_expected(), the later returning 0 (?)
15:28 jdurand Thanks
16:35 pczarn jdurand: As far as I know, yes, it's strictly equivalent
16:45 jdurand Ok - good -;
16:46 jdurand I may have to analyse SLR or the XS, becuase I have one thing I am fighting with righ now, perhaps you remember:
16:47 jdurand when you match a lexeme that is for example a sequence, i;e. lexeme ~ S; S ~ _S*; _S ~ [\s]
16:48 jdurand the stream have two spaces, so this will match twice _S - how do you detect that the "lexeme" grammar is successful ? Because in this case exhaustion will return false, the number of expected symbols is still 1, still this will match nothing
16:49 jdurand I;e. do you compute systematically a value, or do you predict in advance you can compute a value or not?
17:00 jdurand I was thinking to call progress on the g1 range [0-0] - then I presume that the start rule will show completion - or to use a completion event on the start rule (I am at the C level so everything isd possible -;)
17:04 jdurand ps: oups I was thinking that it was Jeffrey that answered - sorry pczarn - many thanks for your answer still!
18:29 sirdancealot joined #marpa
18:32 maybekoo2 joined #marpa
19:31 idiosyncrat_ joined #marpa
19:33 idiosyncrat_ jdurand: re https://irclog.perlgeek.de/marpa/2016-10-23#i_13451578
19:34 idiosyncrat_ IIRC they are equivalent *if* all terminals have length 1.
19:35 idiosyncrat_ If you have terminals with lengths other than one, it is possible for there to be an earleme with no terminals expected, but where terminals are expected at a later earleme.
19:36 idiosyncrat_ In such a case, you would expect 0 terminals, but the parse would not be exhausted.
19:36 idiosyncrat_ pczarn: thanks for filling it, you were right, modulo the quibble I just explained.
19:39 idiosyncrat_ jdurand: re https://irclog.perlgeek.de/marpa/2016-10-23#i_13451754
19:40 idiosyncrat_ I am not sure what you are asking, but the SLIF L0 lexer uses a one-character-per-earleme model.
19:41 idiosyncrat_ (For others, this is talking internals and implementation -- it's pretty much invisible to the user of the SLIF.)
19:45 idiosyncrat_ Also, is it possible you are confusing exhaustion and success?  In some grammars, they are the same, but in others exhaustion means failure.
19:46 idiosyncrat_ http://search.cpan.org/~jkegl/Marpa-R2-3.000000/pod/Exhaustion.pod
19:50 idiosyncrat_ Anyway, I'm not sure this answered https://irclog.perlgeek.de/marpa/2016-10-23#i_13451754, but I hope it helps.
19:52 idiosyncrat_ Also, if you are trying to reverse engineer the SLIF's L0 processing, note that it uses an undocumented Marpa feature, which allows certain Earley items to be disabled.
19:54 idiosyncrat_ This means I can create a single grammar for lexing, with all lexemes.  Whenever I am looking for a lexeme, I disable those not actually expected at that point.
21:02 pczarn joined #marpa
21:32 ronsavage joined #marpa
21:36 ronsavage jdurand: Besides http://search.cpan.org/~jkegl/Mar​pa-R2-3.000000/pod/Exhaustion.pod see also https://metacpan.org/pod/distribution/Marpa-R2/pod/Scanless/R.pod#exhaustion. These links both come from http://savage.net.au/Perl-modules/html/marpa.faq/faq.html#q138.
22:16 ronsavage joined #marpa

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