Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-01-18

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

All times shown according to UTC.

Time Nick Message
23:14 * jdurand happy, the grammar of Microsoft ASM 6.1 compiles ok under Marpa
00:58 jeffreykegler joined #marpa
01:02 jeffreykegler jdurand: Was that 2.079_009 you were talking about at 23:14 http://irclog.perlgeek.de/​marpa/2014-01-17#i_8135741
02:14 jeffreykegler I have uploaded a developer's version with the bug fix to Phase 1: Marpa-R2 2.079_010
02:15 jeffreykegler It's passes my tests on Linux on ARM and x86; and Darwin on PPC and passes the first wave of CPANtesters tests.
02:18 jeffreykegler It fixes bugs in the Leo logic.  Whether this was the bug that hit ronsavage I don't know, but I hope to find out soon-ish.
02:19 jeffreykegler left #marpa
03:33 jeffreykegler joined #marpa
04:59 jdurand joined #marpa
06:35 ronsavage joined #marpa
07:17 jeffreykegler joined #marpa
07:30 jeffreykegler left #marpa
07:30 LWA joined #marpa
08:32 ronsavage The problem I reported with V 2.079009 is fixed in V 2.079010
10:02 lucs joined #marpa
10:02 sivoais_ joined #marpa
10:40 jeffreykegler joined #marpa
10:42 jeffreykegler ronsavage: RE http://irclog.perlgeek.de/​marpa/2014-01-18#i_8136710 -- glad to hear it.
10:44 jeffreykegler This was a dreaded type of bug -- one that refused to show up except in complex examples.
10:52 jeffreykegler left #marpa
12:50 sivoais joined #marpa
13:29 LLamaRider joined #marpa
15:51 sivoais joined #marpa
15:51 LWA joined #marpa
15:58 sivoais joined #marpa
15:58 LWA joined #marpa
16:05 jeffreykegler joined #marpa
18:10 * jdurand is stupid, I lost 1/2 of the day because I wrote [sS] instead of [^sS]
18:11 jdurand Jeffrey, I have a question about inner grammars that are triggered by a pause
18:11 jeffreykegler Sure
18:11 jdurand Suppose that we have a pause on a predicted lexeme, not a pause before
18:12 jeffreykegler Right
18:12 jdurand then I trigger an inner grammar on the buffer at the current position
18:12 jdurand This inner grammar will not eat the full buffer, only a part of it
18:12 jeffreykegler An "inner" grammar means your own code?
18:12 jdurand but I do not know in advance how many characters
18:12 jeffreykegler Right
18:13 jdurand how to prevent read() to fail because it has not reached the end of the buffer
18:13 jdurand an inner grammar means that I execute a recce on another grammar
18:16 * jdurand is furious when reading official BNF that are simply wrong -; in this case M$'s
18:16 jeffreykegler One you've done the $slr->read() and paused, you're done with it.  From there on, you use resume()
18:17 jeffreykegler Official BNF was written when there was no Marpa, so they could live assured nobody would ever try to actually *run* their grammar.
18:17 jdurand but usually $slr->read() will say it failed because the inner grammar will try to eat as much as it can
18:17 jdurand until it reached a character that is not part anymore of it
18:17 jeffreykegler Oh, you mean the read for the inner grammar?
18:17 jdurand Yes
18:19 jeffreykegler I think if the parse is exhausted prior to the end of input, you can call value() anyway
18:19 jdurand The only way I see to get around it is to check what was the last expression successfully parsed. And if there is one, then we can get the position of the end of the inner grammar
18:19 jeffreykegler Right
18:19 jdurand last expression means: the rhs of the :start of the inner grammar
18:19 jdurand ok
18:20 jeffreykegler Yes, you have the answer.
18:20 jdurand Otherwise, I know you are not found of meta characters in the BNF, but...:
18:20 jeffreykegler I learn from bold new applications. :-)
18:21 jdurand Sure. Ok: because marpa is fundamentallw aware of two things: the notion of a character and the notion of the buffer containing the chahracters
18:21 jdurand and because marpa explicitely always tracks the newlines (Unicode definition; I know)
18:21 jeffreykegler Actually, some of my "lost" blog posts suggest meta-character tricks.
18:22 jdurand (Ah... tell me more -;) I presume that there are two meta-characters that could be easily implemented in marpa:
18:22 jeffreykegler Marpa's idea of newline is only for error reportings, I believe.
18:22 jdurand Ah...
18:22 jdurand Too bad; because I believe that the notions of:
18:22 jdurand beginning of line and end of line
18:22 jdurand could be a plus
18:23 jdurand the notion of end of buffer, this can be done with [^\s\S]
18:23 jeffreykegler I'm working on zero-length assertions.
18:23 jdurand Ha ha...!
18:23 jeffreykegler It is one of the motives behind the rewrite
18:23 jdurand I can guarantee you that this will be a major plus
18:23 jeffreykegler I expect so.
18:24 jdurand because zero-length assertions is like doing booleans
18:24 jeffreykegler Right.
18:24 jdurand and if booleans can be embedded in the grammar, then no need for external hook using pause
18:24 jeffreykegler Right, I know.
18:25 jeffreykegler With the rewrite, it's one of the use cases always in my mind.
18:25 jeffreykegler Right now you can cobble together a solution using nulling events.
18:25 jeffreykegler But speed would not exactly be blazing.
18:25 jdurand Excellent - you are in advance of user's expectations... Frankly, with the state that Marpa will have soon, I don't see any reason why not to get it spread - no problem for the speed
18:26 jdurand in perl, meta characters are also a speed bottleneck
18:26 jdurand I observed many time that using ^ or $ in regexp is a killer
18:26 jeffreykegler jdurand: the patience the programming community has with left parsing is a real tribute to human endurance. :-)
18:27 * jdurand is happy that Marpa is the first serious algorithm that I used for doing serious parsing
18:28 jdurand ok, let me tell you what I am doing and why
18:28 jeffreykegler Yes?
18:28 jdurand I got a case on Windows where MarpaX::Languages::C::AST is failing
18:28 jeffreykegler OK
18:29 jdurand and this is because of the inner ASM that Visual Studio is introducing
18:29 jdurand and then I looked to my grammar
18:29 jdurand and with no surprise because I knew that since I did it... ahem...
18:29 jdurand the GCC asm syntax, I'd done it from scratch and it is complete
18:30 jeffreykegler OK
18:30 jdurand the MS asm syntax, I copied it more of less from another BNF, that claimed it was not complete
18:30 jdurand and voila, of course: not doing it myself, boum
18:31 jdurand anyway, because of this case that nobody hitted, I decided to do the full MS ASM implementation
18:31 jeffreykegler The writers were probably not Marpa users, so would have had no way to test.  Whether that's an excuse or a double fault, I am not sure.  :-)
18:31 jeffreykegler MS ASM?  Wow.
18:32 jdurand and found the official MS ASM 6.1 on the net. Very good! But You will not believe what the errors are in this BNF
18:32 jdurand and MS ASM evolved since then
18:32 jeffreykegler I've studied a lot of BNF and I think I might believe. :-)
18:32 jdurand and you know what ? No other publication on that grammar! Never!
18:33 jdurand the only source of information is the msdn web site
18:33 jeffreykegler If your parser is recursive descent, you really have no use for accurate BNF.
18:34 jdurand I do not need to have a BNF with business logic, just something that parses the inline stuff
18:34 jdurand and I am near to get it -;
18:34 jeffreykegler OK.
18:35 jdurand when you look on the web, searching for ASM parsers, you will see this a very tiny world... Marpa will enter it hopefuly soon - will make a dedicated package for it
18:35 jdurand Voila
18:36 jeffreykegler Good.  (Though I must confess I do not run Windows myself, much less MS ASM :-) )
18:37 jdurand No pb - for the fun I tried to install the an ASM compiler on linux under Wine... because the only accurate information in addition to msdn is the "msasm32" package
18:37 jdurand (this is a true information, the "help" of this package is the only other source of trustable information)
18:37 jdurand and to my surprise...
18:38 jdurand Installs flawlessly - able to compile MS ASM on linux via Wine -; Oups...
18:38 jdurand Anyway, now you know what I am working on
18:38 jeffreykegler A thought that just came.  Another reason MS may not be sweating the last detail of the BNF ...\
18:39 jeffreykegler is that they do *not* want clones.  They sell this stuff, after all.
18:40 jdurand Sure
18:41 jeffreykegler Time for a break.  AFK.
18:41 jdurand ok
19:28 jeffreykegler left #marpa
21:55 * jdurand I largely underestimated MASM - so many ambiguities in this language... Trying to find an alternative for my C parser

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