All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lockss.tdb.TdbQueryLexer Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
// Generated from org/lockss/tdb/TdbQueryLexer.g4 by ANTLR 4.7.2
package org.lockss.tdb;


/* ===================================================================

WARNING - WARNING - WARNING - WARNING - WARNING - WARNING - WARNING

If you are modifying a Java file with this warning in it, you are
making changes in the wrong place. This Java file was generated by
ANTLR from a grammar file. You should be editing the grammar file
instead.

=================================================================== */


import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class TdbQueryLexer extends Lexer {
	static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		AND=1, OR=2, IS=3, NOT=4, SET=5, EQUALS=6, NOT_EQUALS=7, MATCHES=8, DOES_NOT_MATCH=9, 
		PAREN_OPEN=10, PAREN_CLOSE=11, STRING=12, IDENTIFIER=13, WHITESPACE=14;
	public static String[] channelNames = {
		"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
	};

	public static String[] modeNames = {
		"DEFAULT_MODE"
	};

	private static String[] makeRuleNames() {
		return new String[] {
			"AND", "OR", "IS", "NOT", "SET", "EQUALS", "NOT_EQUALS", "MATCHES", "DOES_NOT_MATCH", 
			"PAREN_OPEN", "PAREN_CLOSE", "STRING", "IDENTIFIER", "WHITESPACE"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, "'and'", "'or'", "'is'", "'not'", "'set'", "'='", "'!='", "'~'", 
			"'!~'", "'('", "')'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, "AND", "OR", "IS", "NOT", "SET", "EQUALS", "NOT_EQUALS", "MATCHES", 
			"DOES_NOT_MATCH", "PAREN_OPEN", "PAREN_CLOSE", "STRING", "IDENTIFIER", 
			"WHITESPACE"
		};
	}
	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}



	  void processString() {
	    String txt = getText();
	    if (txt.indexOf('\\') < 0) {
	      setText(txt.substring(1, txt.length() - 1));
	      return;
	    }
	    StringBuilder sb = new StringBuilder();
	    for (int i = 1 ; i < txt.length() - 1 ; ++i) {
	      char ch = txt.charAt(i);
	      if (ch != '\\') {
	        sb.append(ch);
	      }
	    }
	    setText(sb.toString());
	  }



	public TdbQueryLexer(CharStream input) {
		super(input);
		_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}

	@Override
	public String getGrammarFileName() { return "TdbQueryLexer.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public String[] getChannelNames() { return channelNames; }

	@Override
	public String[] getModeNames() { return modeNames; }

	@Override
	public ATN getATN() { return _ATN; }

	@Override
	public void action(RuleContext _localctx, int ruleIndex, int actionIndex) {
		switch (ruleIndex) {
		case 11:
			STRING_action((RuleContext)_localctx, actionIndex);
			break;
		}
	}
	private void STRING_action(RuleContext _localctx, int actionIndex) {
		switch (actionIndex) {
		case 0:
			processString();
			break;
		case 1:
			processString();
			break;
		}
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\20\u0085\b\1\4\2"+
		"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
		"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\3\2\3\2\3\2\3\2\3\3\3\3\3"+
		"\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\b\3\t"+
		"\3\t\3\n\3\n\3\n\3\13\3\13\3\f\3\f\3\r\3\r\3\r\3\r\7\rD\n\r\f\r\16\rG"+
		"\13\r\3\r\3\r\3\r\3\r\3\r\3\r\7\rO\n\r\f\r\16\rR\13\r\3\r\3\r\5\rV\n\r"+
		"\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+
		"\3\16\3\16\5\16h\n\16\3\16\5\16k\n\16\3\16\3\16\7\16o\n\16\f\16\16\16"+
		"r\13\16\3\16\3\16\3\16\7\16w\n\16\f\16\16\16z\13\16\3\16\5\16}\n\16\3"+
		"\17\6\17\u0080\n\17\r\17\16\17\u0081\3\17\3\17\2\2\20\3\3\5\4\7\5\t\6"+
		"\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\3\2\t\4\2$$^^\4"+
		"\2))^^\4\2C\\c|\7\2\60\60\62;C\\aac|\5\2\62;C\\c|\6\2\60;C\\aac|\5\2\13"+
		"\f\17\17\"\"\2\u0090\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"+
		"\13\3\2\2\2\2\r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\2_`\7w\2\2`a\7d\2\2ab\7"+
		"n\2\2bc\7k\2\2cd\7u\2\2de\7j\2\2ef\7g\2\2fh\7t\2\2gW\3\2\2\2gY\3\2\2\2"+
		"g^\3\2\2\2hi\3\2\2\2ik\7<\2\2jg\3\2\2\2jk\3\2\2\2kl\3\2\2\2lp\t\4\2\2"+
		"mo\t\5\2\2nm\3\2\2\2or\3\2\2\2pn\3\2\2\2pq\3\2\2\2q|\3\2\2\2rp\3\2\2\2"+
		"st\7]\2\2tx\t\6\2\2uw\t\7\2\2vu\3\2\2\2wz\3\2\2\2xv\3\2\2\2xy\3\2\2\2"+
		"y{\3\2\2\2zx\3\2\2\2{}\7_\2\2|s\3\2\2\2|}\3\2\2\2}\34\3\2\2\2~\u0080\t"+
		"\b\2\2\177~\3\2\2\2\u0080\u0081\3\2\2\2\u0081\177\3\2\2\2\u0081\u0082"+
		"\3\2\2\2\u0082\u0083\3\2\2\2\u0083\u0084\b\17\4\2\u0084\36\3\2\2\2\16"+
		"\2CENPUgjpx|\u0081\5\3\r\2\3\r\3\b\2\2";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy