Here's one way:

:default    ::= action => [name, value]
lexeme default = latm => 1
:start      ::= data
data        ::= many_a 'A'
many_a        ::= one_a+

one_a ~ 'A'

The lexer is greedy by nature, so I just moved that logic up into the structural part, which is good at unraveling ambiguity. Here's the result:

EXAMPLE 1 VALUE:$VAR1 = \[
            'data',
            [
              'many_a',
              'A'
            ],
            'A'
          ];

-- jeffrey

On 05/08/2014 11:07 AM, [email protected] wrote:
:start      ::= data
data        ::= many_a 'A'

many_a        ~ [A]+

--
You received this message because you are subscribed to the Google Groups "marpa 
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to