package org.hibernate.hql.internal.ast;
import java.io.Reader;
import org.hibernate.QueryException;
import org.hibernate.hql.internal.antlr.HqlBaseLexer;
import antlr.Token;
class HqlLexer extends HqlBaseLexer {
private boolean possibleID;
public HqlLexer(Reader in) {
super( in );
}
@Override
public void setTokenObjectClass(String cl) {
this.tokenObjectClass = HqlToken.class;
}
@Override
protected void setPossibleID(boolean possibleID) {
this.possibleID = possibleID;
}
@Override
protected Token makeToken(int i) {
HqlToken token = (HqlToken) super.makeToken( i );
token.setPossibleID( possibleID );
possibleID = false;
return token;
}
@Override
public void panic() {
panic( "CharScanner: panic" );
}
@Override
public void panic(String s) {
throw new QueryException( s );
}
}