I am using JFlex to parse strings. I have state VARIABLE
where I want to parse everything between <...>
For that I defined this in my .flex
file:
<VARIABLE> {
[^>]+ { return symbol(sym.VARIABLE, new String(yytext())); }
">" { yybegin(YYINITIAL); return symbol(sym.RVARIABLE); }
}
Unfortunately [^>]+
does not work as JFlex does not match any string. Obviously simplification to pattern [a-z]+
works correctly.
Thanks