This class provides better literals to the tokens in the keyparser.
Error messages read like
mismatched input '}' expecting SEMI
but should better be
mismatched input '}' expecting ';'
In ANTLRv3 this can no longer be achieved using paraphrasing. There this
class containing literals for the tokens.
Updating
The content of the
prepareTokens()
method can be either manually
created or using "KeYLexerTokensUpdater.g". Proceed as follows (you may have
to change paths of course)
cp KeYLexerTokensUpdater.g $TMPDIR
cp KeYLexer.g $TMPDIR
cp antlr-3.5.1.jar $TMPDIR
cd $TMPDIR
java -jar antlr-3.5.1.jar KeYLexerTokensUpdater.g
javac -cp antlr-3.5.1.jar *.java
java -cp antlr-3.5.1.jar:. KeYLexerTokensUpdaterParser "KeYParser" < KeYLexer.g
Paste the output into the method
prepareTokens()
You can also maintain the list manually. If something is missed, the only
thing affected are error messages. If a token gets deleted, a syntax error
will light up here. Just remove the corresponding line.