in reply to baby Marpa::R2 haml Error in SLIF parse: No lexemes accepted

For debugging, it's better to set the default rule to
:default ::= action => [name,value]

Your problem is at the following line:

haml ::= comments | oneliners

Your example doesn't contain only comments or only oneliners, but a mix of both types. What you actually need is

haml ::= things things ::= thing+ thing ::= oneliner | comment

Handling of whitespace is weird. You didn't tell Marpa there could be whitespace between the tag and the body. Either do it explicitly, or try the implicit rule

:discard ~ space space ~ [\s]+
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: baby Marpa::R2 haml Error in SLIF parse: No lexemes accepted
by Anonymous Monk on Jan 22, 2016 at 00:56 UTC

    Your problem is at the following line:haml ::= comments | oneliners
    Your example doesn't contain only comments or only oneliners, but a mix of both types. What you actually need is

    Aha, thank you choroba . I had written /a+|b+/ instead of /(a|b)+/

    For debugging, it's better to set the default rule to  :default ::= action => [name,value]

    meh :D for debugging I'm using the trace options

    Handling of whitespace is weird. You didn't tell Marpa there could be whitespace between the tag and the body. Either do it explicitly, or try the implicit rule

    What? Why would I discard whitespace?