Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-08-12

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

All times shown according to UTC.

Time Nick Message
00:00 ronsavage joined #marpa
01:52 ilbot3 joined #marpa
01:52 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
01:56 ronsavage Off-topic: I finally got a Perl program to generate an SVG with MouseOver for text fields, rectangles and (embedded) images. Happy day.
01:56 ronsavage Sample: http://savage.net.au/Flowers/Front.garden.layout.html.
04:46 simcop2387 joined #marpa
04:47 simcop2387 Marpa question, given a regex in some variable $foo, is it possible to use it as part of the grammar?
04:48 simcop2387 it's a weird request to make of a parser so i wouldn't be shocked if the answer is no.  I'm looking at making a DSL that'll include perl code also and want to use PPR or something like it to grab the perl code out of it.
04:49 simcop2387 the end result is to make something cleaner than this mess of a datastructure, https://github.com/perlbot/evalserver-async/blob/master/lib/App/EvalServerAdvanced/Seccomp.pm#L58
04:50 simcop2387 i can probably avoid it if needed but Parse::RecDescent seems like it can take a regex like that.  But Marpa has some other modules out there that might be useful for doing stuff, like parsing common stuff out of C headers which would also be useful for this DSL
04:54 idiosyncrat joined #marpa
04:55 idiosyncrat simcop2387: re https://irclog.perlgeek.de/marpa/2017-08-12#i_15004432 -- No, but perhaps yes.
04:56 idiosyncrat You can use external lexing, and use the Perl regex in the code.
04:58 idiosyncrat This won't give you Marpa's ability to handle non-determinism -- that is your external lexer will be (unless you do some very fancy hacks) determnistic, but this is OK in many grammars.
04:58 simcop2387 hmm ill take a look.
04:59 idiosyncrat Also, if the regex is actually an regular expression, it can rewritten in BNF and becomes a Marpa lexeme.
04:59 simcop2387 i mostly want to avoid having to depend on multiple parsers
05:00 simcop2387 not possible to rewrite the regex like that i bet.  PPR is a convoluted fancy thing for parsing perl and uses weird perl regex only stuff to do it
05:01 idiosyncrat Marpa's value added would be recognizing the context in which your regex is acceptable, and making it easier to write it's "framework".
05:02 idiosyncrat PPR?  PPI?
05:02 simcop2387 yealots to think about.  the language itself i think will be really easy, it ends up generating an eBPF program for seccomp
05:02 simcop2387 no, PPR, its like PPI though
05:03 idiosyncrat PPR.  Interesting.  I don't know it.  Is it on CPAN, or what?
05:04 simcop2387 yep on cpan, its fairly new and crazy.
05:04 simcop2387 perlbot: -m PPR
05:04 perlbot simcop2387: Your documentation is available at:  https://p3rl.org/PPR
05:06 idiosyncrat I've long felt Marpa would be a better way to do PPI and probably think the same thing about PPR.
05:07 idiosyncrat In any case, good luck!  I hope I was helpful.
05:07 idiosyncrat Good night!
05:07 idiosyncrat left #marpa
07:40 ronsavage joined #marpa
13:13 lucs joined #marpa
19:07 jdurand joined #marpa
19:17 jdurand Re https://irclog.perlgeek.de/marpa/2017-08-12#i_15004432 - when wou say $foo, you meant the stringification of the regexp, i.e. with encldoing (?^:...) - that are very perl specific
19:18 jdurand ok, regardless of this subtility, the inner part of this stringification is likely to be accepted as-is by MarpaX::ESLIF, another DSL largely based on Marpa::R2, and sharing the use of the very low-level libmarpa
19:53 perlbot jdurand pasted a new file at https://f.perlbot.pl/p/n8vzm3 - take care: this is a PCRE2 regexp
21:33 idiosyncrat joined #marpa
22:48 ilbot3 joined #marpa
22:48 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
23:06 ronsavage joined #marpa
23:12 sivoais joined #marpa
23:28 ronsavage simcop2387: Have you considered writing a parser which reads the source code of PPR and converts the regexps into Marpa's DSL!?
23:29 simcop2387 lol
23:29 simcop2387 the tokenization i think would be easy, turning it into the proper rules is gonna be the hard part there

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