Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-09-20

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

All times shown according to UTC.

Time Nick Message
00:08 idiosyncrat Demat!
00:09 idiosyncrat I have Q's for the channel re another backward-incompatible change in Marpa::R3
00:10 idiosyncrat In Marpa::R3 parentheses on the RHS of a rule in the DSL will be used for grouping -- right now they hide the symbols from the semantics.
00:10 idiosyncrat I propose to make the new hiding semantics of the form "(- <xyz> -)"
00:11 idiosyncrat So that
00:11 idiosyncrat a ::= <b> (- c d -) e
00:11 idiosyncrat hides symbols <c> and <d>, but not symbols <b> and <e>
00:12 idiosyncrat Currently, in Marpa::R2, you'd write that as
00:12 idiosyncrat a ::= <b> ( c d ) e
00:12 idiosyncrat First Question: Any comments on the new syntax?
00:13 idiosyncrat Second Question: How to introduce it in Marpa::R3, the "hard" way or the "soft" way.
00:14 idiosyncrat The soft way is that I create one version which accepts both syntaxes: "(- <x> -)" and "( <x> )".
00:14 idiosyncrat Then, in the version after that I remove support for the 2nd, so that "( <x> )" is a fatal error.
00:15 idiosyncrat The "hard" way is to do both in the same version: allow "(- <x> -)" and make "( <x> )" a fatal error.
00:17 idiosyncrat ronsavage: I am particularly interested in your comments, especially on the 2nd, as I know you are tracking Marpa::R3 and it'll be you for whom the difference between the "hard" and "soft" ways has the most impact.
01:55 ilbot3 joined #marpa
01:55 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Code paste/run: https://f.perlbot.pl/#marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today - Youtube channel: https://www.youtube.com/channel/UCYKVfGBtfTqbs1JdYq-dc5g
02:09 ronsavage Firstly I suggest (# ... #) for hiding in, along the lines of hiding <=> commenting out and # <=> comment symbol.
02:11 ronsavage Ignore the 'in' there.
02:16 ronsavage Secondly, my initial reaction is to do it the hard way. Why: (1) "lexeme default= latm => 1" gets chopped anyway, right? (2) The event concept has changed. So rethinking the BNF will be required. I'd get the users to fix and forget the hiding 'v' grouping issue up front.
02:18 idiosyncrat Actually it's a fairly rote change.  Just find every "a ( b  ) c" on a RHS and change it to "a (# b #) c".
02:19 idiosyncrat It's also rote in the sense that if you miss something, you get a fatal message -- it's all hard fast failures if you miss a spot.
02:20 idiosyncrat Re: "(# b #)" vs "(- b -)".  Any other opinions?
04:50 ronsavage joined #marpa
04:53 ronsavage JFTR I changed all my 'pause => before' to 'pause => after', but I agree the changes are trivial.
05:17 ceridwen joined #marpa
07:41 ronsavage joined #marpa
08:24 koom joined #marpa
16:24 idiosyncrat joined #marpa
17:18 idiosyncrat ronsavage: I don't want to use '(# b #)' -- the hash sign is already used for comments.
17:20 idiosyncrat Technically, I could, while parsing, differentiate between the 2 uses.  But to my eye, it's potentially confusing and I just don't feel good about overloading the '#' sign in that way.
23:01 ronsavage joined #marpa
23:08 ronsavage OK. Forget the # sign suggestion.

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