Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-02-10

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

All times shown according to UTC.

Time Nick Message
00:30 jeffreykegler joined #marpa
02:35 flaviu joined #marpa
03:05 flaviu joined #marpa
04:40 ronsavage joined #marpa
10:28 pczarn joined #marpa
13:42 lwa joined #marpa
18:12 jeffreykegler joined #marpa
19:09 koo5 joined #marpa
20:09 jdurand_ joined #marpa
20:10 shadowpaste "jdurand_" at 217.168.150.38 pasted ""null" grammar" (15 lines) at http://fpaste.scsys.co.uk/463275
20:11 jdurand_ Jeffrey, is Marpa::R2 suppose to handle a grammar containing a single LHS that is a nullable ? The output of the programmar paster upper is:
20:12 shadowpaste "jdurand_" at 217.168.150.38 pasted ""null" grammar output" (4 lines) at http://fpaste.scsys.co.uk/463276
20:18 shadowpaste "jdurand_" at 217.168.150.38 pasted "action on a nullable" (24 lines) at http://fpaste.scsys.co.uk/463277
20:19 jdurand_ Another question, I admit I do not remember very well, but ok: is Marpa::R2 suppose to be able to trigger an action on a nullable ? I wonder is the example paster upper is a nice example
20:19 jdurand_ The output is:
20:19 shadowpaste "jdurand_" at 217.168.150.38 pasted "action on a nullable: output" (22 lines) at http://fpaste.scsys.co.uk/463278
20:21 jdurand_ "suppose" => "suppposed" - sorry for that
20:21 jdurand_ "supposed" grr - ok AFK & good night
21:47 RandalSchwartz joined #marpa
21:47 RandalSchwartz just skimming marpa docs while waiting for a compilation
21:48 RandalSchwartz could I use \z in an L0 to claim that this must match the end of string?
21:49 ronsavage joined #marpa
21:49 RandalSchwartz oops.. just missed that
21:49 RandalSchwartz could I use \z in an L0 to claim that this must match the end of string?
21:49 RandalSchwartz end_of_input ~ \z
21:49 RandalSchwartz I've done that in P::RD grammars before
21:57 ronsavage RandalSchwartz: AFAIK There is no provision for regexps to be used to specify lexemes. If it's just 1 string, you can tell Marpa how long the input is.
22:15 RandalSchwartz Hmm.   I was just trying to solve the problem of always having to check if the grammar parsed the whole string.
22:16 RandalSchwartz since there's a similar problem in P::RD grammars
22:27 ronsavage RandalSchwartz: No need for that check! Marpa issues an error if there are lexemes left over in the input stream, i.e. not recognized by the grammar. It's probably the commonest error people will ever see :-).
22:27 RandalSchwartz but if you want the program to notice it, you have to do that length dance
22:27 RandalSchwartz it'd be easier if it just returned "no match"
23:08 ronsavage RandalSchwartz: It does return that, in a complex string as part of an exception, which you're catching in a try{}catch{} block, right?
23:20 RandalSchwartz that's not what the manpage says...
23:21 RandalSchwartz ... https://metacpan.org/pod/distribution/Marpa-R2/​pod/Tutorial2.pod#Checking-for-a-premature-end
23:21 RandalSchwartz looks like you have to check the parse return against the length of the original string.
23:23 RandalSchwartz ahh... R->read() now has different semantics
23:23 RandalSchwartz that's confusing. :)
23:39 jeffreykegler joined #marpa
23:40 jeffreykegler jdurand: re http://irclog.perlgeek.de/m​arpa/2015-02-10#i_10093525 and following
23:41 jeffreykegler I call grammars that only accept the null string "trivial grammars".
23:41 jeffreykegler Yes, Marpa should work reasonably with trivial grammars.
23:42 jeffreykegler Inside Libmarpa, trivial grammars are special-cased, but this should be invisible to the user of either Libmarpa or Marpa::R2.
23:43 jeffreykegler And, yes, Marpa::R2 should trigger an action on a nullable.
23:48 jeffreykegler joined #marpa
23:48 * jeffreykegler is having Internet problems
23:49 jeffreykegler RandalSchwartz: re http://irclog.perlgeek.de/m​arpa/2015-02-10#i_10094161 -- \z will do nothing useful in a Marpa lexeme
23:51 jeffreykegler They are just character classes or strings of characters.
23:52 jeffreykegler If you really have an end of string that is important, you might consider adding a terminator to your input string, and recognizing it.
23:52 jeffreykegler Marpa's logic always assumes that you might want to extend an input string.
23:58 RandalSchwartz thanks
23:58 * jeffreykegler continues to have an Internet connection that is on-and-off

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