Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-11-20

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

All times shown according to UTC.

Time Nick Message
00:31 ronsavage joined #marpa
02:01 Idiosyncrat joined #marpa
06:52 ronsavage joined #marpa
08:55 black_ant joined #marpa
11:01 VsyachePuz Idiosyncrat: I think that Earley have a good potential for incremental parsing, but want to learn more on that :)
12:02 black_ant joined #marpa
12:07 black_ant joined #marpa
12:41 black_ant joined #marpa
12:45 black_ant joined #marpa
16:21 JPGainsborough joined #marpa
20:56 ronsavage joined #marpa
21:39 JPGainsborough joined #marpa
22:16 Idiosyncrat joined #marpa
22:17 Idiosyncrat VsyachePuz: when it comes to incremental parsing, what you'd be doing is more inventing than learning.
22:17 Idiosyncrat I have uutlined some stuff under the name of "strand parsing", but it's untested pseudo-code.
22:18 Idiosyncrat One approach is to build the AST in pieces, and fit the pieces together.
22:19 Idiosyncrat (My mental picture of this being like DNA fusion is why the term "strand parsing")
22:20 Idiosyncrat Using Marpa's left-eideticism, you know exactly what a parse is looking for at its left edge, and you can use this to create a suffix grammar and to piece the results together.
22:22 Idiosyncrat This opens the way to *true* combinator parsing -- what goes under that name is top-down parsing, and the parser is of no assistance in making sure the various pieces being combined are composable ...
22:22 Idiosyncrat if you are lucky they are, if not, they are not.
22:23 Idiosyncrat Marpa pieces are already composable -- if you've got BNF for something in one grammar, you can copy and paste into another, and expect the combination (modulo lexing considerations) to work
22:24 Idiosyncrat But Earley/Marpa-powered incremental parsing is pretty much new ground --
22:25 VsyachePuz i have an use-case for combination (syntax highlighting for something different inside html in editor, embedded svg for example), but don't care it now
22:25 Idiosyncrat "care it now"?
22:25 VsyachePuz don't care _about_ it now
22:26 Idiosyncrat Once someone does have a use case they care about ...
22:26 Idiosyncrat that's a good way to advance the work on incremental parsing.
22:27 VsyachePuz i don't see a relation between incrementality property and combination property  of parser
22:28 Idiosyncrat Well, start with the idea that incremental means assembling pieces.  OK so far?
22:28 VsyachePuz and incrementality seems to be is more important for me
22:28 VsyachePuz incremental means minimising computations during editing
22:28 Idiosyncrat Huh?
22:28 VsyachePuz i mean in my use cases
22:29 VsyachePuz i have some parsed text, then edit it, and reparsing should be done on the fly
22:29 Idiosyncrat Arbitrary edits?
22:29 VsyachePuz yes, text editor with syntax highlighting
22:30 Idiosyncrat Oh, OK, I see the use case.
22:30 Idiosyncrat Yes, when I talk about incremental, I mean left-to-right, but in pieces.
22:31 Idiosyncrat That seems to be different from what you are looking for.
22:32 VsyachePuz Idiosyncrat: earley have each position marked. When i distort the text, i can immediately see what i need to recompute
22:32 Idiosyncrat Yes, I get the idea.
22:33 Idiosyncrat So you modify a range, then find a subtree that includes that text range.
22:33 Idiosyncrat Throw away the current subtree, parse a new one, and reinsert.
22:34 Idiosyncrat One problem I see --
22:35 Idiosyncrat is that small edits can have massive conseqences, far beyond a minimal enclosing subtree.
22:36 Idiosyncrat Imagine adding a pair of curly brackets for example -- }{
22:37 Idiosyncrat The whole structure of the program might change
22:38 Idiosyncrat Or in Perl you've got a long curly bracketed expression, currently treated as a code block --
22:38 Idiosyncrat Add a '+' in front, and it become IIRC a hash initializer.
22:43 VsyachePuz in the worst case these consequences are not worse than reparse anything from scratch
22:45 Idiosyncrat joined #marpa
22:51 VsyachePuz and probably, the editor can tolerate long reparse time, if reparsing is done in another thread. Because earlier the syntax of the rest of program was correct, it maybe restored soon by typing more characters
23:58 ronsavage joined #marpa
23:59 rsavage joined #marpa
23:59 rsavage left #marpa

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