Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-19

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

All times shown according to UTC.

Time Nick Message
02:57 jeffreykegler joined #marpa
02:58 jeffreykegler I've been working on using Marpa::R2 for search -- finding pattern specified in BNF.
02:58 jeffreykegler This is known in the literature as the "supersequence problem" -- I think the idea is that you're searching for a sequence of things embedded in something else.
02:59 jeffreykegler It turns out to be a fairly hard problem, but should be quite rewarding.
03:00 jeffreykegler In addition to the archetypal application -- a sort of grep/ack for BNF, it connects with things like error detection ...
03:01 jeffreykegler you treat the problem program as sequences of correct code embedded in a larger string of random stuff.
03:02 jeffreykegler Also connected is the idea of incremental parser development, where you have a codebase, but write the compiler gradually -- you can think of this as involving sn initial search for the sequences of code that you can compile OK so far.
03:03 jeffreykegler Anyway, this motivated a bunch of new features in Marpa::R2
03:04 jeffreykegler 1.) You will be able change lexeme priority dynamically.
03:05 jeffreykegler That's gives you an almost open-ended ability to modify your lexer on the fly.
03:06 jeffreykegler 2.) Parse exhaustion can be treated as an event, rather than thrown as an exception.  This elminates a minor nuisance for those who wanted more control over what happened when the parse was exhausted.
03:08 jeffreykegler 3.) If all lexemes are rejected, this can likewise be treated as an event.  I haven't tried it out, but this may allow you to use the Ruby Slippers technique into the SLIF.
03:08 jeffreykegler I have a working example of all this, and have done a few tests.
03:09 jeffreykegler So far it's only available on Marpa::R2's development branch.
03:10 jeffreykegler That's a lot to absorb I know -- I hope it will unleash imaginations.
03:37 CQ_ joined #marpa
03:45 sivoais Very cool! All great things to think about.
03:58 ronsavage Wow! Many things come to mind. (1) "involving sn initial search". What is 'sn'? (2) All this reminds me of the SO post http://irclog.perlgeek.de/marpa/2014-10-16#i_9517143.
04:00 ronsavage (3) Your point 2.) is fascinating. And (4) Ruby Slippers + SLIF => Ruby Slippers for the masses. Now you're really talk^H^H^H^H parsing!
04:00 jeffreykegler * "sn initial search" -> "an initial search"
04:00 ronsavage Ah!
05:40 ronsavage joined #marpa
06:59 lwa joined #marpa
12:57 flaviu joined #marpa
15:51 jeffreykegler joined #marpa
15:51 jeffreykegler I've uploaded a new developer's release: Marpa-R2 2.097_002
15:52 jeffreykegler Testing appreciated!
16:36 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "Finding general BNF targets in a lexeme salad" (202 lines) at http://scsys.co.uk:8002/433113
16:38 jeffreykegler I've just uploaded an example of using the recently added features for generalized BNF search -- that is, grepping with general BNF, instead of regular expressions.
16:38 jeffreykegler The example requires the lastest developer's release: Marpa-R2 2.097_002
16:39 jeffreykegler It has lots of comments, to try to explain things a bit.
16:40 jeffreykegler If someone is interested, or wants to help, they can find the part with the test strings, and try to devise a string that breaks the algorithm, in order to test it out.
16:41 jeffreykegler The strings are things like this: z}ab)({[]})))(([]))zz
16:41 jeffreykegler The grammar matches strings with balanced braces.  In the example above,
16:42 jeffreykegler these are ({[]}) and (([]))
16:43 jeffreykegler as running the example will show.
16:47 jeffreykegler The term "salad", and the idea of thinking of the search targets as being in a "salad" of lexemes comes from Michael Roberts
17:38 hobbs joined #marpa
17:38 flaviu joined #marpa
21:19 ronsavage Marpa::R2 V 2.097001. Test statistics:
21:19 ronsavage Fails: 0. Files: 214. Modules: 6. Passes: 6. Tests: 208.
21:19 ronsavage Duration: 41 seconds
23:18 jeffreykegler joined #marpa
23:18 jeffreykegler ronsavage: Thanks!

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