kast parser

Actually, I am a little confused what are you suggesting. However, The token in JavaCC acts like a lexer in a parser. If I have defined String = ""\"" (~["\"", "\n"] | "\\\"" | "\\n" | "\\r" | "\\t")* "\"", then every strings you input will be recognized as String entities. If you want to define other things which are strings, such as "true". Most likely, the JavaCC is not able to recognize them as the precise things you want in the lexical analysis stage. They will be only recognized as String.