Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-08-04

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

All times shown according to UTC.

Time Nick Message
00:50 idiosyncrat_ joined #marpa
01:23 rgrinberg joined #marpa
01:41 harovali idiosyncrat_: thanks, rebuiilding List::MoreUtils fixed the marpa compilation.
01:48 ilbot3 joined #marpa
01:48 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
03:24 harovali joined #marpa
03:38 ronsavage joined #marpa
04:47 harovali how do I code a L0 lexeme which consists of  a ampersand charanter and a set of [A-Za-z0-9]+  ?
04:47 harovali '&' [A-Za-z0-9]+
04:47 harovali or
04:47 harovali &[A-Za-z0-9]+
04:47 harovali or
04:47 harovali \&[A-Za-z0-9]+
04:47 harovali ?
05:35 ronsavage harovali: Don't restrict yourself to L0. Try a_set ::= ampersand alphanumeric and ampersand ~ '&' and alphanumeric ~ [A-Za-z0-9]+. Let us know if that works.
05:42 harovali is 'and' an operator in the grammar ?
05:42 harovali oh no, I see
05:43 harovali those are one G1 and two L0 instances, right ?
05:49 harovali isn't this G1 going to accept '&   abc' as long as '&abc' , since whitspace would be discarded ?  (that was my bias toward L0)
05:51 harovali now I'm in another problem, maybe it's too basic
05:52 harovali I'm writing like this  http://pastebin.com/xpFm2CaD
05:52 harovali and getting this http://pastebin.com/rpEiUNzU
05:55 harovali i'm kind stuck there
08:03 ronsavage joined #marpa
08:05 ronsavage Sorry for the confusion. I assumed you guess there were 3 statements there. To answer your questions:
08:05 ronsavage Yes, '&abc' and '& abc' would be accepted.
08:07 ronsavage The grammar syntax errors come from - put simply - not using every LHS (left-hand-side) somewhere on the RHS. Likewise, every RHS token must be defined by appearing on the LHS of a ::= or ~ rule.
08:07 ronsavage Typo: 'you guess' => 'you would guess'.
08:09 ronsavage If '& abc' is unacceptable, consider a rule like:
08:09 ronsavage (Guessing) ampersand_word = [&][A-Za-z0-9]+. Does that work?
10:41 kaare_ joined #marpa
12:31 pczarn joined #marpa
12:48 rgrinberg joined #marpa
13:56 sirdancealot joined #marpa
15:14 pczarn I finished implementing precedenced rules
15:27 harovali joined #marpa
17:30 rgrinberg joined #marpa
18:35 pczarn joined #marpa
19:56 rgrinberg joined #marpa
20:51 harovali I'm having a hard time trying to debug my first marpa program.
20:52 harovali I can't figure out why the symbols result unproductive
20:54 harovali http://pastebin.com/fVJkj5dC
20:54 harovali any help is welcome
22:00 sirdancealot joined #marpa
22:28 ronsavage joined #marpa
22:39 ronsavage harovail: Firstly, glad to see you're no longer using AttributeList with and without <>. That was confusing. Now the bad news: The grammar has various faults.
22:45 ronsavage (1) Ignore the problem with ForEachLoop for the moment, since it's RHS is faulty. (2) This 'AttributeList ::= AttributeList Attribute' does not make sense. You can't define AttributeList on the LHS by using it on the RHS. You absolutely must re-cast the grammar in such a way that you never use a structure like that. (3) Where you have 'for each' you could leave it, but I would split that into N rules to allow for any # of spaces b
22:49 ronsavage (2 again) As for 'AttributeList ::= AttributeList Attribute', you need to get a better understanding of the original language before converting it into Marpa's DSL, since you might be trying to write 'Any # of (AttributeList Attribute) pairs' or 'Any # of AttributeList followed by any # of Attribute' or even 'Any # of Attribute'. I can't tell and neither can Marpa.
22:50 ronsavage Ahhh. One post got chopped. 'any # of spaces b' => 'any # of spaces between for and each'.
22:51 ronsavage Also chopped: (a) ForEachLoop ::= (start_for) AttributeList StatementList (end_for) (b) start_for ::= for each (c) for ~ 'for' (d) each ~ 'each' (d) end_for ~ 'endfor'.
23:00 idiosyncrat_ joined #marpa
23:01 idiosyncrat_ harovati: parentheses make whatever is enclosed invisible to the semantics.
23:01 idiosyncrat_ That's usually what you want with a literal, but you may want it for other things as well.
23:10 harovali ronsavage: thanks, a lot, I'll go deeper into the problem, and try to rephrase
23:10 harovali idiosyncrat_: thanks !
23:12 harovali this was my last post http://pastebin.com/fVJkj5dC

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