Hi, I am new to grammar design and I am still struggling with understanding
non LL(*) errors.

In the example below I do understand that "call f using 1, 2" is ambiguous,
which I am trying to address with the greedy option, but I still get a fatal
error trying to compile the grammar.

I am looking for general tips that would help me get from such an error
message (the actual grammar is complex and those errors keep coming up with
every change) to a specific input example where I can understand which rule
sequence would send antlr into a recursive loop?

Thanks in advance!
Franck

grammar Test;

tokens {
        ON='on';
        COMMA=',';
}
        
callExpression
        :       primaryExpression
        |       'call' primaryExpression ( 'using' primaryExpression ( options
{greedy=true;} : COMMA primaryExpression )* )?
        ;
        
primaryExpression
        :       '(' callExpression ')'
        |       ID
        ;
        
argumentList
        :       callExpression ( COMMA callExpression )*
        ;
        
// $>

// LEXER
// ==========================================

ID
        :       ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
        ;

--
View this message in context: 
http://antlr.1301665.n2.nabble.com/Understanding-non-LL-errors-tp7027459p7027459.html
Sent from the ANTLR mailing list archive at Nabble.com.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-inter...@googlegroups.com.
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to