Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-09-12

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

All times shown according to UTC.

Time Nick Message
00:01 jeffreykegler joined #marpa
01:16 jeffreykegler For the information of those with fixes in the Marpa::R2 queue --
01:18 jeffreykegler my current top priority is the new top-level method $slr->parse() -- this is because I left the docs half-converted on the master branch, so I've got a master branch is further away from release-ability than I like.
01:18 jeffreykegler Otherwise even minor bug fixes would be taking priority for the new feature.
01:19 jeffreykegler I hope to get to your issues and pull requests in a couple of days.
01:19 jeffreykegler * for the new feature -> over the new feature.
04:26 rns joined #marpa
04:54 rns re http://irclog.perlgeek.de/​marpa/2014-09-12#i_9339945 — parse() is the priority, no question — I've been using it and worked great for me; some suggestions are on the mailing list — https://groups.google.com/d/msg/mar​pa-parser/ahuXdEy8zHg/u4E1nb2Ci8YJ
05:03 jeffreykegler joined #marpa
05:03 jeffreykegler It's late here -- AFK
05:04 rns Good night.
05:04 jeffreykegler rns: Good night
05:09 ronsavage joined #marpa
06:11 shadowpaste "ronsavage" at 124.170.35.156 pasted "How do I get utf8 output from Marpa?" (246 lines) at http://scsys.co.uk:8002/423010
06:13 ronsavage http://scsys.co.uk:8002/423010. Q: (1) How do I get Marpa to give me back exactly the same utf8 string as input, in the same format? (2) Why does Marpa accept some utf8 strings (case 4 & 6) but not others (case 8)?
06:13 ronsavage AFK
06:28 rns re (2) — case 8 passes by adding unquoted string (+| string) alternative to statement rule
06:34 rns re (1) — Data::Dumper seems to be broken, YAML's Dump method outputs correct utf8 text — https://gist.github.com/rns/5d80e75e1dc0d3b7b163
07:03 ronsavage joined #marpa
07:07 lwa joined #marpa
07:37 ronsavage rns: Thanx for the analysis. (1) OK, but is not consistent with the docs for the original (Graphviz) grammar, but I can document it. (2) Wow! It simply did not occur to me that Data::Dumper was at fault.
08:18 rns re (1) well, that looked expected somewhat because both quoted and unquoted versions of the string were given to the parser in cases 7 & 8. Or am I misinterpreting?
09:41 ronsavage I deliberately tried quoted and unquoted strings to max the samples provided, not to imply I really wanted the code to handle them :-)
09:45 ronsavage joined #marpa
09:57 rns :)) Got it.
15:03 jeffreykegler joined #marpa
15:20 jeffreykegler Btw, just to make clear, and sorry if I was misleading --
15:21 jeffreykegler I don't plan to make a systematic or comprehensive comparison of Marpa w/ other parsing tools.
15:21 jeffreykegler I comment on other parsing tools only as seems necessary --
15:22 jeffreykegler the reason is that authors of one tool are (quite rightly) seen as biased -- after all I've spent the last 7 years of my life on Marpa --
15:23 jeffreykegler I try to be accurate, insightful, fair and honest, but nobody can imagine I am objective.
15:24 rns Sure, point taken, thanks for explaining it.
15:32 jeffreykegler I have started making more direct comparisons of Marpa w/ yacc, RecDescent than I have in the past, because it seems useful and helpful, and I will continue to do that
15:33 jeffreykegler and I think the reception of "Parsing: a timeline" shows that kind of comment from me can be well taken.
15:34 rns Yes. I, for one, do remember posts comparing Marpa and regexes, with code examples, clear and to the point.
15:34 jeffreykegler rns: Thanks.
15:36 rns It's Friday evening here, I have to go AFK until tomorrow morning. Have a nice day.
15:38 rns AFK
15:38 rns left #marpa
18:03 lwa joined #marpa
18:05 jeffreykegler joined #marpa
18:36 lwa_ joined #marpa
19:22 idiosyncrat joined #marpa
20:03 kkrev joined #marpa
20:06 kkrev Noob question: how do you go about matching any sort of number  (scientific, decimal, negative, integer, rational) and producing a complete string?
20:07 shadowpaste "kkrev" at 50.190.12.218 pasted "parsing numbers?" (10 lines) at http://scsys.co.uk:8002/423120
20:27 idiosyncrat joined #marpa
20:28 lwa kkrev: There's a difference between ordinary grammar rules declared with "::=" and lexemes or scanner rules declared with "~". You want the latter.
20:31 kkrev It's not just a matter of replacing ::= with ~ though because that produces errors. I don't know how to proceed.
20:38 idiosyncrat Jean-Damien has an example here: http://cpansearch.perl.org/src/JDDPAUSE/M​arpaX-Languages-ECMAScript-AST-0.018/lib/​MarpaX/Languages/ECMAScript/AST/Grammar/E​CMAScript_262_5/Lexical/NumericLiteral.pm
20:39 idiosyncrat What you want is his __DecimalLiteral which is about halfway through his grammar.
20:40 idiosyncrat ronsavage: "How do I specify a number?" might make a good FAQ.
20:49 kkrev I'm running 5.18.2 and stealing the relevant text from the ECMAScript example causes this: Can't find Unicode property definition "IsDecimalDigit"
20:59 idiosyncrat kkrev: Two suggestions: First, this may be one of the features you need to turn explicitly on, with "use 5.18.0" or  "use feature 'unicode_strings'" -- Marpa passes its character matches on to Perl and so depends on what the underly Perl is supporting.
21:00 idiosyncrat Second: translate them -- for example "IsDecimalDigit" to"[0-9]" (I'm not sure that's strictly Unicode correct, if that matters.)
21:04 lwa The "IsDecimalDigit" character class is *not Unicode*. Instead, this uses Perl's ability to define custom properties. This property is defined at https://metacpan.org/source/JDDPAUSE/MarpaX-Lang​uages-ECMAScript-AST-0.018/lib/MarpaX/Languages/​ECMAScript/AST/Grammar/CharacterClasses.pm#L488
21:05 kkrev Oh. I was scratching my head seeing no such things in the unicode standard. That explains that.
21:06 idiosyncrat lwa:Thanks for catching that.
21:13 kkrev Anyway, this matches more comprehensively but it still breaks up the component parts of the number into a list as it parses. As a total noob I don't understand how you specify a complex rule that should parse out a whole string. I want "0.11" and "1e+10" as the results, not a list of the component parts.
21:15 idiosyncrat Oops!   Forgot.
21:15 idiosyncrat You have to use "~" instead of Jean-Damien's "::=".
21:16 idiosyncrat The good thing about Jean-Damien's code is he's already done everything in the world.
21:16 idiosyncrat The bad thing is he uses a lot of trickery to do it. :-)
21:19 kkrev I still don't understand. If I replace various ::= with ~ in that code i get errors: A lexeme in G1 is not a lexeme
21:21 idiosyncrat kkrev: To determine what's a lexeme (that is, a token in between the G1 "::=" grammar and the L0 "~" grammar) Marpa examines the grammar
21:22 idiosyncrat A lexeme cannot be on the RHS of a L0 rule, or on the LHS of a G1 rule -- this might make sense if you seem them as a kind of boundary.
21:22 idiosyncrat In your case probably the rule defining __Decimal Literaral should be a "::=" rule ...
21:23 idiosyncrat and everything else a "~" rule.
21:30 idiosyncrat kkrev: I need to go AFK for a while.  I hope this has helped.
21:33 kkrev Thanks. I'm still confused. Ignoring the cpan code, I think your saying this should be valid, but it doesn't seem to be: <number_rat> ~ <digits> '.' <digits> '.' \n <digits> ~ [\d]+
21:34 kkrev oops: <number_rat> ~ <digits> '.' <digits> \n <digits> ~ [\d]+
22:12 lwa1 joined #marpa
22:15 sivoais_ joined #marpa
22:20 sivoais joined #marpa
22:29 jeffreykegler joined #marpa
22:30 ronsavage joined #marpa
22:31 jeffreykegler kkrev: I'm back.  Can you paste a test script.  I mean a script, with your grammar, and using Test::More a failing test.  That'll help for giving more specifically helpful advice.  What you are asking to do is very much do-able.
23:06 ilbot3 joined #marpa
23:38 aredridel joined #marpa
23:38 jeffreykegler joined #marpa
23:38 sivoais joined #marpa
23:38 kkrev joined #marpa
23:38 hobbs joined #marpa
23:38 shadowpaste joined #marpa
23:38 lucs joined #marpa
23:38 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
23:39 ronsavage joined #marpa
23:42 ilbot3 joined #marpa
23:42 ronsavage joined #marpa
23:42 aredridel joined #marpa
23:42 jeffreykegler joined #marpa
23:42 kkrev joined #marpa
23:42 hobbs joined #marpa
23:42 shadowpaste joined #marpa
23:42 lucs joined #marpa
23:42 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
23:44 daxim joined #marpa
23:54 sivoais joined #marpa
23:55 sivoais joined #marpa

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