Hi.
The following grammar does not generate target code.
It says "error(139): skipper.g: set complement is empty".
grammar skipper;
options
{
language = C;
}
skipper
@init {
int braceCount = 1;
}
: (
'('
{
braceCount ++;
}
| ')'
{
braceCount --;
if(braceCount == 0)
{
LTOKEN = EOF_TOKEN;
}
}
| ~('('|')')
) *
;
What's wrong with it?