Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-07-13

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

All times shown according to UTC.

Time Nick Message
00:19 ronsavage joined #marpa
01:07 ronsavage joined #marpa
01:25 idiosyncrat joined #marpa
01:26 idiosyncrat Demat!
01:26 cheako Can't locate object method "parse" via package "Marpa::R2::Scanless::G"
01:36 idiosyncrat cheako: It should work.  It's in the test suite, so install should fail if it doesn't work.
01:39 cheako Installed via Debian package.
01:40 idiosyncrat If you'd paste the failing code somewhere, it might offer a clue.
01:40 cheako https://perlbot.pl/p/kcecnx
01:40 cheako Ohh, that's not the code failing.
01:41 cheako It's just some other code that fails.
01:49 ilbot3 joined #marpa
01:49 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Code paste/run: https://f.perlbot.pl/#marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today - Youtube channel: https://www.youtube.com/channel/UCYKVfGBtfTqbs1JdYq-dc5g
01:52 cheako Here is the code that fails not finding parse: https://github.com/cheako/MarpaX-Languages-Bash-AST/commit/45c2238e60e9bd3d4466c2dd8e27b0b16a87109d#diff-bcd38fa9ab7ed62a825c64f989b02b52R23
02:19 idiosyncrat I tried
02:19 idiosyncrat perl -Ilib -E 'use MarpaX::Languages::Bash::AST; my $g = MarpaX::Languages::Bash::AST->new(); $g->parse(\"42")'
02:20 idiosyncrat and it finds and runs $g->parse() OK.
02:20 idiosyncrat It fails with this message:
02:20 idiosyncrat Could not resolve rule action named 'do_multiply'
02:20 idiosyncrat Rule was Term ::= Term '*' Factor
02:20 idiosyncrat Failed resolution of action "do_multiply" to MarpaX::Languages::Bash::AST::Actions::do_multiply
02:21 idiosyncrat But that's because the name of 'do
02:22 idiosyncrat the name of 'do_multiply' isn't qualified with the full name you specified for the semantics package.
05:00 cheako joined #marpa
05:46 cheako Thanks for everyones help, I can now test using travis.  It's not ideal, but it works.  https://travis-ci.org/cheako/MarpaX-Languages-Bash-AST/builds/253077395
07:00 ronsavage joined #marpa
13:32 nightshift joined #marpa
14:31 kook joined #marpa
14:32 kook left #marpa
14:38 cheako joined #marpa
15:25 cheako https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form   Doesn't list Marpa under the software using section.
16:08 gabiruh joined #marpa
17:42 cheako Head hurts from to much learning to fast.
18:12 cheako What is this supposed to be?  https://travis-ci.org/cheako/MarpaX-Languages-Bash-AST/builds/253317891#L203
18:13 cheako https://github.com/cheako/MarpaX-Languages-Bash-AST/commit/8396baa530f02f979ccdba1891eb6caab2d74c9d   The code
18:17 idiosyncrat cheako: Marpa::R2 treats any warning message from the code the same as a fatal error.  You can still use STDERR for "hi there"'s.
18:18 cheako I'm asking about the empty hash ref.
18:20 idiosyncrat That's the per-parse variable.  If you don't initialize it, it's initialized to an empty hash ref.  It's intended as a per-parse scratch pad for the semantics.
19:05 cheako joined #marpa
19:15 cheako joined #marpa
19:17 cheako I tried to add processing of comments, but I'm sure I failed.  https://travis-ci.org/cheako/MarpaX-Languages-Bash-AST/builds/253346995
19:17 cheako I've gtg.
19:25 cheako joined #marpa
19:57 cheako https://travis-ci.org/cheako/MarpaX-Languages-Bash-AST/builds/253358844#L211
20:04 cheako This is likely due to me not understanding how the new Comment fits into the existing Calculator at https://github.com/cheako/MarpaX-Languages-Bash-AST/blob/77a657fc35c853d14a4bd3166f1ac645f94b5f03/lib/MarpaX/Languages/Bash/AST.pm#L49
20:05 cheako I also had a lot of questions like how to match the beginning of the input, for example to catch the shebang.
20:18 cheako I really need to read a lot more documentation to start to understand this.
20:18 cheako https://travis-ci.org/cheako/MarpaX-Languages-Bash-AST/builds/253365872#L188
20:19 cheako https://github.com/cheako/MarpaX-Languages-Bash-AST/compare/77a657fc35c8...2dd4bff170e9#diff-bcd38fa9ab7ed62a825c64f989b02b52R48
20:33 cheako joined #marpa
20:35 cheako I'll be checking for responses via the weblog and I'll jump back on if I'm available.
22:33 cheako joined #marpa
22:46 ronsavage joined #marpa
22:47 cheako joined #marpa
23:19 cheako https://github.com/cheako/MarpaX-Languages-Bash-AST/blob/6cbc3e6f06b96ab14aaa2441d0701ecb903b4a42/lib/MarpaX/Languages/Bash/AST.pm#L55
23:19 cheako I think I'm running across https://stackoverflow.com/questions/18634749/marpa-parser-cant-seem-to-cope-with-optional-first-symbol
23:42 ronsavage cheako: You need to use more rules. Something like:
23:42 ronsavage Old:
23:42 ronsavage script ::=
23:42 ronsavage file-type code* action => ::array
23:42 ronsavage | code* action => ::array
23:42 ronsavage New (I always use '_' but I've copied your '-'):
23:42 ronsavage script::= file-partaction => ::array
23:42 ronsavage | code-partaction => ::array
23:42 ronsavage file_part::= file-type code-part
23:42 ronsavage file-type::=
23:42 ronsavage file-type::= $something
23:42 ronsavage code-part::=
23:42 ronsavage code-part::= $something_else
23:44 ronsavage Here's how I've done it in GraphViz2::Marpa: https://metacpan.org/source/RSAVAGE/GraphViz2-Marpa-2.11/lib/GraphViz2/Marpa.pm#L217. Hint: Download and study source!
23:45 ronsavage Here's the original BNF I used: http://www.graphviz.org/content/dot-language
23:57 ronsavage I've just updated the FAQ with this issue. http://savage.net.au/Perl-modules/html/marpa.faq/faq.html. See Q 147.

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