I have strange problem with token < NULL: "null" > in my JavaCC parser. In expression like
String IsNullClause():
{
String res = "";
}
{
<IS> {res += " IS ";}
[<NOT> {res += " NOT ";} ]
<NULL> {res += " NULL ";}
{
return res;
}
}
parser doesn't see NULL token and throws exception that "null" expected. If I change token definition to < NULL: "null_val" > or something else it works fine. Is this my mistake or JavaCC doesn't accept 'null' as a token value?