Example usage for org.antlr.v4.runtime CommonTokenFactory DEFAULT

List of usage examples for org.antlr.v4.runtime CommonTokenFactory DEFAULT

Introduction

In this page you can find the example usage for org.antlr.v4.runtime CommonTokenFactory DEFAULT.

Prototype

TokenFactory DEFAULT

To view the source code for org.antlr.v4.runtime CommonTokenFactory DEFAULT.

Click Source Link

Document

The default CommonTokenFactory instance.

Usage

From source file:com.antsdb.saltedfish.sql.mysql.Select_or_valuesGenerator.java

License:Open Source License

private static RuleContext createColumnName_(Expr_functionContext rule, OutputField field) {
    Column_name_Context column_name_ = new Column_name_Context(rule.getParent(), rule.invokingState);
    Column_nameContext column_name = new Column_nameContext(column_name_.getParent(), rule.invokingState);
    IdentifierContext identifier = new IdentifierContext(column_name, rule.invokingState);
    CommonToken token = CommonTokenFactory.DEFAULT.create(MysqlParser.BACKTICK_QUOTED_IDENTIFIER,
            '`' + field.name + '`');
    TerminalNode term = new TerminalNodeImpl(token);
    identifier.addChild(term);//from  w ww .ja  v a2s  .  c o  m
    column_name.addChild(identifier);
    column_name_.addChild(column_name);
    return column_name_;
}