consume();
}
String readString = new String(sbuf);
// System.out.println(readString);
if (connectors.contains(readString)) {
return new Token(LogicTokenTypes.CONNECTOR, readString);
} else if (quantifiers.contains(readString)) {
return new Token(LogicTokenTypes.QUANTIFIER, readString);
} else if (domain.getPredicates().contains(readString)) {
return new Token(LogicTokenTypes.PREDICATE, readString);
} else if (domain.getFunctions().contains(readString)) {
return new Token(LogicTokenTypes.FUNCTION, readString);
} else if (domain.getConstants().contains(readString)) {
return new Token(LogicTokenTypes.CONSTANT, readString);
} else if (isVariable(readString)) {
return new Token(LogicTokenTypes.VARIABLE, readString);
} else if (readString.equals("=")) {
return new Token(LogicTokenTypes.EQUALS, readString);
} else {
throw new RuntimeException("Lexing error on character "
+ lookAhead(1));
}