Examples of MySqlLexer


Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlLexer

        String sql = out.toString();
        return sql;
    }

    public static SQLExpr toMySqlExpr(String sql) {
        MySqlLexer lexer = new MySqlLexer(sql);
        lexer.nextToken();

        MySqlExprParser parser = new MySqlExprParser(lexer);
        SQLExpr expr = parser.expr();

        if (lexer.token() != Token.EOF) {
            throw new ParserException("illegal sql expr : " + sql);
        }

        return expr;
    }
View Full Code Here

Examples of com.highfleet.sql.convert.grammar.MySQLLexer

        sb.append(line).append('\n');
        if (line.endsWith(";")) {
          String blockToParse = sb.toString();
          ANTLRStringStream input = new ANTLRStringStream(blockToParse);
          DebuggingErrorReporter reporter = new DebuggingErrorReporter(linesRead, blockToParse);
          MySQLLexer lexer = new MySQLLexer(input);
          lexer.setErrorReporter(reporter);
         
          CommonTokenStream tokens = new CommonTokenStream(lexer);
          MySQLParser parser = new MySQLParser(tokens);
          parser.ignoreDBName(ignoreDBCommands);
          parser.setErrorReporter(reporter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.