if (tokens.matchesAnyOf("UNION", "INTERSECT", "EXCEPT")) {
command = parseSetQuery(tokens, command, typeSystem);
} else {
Position pos = tokens.previousPosition();
String msg = GraphI18n.unexpectedToken.text(tokens.consume(), pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
}
} else {
// We expected SELECT ...
Position pos = tokens.nextPosition();
String msg = GraphI18n.unexpectedToken.text(tokens.consume(), pos.getLine(), pos.getColumn());
throw new ParsingException(pos, msg);
}
return command;
}