Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-04-05

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

All times shown according to UTC.

Time Nick Message
01:37 VsyachePuz joined #marpa
01:40 VsyachePuz idiosyncrat: Hello, how to implement operation of matching something except pattern? https://github.com/patrickhuber/Pliant/issues/75
01:48 ilbot3 joined #marpa
01:48 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Code paste: 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 - Youtube channel: https://www.youtube.com/channel/UCYKVfGBtfTqbs1JdYq-dc5g
02:09 idiosyncrat joined #marpa
02:10 idiosyncrat VsyachePuz: re https://irclog.perlgeek.de/marpa/2017-04-05#i_14376845 -- I take it you mean the complement operator ("-") referred to by your link?
02:11 idiosyncrat At the G1 level there's no general way to do it -- the context free languages are *not* closed under complement.
02:11 idiosyncrat That is if L1 and L2 are both BNF grammars, it is not necessarily possible to write L1 - L2 in BNF.
02:13 idiosyncrat Various tricks might work for special cases in Marpa::R2 -- if anybody has done anything here, perhaps you'd want to point VsyachePuz to it.
02:14 idiosyncrat In Marpa::R3, I might do something at the lexer L0 level.  That is also using full-context-free, but since it's just being used as a lexer, some tricks might work.
02:14 idiosyncrat VsyachePuz: I hope that's responsive to your question.
02:15 VsyachePuz idiosyncrat: yes, you properly understood what i want, but it didn't advance me
02:18 VsyachePuz now I want full list of tricks :) I found also some related answer - http://stackoverflow.com/a/31644728/6017919
02:51 idiosyncrat Vsyache: I don't know if anybody *has* any helpful tricks.  I recall the issue being discussed before.
02:52 idiosyncrat Btw, the stack overflow answer is even more bad news.  Special cases of BNF *could* help you if they described regular expressions.  So how do you tell if your BNF describes a regular expression?  Answer: you can't, it's undecidable.
03:19 VsyachePuz idiosyncrat: I can. I will use W3C EBNF style (https://www.w3.org/TR/REC-xml/#sec-notation). They move this responsibility from parser to human. Humans should mark rule names with case - "Symbols are written with an initial capital letter if they are the start symbol of a regular language, otherwise with an initial lowercase letter."
05:49 sirdancealot joined #marpa
05:54 sirdancealot joined #marpa
06:52 VsyachePuz idiosyncrat: Is CYK algorithm can be adopted to implement this operation? If yes, then is there some unified algorithm between CYK and Earley, which reorders operations of CYK to get closer to Earley's efficience?
07:50 sirdancealot joined #marpa
09:40 idiosyncrat VsyacheP:uz: Not to my knowledge, although since you're talking of adaptations, I can't say with 100% certainty that you couldn't adapt CYK to do complement.
09:42 idiosyncrat Could you also find a variant of CYK that's as fast as Marpa?  All I can say is that I chose to spend the last decade trying to improve Earley's instead of CYK, so my guess is pretty obvious.
09:45 idiosyncrat My own approach to tackle complement would be to try to enhance Marpa using special rules for both LHS and RHS, priorities, and events.
09:45 idiosyncrat That you could do that, and preserve Marpa'
09:46 idiosyncrat s other advantages seems to me likely, at least in many (most?) practical cases, but without a chance to work it out, I couldn't say for sure.
09:49 idiosyncrat Good night (morning)!
10:07 sirdancealot joined #marpa
15:14 jdurand joined #marpa
15:16 jdurand VsyachePuz: this is possible using a sophisticated ASF implementation. I did it on top of marpa,  but à the C level.
15:22 VsyachePuz jdurand: what is ASF (google says it is audioformat) ?
15:22 VsyachePuz Forest ?
15:34 lucs VsyachePuz: Yes, for example: https://metacpan.org/pod/distribution/Marpa-R2/pod/ASF.pod
17:45 idiosyncrat joined #marpa
17:47 shadowpaste "idiosyncrat" at 217.168.150.38 pasted "Marpa donate button for sidebar" (15 lines) at http://fpaste.scsys.co.uk/557784
17:51 shadowpaste "idiosyncrat" at 217.168.150.38 pasted "Marpa donate button for main <div>" (13 lines) at http://fpaste.scsys.co.uk/557785
17:53 idiosyncrat joined #marpa
17:54 idiosyncrat I've just added Marpa donate buttons to my Marpa web page: https://jeffreykegler.github.io/Marpa-web-site/
17:54 idiosyncrat I isolated the HTML I use and have just shadow-pasted it to this channel.
17:55 idiosyncrat I *hate* pages which hit you with the donate thing immediately, as if their great fear in life is that someone will be something for free.
17:56 idiosyncrat But I did want prominent placement -- that is, I wanted it to be impossible for anyone to have seriously looked the page over, and *not* noticed at least one of the buttons.
17:59 idiosyncrat s/be something for free/get something for free/
18:32 jdurand joined #marpa
18:33 jdurand Re https://irclog.perlgeek.de/marpa/2017-04-05#i_14380534 - will add that to my POD of ESLIF, in the =for html -;
18:34 jdurand VsyachPuz: indeed, this the forest tree - the idea is simple:
18:35 jdurand if you want to write an exception, let's phrase it like that: X ::= A - B
18:35 jdurand which is translated to two rules: X::= A | B
18:35 jdurand If the ASF traversal have callbacks allowing to reject rules and or symbols, you are done
18:36 jdurand The C implementation is documented here: https://github.com/jddurand/c-marpaWrapper#marpawrapperasfvalue_valueb
18:36 jdurand and this will be available natively in my MarpaX::ESLIF package that I am currently deploying
18:37 jdurand The later being at https://github.com/jddurand/c-marpaESLIF, it has a different BNF than Marpa::R2, although very inspired from it, c.f. https://github.com/jddurand/c-marpaESLIF/tree/master/doc/BNF
18:40 hobbs joined #marpa
20:11 ceridwen joined #marpa
21:24 choroba joined #marpa
22:31 ronsavage joined #marpa

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