/** * Uses the {@link DefaultRecognizer} Recognizer to determine if the given aggTable's columns all * match upto the dbFactTable's columns (where present) making the column usages as a result. */ public boolean columnsOK( final RolapStar star, final JdbcSchema.Table dbFactTable, final JdbcSchema.Table aggTable, final MessageRecorder msgRecorder) { Recognizer cb = new DefaultRecognizer(this, star, dbFactTable, aggTable, msgRecorder); return cb.check(); }
public void syntaxError( Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { CommonTokenStream tokens = (CommonTokenStream) recognizer.getInputStream(); String input = tokens.getTokenSource().getInputStream().toString(); Token token = (Token) offendingSymbol; String[] lines = StringUtils.splitPreserveAllTokens(input, '\n'); String errorLine = lines[line - 1]; String simpleMessage = "syntax error at or near \"" + token.getText() + "\""; throw new LangParserException(token, line, charPositionInLine, simpleMessage, errorLine); }