Grammar Kit RecoverWhile


I'm sorry to ask for help again , but I'm having a hard time figuring out how to make a recoverWhile works.

I’ve read the HOWTO several times and thought I had understood but it doesn’t works.

cupSpec ::= packageDeclaration? importDeclaration* classNameDeclaration? codeParts* symbols+
precedences* startWith? production+
private symbols         ::= terminalDefinition | nonTerminalDefinition
| typedNonTerminalDefinition | typedTerminalDefinition
{recoverWhile= symbols_recover}
private symbols_recover ::= !('terminal' | 'non' | 'nonterminal')
terminalDefinition ::= 'terminal' termNameList
typedTerminalDefinition ::= 'terminal' typeId termNameList
nonTerminalDefinition ::= ( 'non' 'terminal' |'nonterminal' ) termNameList
typedNonTerminalDefinition ::= ( 'non' 'terminal' |'nonterminal' ) typeId termNameList

typeId                  ::= qualifiedName
termNameList ::= identifier (',' identifier)* ';'
qualifiedName ::= identifier ('.' identifier)*

And when I test with this :

terminal ADD, MUL, PO, PF;
terminal NUM;


non terminal l;
non terminal x, f, a;

Nothing goes wrong, the PSI tree looks good (the bad input is not present in it) but my Annotator highlighting goes down and I don't have any error highlighting.

Can someone explain me where is my stupid mistake ?

Thanks you !

Please sign in to leave a comment.