Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-02-05

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

All times shown according to UTC.

Time Nick Message
00:45 Cheery joined #marpa
01:58 koo7 joined #marpa
02:00 Idiosyncrat joined #marpa
02:13 sivoais joined #marpa
02:23 sivoais joined #marpa
02:33 sivoais joined #marpa
02:46 sivoais joined #marpa
02:48 ilbot3 joined #marpa
02: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
03:30 jdurand joined #marpa
03:31 jdurand Re http://irclog.perlgeek.de/marpa/2016-02-04#i_11985948 - isn't it natively supported using high_rules_only and a systematic decreasing rank over all the alternatives?
03:37 Idiosyncrat jdurand: good point.
03:38 Idiosyncrat I haven't thought it out, but you might be able to do it that way.
03:39 Idiosyncrat And, if you're right, that makes it even faster.
03:42 jdurand At least this is how MarpaX::Languages::SQL2003::AST is built: I took the grammar from Ron' pages and digested it to generate a "PEG"-like SLIF, c.f. the __DATA__ section in https://metacpan.org/source/JDDPAUSE/MarpaX-Languages-SQL2003-AST-0.005/lib/MarpaX/Languages/SQL2003/AST.pm
03:42 jdurand which makes SQL parsing non-ambiguous obviously
03:48 Idiosyncrat I should have suspected this is something you've already done. :-)
03:48 Idiosyncrat Is the code that generated the grammar anywhere?
03:50 jdurand https://metacpan.org/source/JDDPAUSE/MarpaX-Languages-SQL2003-AST-0.005/etc/bnf2marpa.pl
03:52 jdurand It takes BNF-of-SQL's-BNF, uses Marpa to get an AST of the SQL grammar, and generates the Marpa's BNF from this AST -.
03:54 Idiosyncrat So this would basically be my Marpa+PEG idea, already implemented?  Nice.
03:55 Idiosyncrat Was the result, as I expected, WYSIWYG -- that is, PEG, except you actually get what you'd expect from the spec?
03:57 jdurand Lol -; the SQL bnf has some hooks that I introduced to "force" the nature of some rules. Almost like SAL hints (you remember the /*+ ... */ hints?) - For example I introduced the /*LEX*/ hint in BNF
03:58 jdurand what do you mean by a What You See Is What Your Get
03:59 jdurand The result is what I expected sure -; a guaranteed non-ambiguous grammar in any case
04:01 Idiosyncrat So bnf2marpa.pl could be turned in Marpa+PEG == Cheville?
04:01 * Idiosyncrat thinks that Cheville is French for "peg"
04:03 jdurand Well -; "cheville" context in french will not be understandable in this context - "peg" word remain and should be used even in french -)
04:04 Idiosyncrat On the other hand, it really needs a new name, because you can't take a PEG spec and run in Marpa+PEG and get the same result.
04:05 Idiosyncrat Ironically, if you take your first draft of the PEG spec, Marpa+PEG is more likely to produce what you want than native PEG.
04:06 jdurand Yes. Anyway taking a Marpa's AST of a marpa grammar can be turned into a PEG-nature quite easily IMHO - just a matter of adding a systematic "rank => decreasing_number" at every alternative - remember my proposition of "autorank" one upon a time
04:06 Idiosyncrat Yes -- which was a good idea ...
04:06 jdurand "once upon a time" === "sometime in the past" -;
04:07 Idiosyncrat but I didn't implement it because of backward compatibility.
04:08 Idiosyncrat My take is that "cheville" is pronouned like the English car name "Chevy", except the accent is on the 2nd syllable.
04:08 jdurand Introducing a hook in Marpa to just externalizing the internal AST tree before using it could do it - this would alleviate very much the need to do introspection of the grammar
04:08 Idiosyncrat s/pronouned/pronounced/
04:09 jdurand "to just externalize"
04:09 Idiosyncrat Before doing anything so drastic to Marpa::R2, I'd want to fork it.
04:10 Idiosyncrat Either to a Marpa::R3 or a Marpa::R2D2.
04:10 jdurand Sure
04:11 Idiosyncrat An alternative is for someone to take some popular, simple PEG interface and implement it as a layer on top of Marpa::R2.
04:13 Idiosyncrat I brought this up because it's my perception that folks out there find the PEG interface enticing ...
04:13 Idiosyncrat so much that for years they've put up with the fact that the underlying algorithm does not really deliver what the spec suggests that it will.
04:14 Idiosyncrat So this might be a way of bringing new folks into the Marpa universe.
04:16 Idiosyncrat A good test of that will be to see who finds this discussion interesting :-)
04:16 jdurand Yes - I was googling for production-ready PEGs - not so easy to find
04:17 jdurand Ah -; https://github.com/PhilippeSigaud/Pegged/wiki/Grammar-Examples
04:18 jdurand https://github.com/azatoth/PanPG/tree/master/grammars - damned there is ecmascript-5 -;
04:19 jdurand json is the easiest, 'cause very small
04:21 Idiosyncrat Is Pegged self-parsing?
04:23 jdurand dunno
04:27 jdurand When I see the grammars I say to my self: what about adding / as a rule separator in Marpa ? Semantic difference between | and / would that / implicitely autoranks
04:27 Idiosyncrat PEG's core grammar IIRC does not vary a lot, although all sort of extensions get added to it, things we don't need.
04:27 Idiosyncrat jdurand: very good idea!!!
04:28 jdurand ----; - okay sorry I have to go AFK - 5h30am here in west of europe - have a nice evening - cheers
04:28 Idiosyncrat Good night or morning :-)
04:42 Idiosyncrat http://piumarta.com/software/peg/
04:42 Idiosyncrat This looks like a fairly standard PEG implementation.
04:45 Idiosyncrat And of course, there's the syntax from Ford's original paper: http://www.brynosaurus.com/pub/lang/peg.pdf
04:47 Idiosyncrat It's only 10:45PM here in CA, but ...
04:47 Idiosyncrat good night, all!
11:13 lucs joined #marpa
11:31 kaare_ joined #marpa
15:11 koo7 joined #marpa
16:02 btyler_ joined #marpa
16:10 VsyachePuz_ joined #marpa
16:21 Pursuit joined #marpa
18:00 Idiosyncrat joined #marpa
19:26 choroba joined #marpa
19:54 JPGainsborough joined #marpa
22:04 Idiosyncrat joined #marpa
22:39 sivoais joined #marpa
22:49 Idiosyncrat joined #marpa
23:21 Idiosyncrat joined #marpa

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