label 'label' assigned to a block which is not a set

513 views
Skip to first unread message

Hunter Blakely

unread,
Jun 5, 2014, 2:54:09 PM6/5/14
to antlr-di...@googlegroups.com
Hello there, I've been trying to figure out exactly what I'm doing wrong here. If anyone can help I'd be greatly appreciative.



My grammar file contains a definition for expressions, assignments, statements, and for loops. I am trying to use a label in the for loop to describe parts of the for loop. I am receiving an error about my label: "label 'opForCountLeft' assigned to a block which is not a set".

forLoop
        : FOR opForCountLeft=(expression | assignment) TO opForCountRight=expression op=statement* NEXT 

What am I doing wrong here?

Thanks for your time.

Terence Parr

unread,
Jun 5, 2014, 3:55:45 PM6/5/14
to antlr-di...@googlegroups.com
labels can only attach to tokens or single rule refs.
T
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages