Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-02-18

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

All times shown according to UTC.

Time Nick Message
00:57 jeffreykegler joined #marpa
03:10 ronsavage joined #marpa
03:32 jeffreykegler I've just uploaded 2.080000, a new indexed version, to CPAN.  It's a big change, internally, since the last indexed version, which was uploaded on Xmas day.
03:34 jeffreykegler By intent, it is 2.079_015, its release candidate, with only the version # changed.
03:35 jeffreykegler While LATM (forgiveness) is in this indexed release, the documentation updates and changes to defaults currently under discussion are not
03:38 jdurand joined #marpa
03:38 jdurand jeffreykegler: many thanks for this major release
03:39 jeffreykegler jdurand: Many thanks for your support ...
03:39 jeffreykegler and many thanks to the rest of the Marpa community
04:03 jdurand I tried with a start rule that is not the real top rule of a grammar, hitting "A lexeme in lexer L0 is not accessible from the G1 start symbol" - grammar has forgiving - As far as I remember this is normal, this was a dev in suspend is'nt it
04:05 jeffreykegler judrand: yes -- it's in the Github issues list -- I was waiting for a use case ...
04:05 jdurand ah ok -; my turn then - no pb
04:06 jeffreykegler there are tricky issues of definition here, which is why in this particular case I really do want to see the intended use
04:06 jeffreykegler A lexeme might not be accessible in G1 ...
04:07 jeffreykegler but it might also not even be defined in G1.  Do I treat the two cases differently?
04:07 jeffreykegler Also, what happens which I encounter such a lexeme in the input?  What do I do?
04:10 jdurand case 1: IMHO a lexeme in L0 not accessible in G1 should make the G1 rule inaccessible
04:10 jdurand case 2; a lexeme not defined in G1 should be ignored as if not writen in the grammar
04:11 jdurand case 3; if case 1 error, else if case 2 n/a
04:11 jdurand I am writing a small test case
04:12 jdurand oups: case 3: n/a because G1 becomes inacessible
04:13 jdurand this would be applied only if forgiving => 1. But perhaps you might want finer grained granulatity with a forgiving adverb at G1 level (?)
04:14 jeffreykegler jdurand: actually in the NAIF there is an 'inaccessible_ok' named argument -- I'd turn that into a SLIF adverb ...
04:15 jeffreykegler rather than overload the forgiving adverb with this matter -- the relationship between the two is not really straightforward.
04:16 jeffreykegler With LATM we were talking about lexemes well defined in the grammar, which happen to occur in the wrong place in the input.
04:17 jeffreykegler With inaccessibility, we are talking about issues of declaration in the G1/LO grammars, and consistency between them.
04:17 jdurand Sure - inaccessible_ok is perfect for the G1
04:18 jdurand for the pure lexeme issues, I'll push test cases
04:19 jeffreykegler Re an inaccessible_ok lexeme actually showing up in the input -- I'm inclined to keep this as a fatal error -- it always has been ...
04:20 jeffreykegler it's a lexeme about which the user has made no clear statement of his intent -- what did he mean to do with the thing?  Silently discarding it would seem to violate the principle of least surprise.
04:20 jdurand in NAIF inaccessible_ok was for G1 or G0 or both ?
04:21 jeffreykegler In the NAIF there was no G1 or G0
04:21 jeffreykegler Just a grammar and you wrote your own lexer
04:21 jdurand Sure... I'd map that to G1 if you don't mind -;
04:22 jeffreykegler Yes, if I understand what you're saying, you could think of the NAIF grammar as analogous to G1 ...
04:22 jdurand I am enclined to say that if a lexeme has both inaccessible_ok => 1 and forgiving => 1 then it can be discarded
04:22 jeffreykegler and your custom-written lexer as analagous to L0
04:23 jdurand ./.. if it is inaccessible in the grammar
04:24 jeffreykegler jdurand: that's not really a conceptually related use of "forgiving", which is about LATM.  Unacceptable != inaccessible.
04:24 jdurand ./.. yes I was writing an errata
04:25 jdurand why, if a lexeme would have inaccessible_ok => 1, do you think if would cause a problem if discarded from the grammar
04:26 jeffreykegler The "inaccessible ok" lexeme has no semantics defined for it, and discarding is one kind of semantics.
04:26 jdurand ok
04:26 jeffreykegler If you want to discard a lexeme, you can say so.
04:27 jdurand I propse to let others think about it, if they dare
04:28 jeffreykegler Lots of systems get so much into "do what I mean", they become harder to use ...
04:28 jeffreykegler They try to second-guess what you really meant, so that it becomes very hard to understand why they are doing what they do ...
04:29 jeffreykegler I *do* try to put DWIM-ish magic into Marpa, but I am wary of over-doing it.
04:29 jdurand My a priori idea would be to have such semantic attached to inaccessible_ok => 1, i.e. silent discard when not accessible. This looks like a "do what I say" don't you think
04:30 jeffreykegler Inaccessible symbols have been those, for example, for language extensions, you haven't written yet.
04:30 jeffreykegler There's no semantics because there is no semantics.
04:31 jeffreykegler And if you *do* find one in the input, that's a fatal error, because you're not set up to deal with it.
04:31 jeffreykegler Symbols you want discarded are easy -- you can just set them up to be discarded, and they aren't required to be accessible in G1.
04:32 jdurand IMHO the only applicable semantic is eventually discarding, default being fatal error
04:33 jeffreykegler I didn't follow that last
04:42 jdurand I updated the github issue - and understand this need thinking - at the last resort it is you that is deciding what is the best! Anyway, my use case from real life is: starting for a full grammar that has no problem
04:42 jdurand take a subset of it, change by changing the :start
04:43 jeffreykegler I got the update, and already it's helping me see what the goal is.  Let me study it and think for a bit.
04:43 jdurand Many thanks - and sorry if I have not beel clear enough since days - now you see what I meant
04:43 jdurand and the use case is: C grammar, which is big
04:44 jdurand via cpretty: cpretty would talke the C grammar as it is, with no change, except /one/ thing, the :start symbol
04:44 jdurand "not been"
04:44 jeffreykegler judrand: right, and cpretty, where you really do want (at least in effect) multiple "starts".
04:45 jdurand exact, it would be even greater is :start can have alternatives
04:45 jdurand "if :start" ... grrrr
04:47 jeffreykegler jdurand: this is perhaps a classic case of legitimate (that is, non-error) use of inaccessible symbols -- you want to parse a subset of a larger grammar, and it's convenient to just redefine the start and tell Marpa to just ignore the rest of it.
04:48 jdurand jeffreykegler: yes, that is exactly my point and unique use-case I was interested in
05:56 rns_ joined #marpa
06:12 rns_ Marpa::R2 2.080000 installed successfully on winxp (5.18.1, msvc 2003), cygwin (5.14.2 gcc 4.8.2), and win7 (5.18.2, msvc 2010) and runs my code just fine.
06:23 ronsavage I can't see 2.080 on MetaCPAN yet. I'll re-check soonish.
08:03 ronsavage Marpa::R2 V 2.08
08:03 ronsavage Counts: Tests: 542. Modules: 8. Passes: 8. Fails: 0
08:03 ronsavage Duration: 1 minute and 35 seconds
15:13 LLamaRider joined #marpa
17:24 jeffreykegler joined #marpa
18:51 jdurand joined #marpa
23:07 ronsavage joined #marpa
23:41 jeffreykegler joined #marpa
23:41 jeffreykegler rns: ronsavage: thanks!

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