public final IdentifierContext identifier()

in x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java [8072:8145]


    public final IdentifierContext identifier() throws RecognitionException {
        IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
        enterRule(_localctx, 104, RULE_identifier);
        try {
            setState(830);
            _errHandler.sync(this);
            switch (_input.LA(1)) {
                case QUOTED_IDENTIFIER:
                case BACKQUOTED_IDENTIFIER:
                    enterOuterAlt(_localctx, 1); {
                    setState(828);
                    quoteIdentifier();
                }
                    break;
                case ANALYZE:
                case ANALYZED:
                case CATALOGS:
                case COLUMNS:
                case CURRENT_DATE:
                case CURRENT_TIME:
                case CURRENT_TIMESTAMP:
                case DAY:
                case DEBUG:
                case EXECUTABLE:
                case EXPLAIN:
                case FIRST:
                case FORMAT:
                case FULL:
                case FUNCTIONS:
                case GRAPHVIZ:
                case HOUR:
                case INTERVAL:
                case LAST:
                case LIMIT:
                case MAPPED:
                case MINUTE:
                case MONTH:
                case OPTIMIZED:
                case PARSED:
                case PHYSICAL:
                case PIVOT:
                case PLAN:
                case RLIKE:
                case QUERY:
                case SCHEMAS:
                case SECOND:
                case SHOW:
                case SYS:
                case TABLES:
                case TEXT:
                case TOP:
                case TYPE:
                case TYPES:
                case VERIFY:
                case YEAR:
                case IDENTIFIER:
                case DIGIT_IDENTIFIER:
                    enterOuterAlt(_localctx, 2); {
                    setState(829);
                    unquoteIdentifier();
                }
                    break;
                default:
                    throw new NoViableAltException(this);
            }
        } catch (RecognitionException re) {
            _localctx.exception = re;
            _errHandler.reportError(this, re);
            _errHandler.recover(this, re);
        } finally {
            exitRule();
        }
        return _localctx;
    }