Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-02-11

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

All times shown according to UTC.

Time Nick Message
00:47 idiosyncrat_ joined #marpa
03:33 ronsavage joined #marpa
05:56 kkrev joined #marpa
05:59 shadowpaste "kkrev" at 217.168.150.38 pasted "custom format" (4 lines) at http://fpaste.scsys.co.uk/505248
06:00 kkrev I have a mess of custom data files I'm trying to parse that use about 800 different "tags" to bracket data. So there's 800 different variations on the string 'BlahBlahBlah' in the paste.
06:01 kkrev I'm a bit lost on how to capture all the different begin/end tags (sometimes in nested structures) without iterating the 800 different tag strings. I just want the tag name with the contents as strings. Well to start with anyway. Some subset I'll parse further.
06:04 kkrev I'm hoping there's a better answer than do the pause lexeme thing on 'Begin'.
06:13 kkrev I'm especially reluctant to simply iterate all the known begin/end tag types because the list will certainly grow.
06:31 ronsavage kkrev: Hi. If they all start and end with Begin $name\n(.+\n){1,}End $name, then no matter how nested, Marpa will surely do it. You don't need to spell out every $name. Just ask Marpa to tell you the names ;-). It's 17:30pm here now and I'm just going out for a while. I might play with this when I get back. Also, see our homepage for many Perl modules.
07:29 VsyachePuz_ I want an AST-based transformation processor (like XSLT, but for another grammar than XML). Is such thing exist?
07:30 VsyachePuz_ Engines like Razor and T4 don't understood syntax of underlaying text
07:30 VsyachePuz_ (they parse only their own markup)
07:47 VsyachePuz_ "all templating languages produce spaghetti code" (c) http://www.workingsoftware.com.au/page/Your_​templating_engine_sucks_and_everything_you_h​ave_ever_written_is_spaghetti_code_yes_you
11:01 kaare_ joined #marpa
12:22 kkrev joined #marpa
15:35 kkrev ronsavage: I don't know how to do the equivalent of "$name" with the scanless grammar interface. I don't see any examples where a token is dynamically captured and re-used later in a match (I'm sure that's incorrect terminology). I mean, I know how to do it with regex, but not the marpa grammar syntax.
16:26 kkrev joined #marpa
16:26 kkrev http://stackoverflow.com/questions/35​344196/matching-arbitrary-delimiters
18:50 maybekoo5 joined #marpa
18:54 idiosyncrat_ joined #marpa
18:55 idiosyncrat_ VsyachePuz_: re http://irclog.perlgeek.de/m​arpa/2016-02-11#i_12023330 -- a very interesting idea.
18:56 idiosyncrat_ Yes, Marpa does offer the opportunity to create templating languages which can also parse the underlying text.
18:56 idiosyncrat_ kkrev: re http://irclog.perlgeek.de/m​arpa/2016-02-11#i_12025722
18:57 idiosyncrat_ This certainly should be doable, but it will require either events or post-processing.
18:58 idiosyncrat_ I say a bit more in a comment on your stackoverflow post: http://stackoverflow.com/q/35344196/1679046
19:22 choroba joined #marpa
21:35 ronsavage joined #marpa

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