|
|
@@ -0,0 +1,1683 @@
|
|
|
+// Generated from E:/subjects/Compilers Principle/exp/2/antlr\Aidl.g4 by ANTLR 4.9.1
|
|
|
+package antlr.aidl;
|
|
|
+import org.antlr.v4.runtime.atn.*;
|
|
|
+import org.antlr.v4.runtime.dfa.DFA;
|
|
|
+import org.antlr.v4.runtime.*;
|
|
|
+import org.antlr.v4.runtime.tree.*;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
|
|
+public class AidlParser extends Parser {
|
|
|
+ static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
|
|
|
+
|
|
|
+ protected static final DFA[] _decisionToDFA;
|
|
|
+ protected static final PredictionContextCache _sharedContextCache =
|
|
|
+ new PredictionContextCache();
|
|
|
+ public static final int
|
|
|
+ PRIMITIVE=1, BYTE=2, SHORT=3, INT=4, LONG=5, FLOAT=6, DOUBLE=7, BOOLEAN=8,
|
|
|
+ CHAR=9, PACKAGE=10, PARCELABLE=11, IMPORT=12, INTERFACE=13, ONEWAY=14,
|
|
|
+ VOID=15, CONST=16, NULLABLE=17, INOUT=18, IN=19, OUT=20, STRING=21, CHARSEQUENCE=22,
|
|
|
+ MAP=23, LIST=24, IBINDER=25, LP=26, RP=27, LC=28, RC=29, LB=30, RB=31,
|
|
|
+ LA=32, RA=33, DOT=34, CO=35, SE=36, EQ=37, PATH=38, ID=39, INTEGER=40,
|
|
|
+ LITERALSTRING=41, WS=42, COMMENT_BLOCK=43, COMMENT_LINE=44;
|
|
|
+ public static final int
|
|
|
+ RULE_aidl = 0, RULE_packageStatement = 1, RULE_parcelableStatement = 2,
|
|
|
+ RULE_importStatement = 3, RULE_interfaceStatement = 4, RULE_interfaceSubStatement = 5,
|
|
|
+ RULE_methodStatement = 6, RULE_constStatement = 7, RULE_methodReturnType = 8,
|
|
|
+ RULE_paramList = 9, RULE_param = 10, RULE_paramTag = 11, RULE_paramType = 12,
|
|
|
+ RULE_type = 13, RULE_list = 14, RULE_interfaceName = 15, RULE_className = 16,
|
|
|
+ RULE_name = 17, RULE_path = 18, RULE_id = 19;
|
|
|
+ private static String[] makeRuleNames() {
|
|
|
+ return new String[] {
|
|
|
+ "antlr/aidl", "packageStatement", "parcelableStatement", "importStatement",
|
|
|
+ "interfaceStatement", "interfaceSubStatement", "methodStatement", "constStatement",
|
|
|
+ "methodReturnType", "paramList", "param", "paramTag", "paramType", "type",
|
|
|
+ "list", "interfaceName", "className", "name", "path", "id"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ public static final String[] ruleNames = makeRuleNames();
|
|
|
+
|
|
|
+ private static String[] makeLiteralNames() {
|
|
|
+ return new String[] {
|
|
|
+ null, null, "'byte'", "'short'", "'int'", "'long'", "'float'", "'double'",
|
|
|
+ "'boolean'", "'char'", "'package'", "'parcelable'", "'import'", "'interface'",
|
|
|
+ "'oneway'", "'void'", "'const'", "'@nullable'", "'inout'", "'in'", "'out'",
|
|
|
+ "'String'", "'CharSequence'", "'Map'", "'List'", "'IBinder'", "'('",
|
|
|
+ "')'", "'{'", "'}'", "'['", "']'", "'<'", "'>'", "'.'", "','", "';'",
|
|
|
+ "'='"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
|
|
+ private static String[] makeSymbolicNames() {
|
|
|
+ return new String[] {
|
|
|
+ null, "PRIMITIVE", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE",
|
|
|
+ "BOOLEAN", "CHAR", "PACKAGE", "PARCELABLE", "IMPORT", "INTERFACE", "ONEWAY",
|
|
|
+ "VOID", "CONST", "NULLABLE", "INOUT", "IN", "OUT", "STRING", "CHARSEQUENCE",
|
|
|
+ "MAP", "LIST", "IBINDER", "LP", "RP", "LC", "RC", "LB", "RB", "LA", "RA",
|
|
|
+ "DOT", "CO", "SE", "EQ", "PATH", "ID", "INTEGER", "LITERALSTRING", "WS",
|
|
|
+ "COMMENT_BLOCK", "COMMENT_LINE"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ 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] = "<INVALID>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Deprecated
|
|
|
+ public String[] getTokenNames() {
|
|
|
+ return tokenNames;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+
|
|
|
+ public Vocabulary getVocabulary() {
|
|
|
+ return VOCABULARY;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getGrammarFileName() { return "Aidl.g4"; }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String[] getRuleNames() { return ruleNames; }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getSerializedATN() { return _serializedATN; }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ATN getATN() { return _ATN; }
|
|
|
+
|
|
|
+
|
|
|
+ int oneway = 0;
|
|
|
+
|
|
|
+ public AidlParser(TokenStream input) {
|
|
|
+ super(input);
|
|
|
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class AidlContext extends ParserRuleContext {
|
|
|
+ public PackageStatementContext packageStatement() {
|
|
|
+ return getRuleContext(PackageStatementContext.class,0);
|
|
|
+ }
|
|
|
+ public ParcelableStatementContext parcelableStatement() {
|
|
|
+ return getRuleContext(ParcelableStatementContext.class,0);
|
|
|
+ }
|
|
|
+ public InterfaceStatementContext interfaceStatement() {
|
|
|
+ return getRuleContext(InterfaceStatementContext.class,0);
|
|
|
+ }
|
|
|
+ public List<ImportStatementContext> importStatement() {
|
|
|
+ return getRuleContexts(ImportStatementContext.class);
|
|
|
+ }
|
|
|
+ public ImportStatementContext importStatement(int i) {
|
|
|
+ return getRuleContext(ImportStatementContext.class,i);
|
|
|
+ }
|
|
|
+ public AidlContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_aidl; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterAidl(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitAidl(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitAidl(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final AidlContext aidl() throws RecognitionException {
|
|
|
+ AidlContext _localctx = new AidlContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 0, RULE_aidl);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(40);
|
|
|
+ packageStatement();
|
|
|
+ setState(49);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch (_input.LA(1)) {
|
|
|
+ case PARCELABLE:
|
|
|
+ {
|
|
|
+ setState(41);
|
|
|
+ parcelableStatement();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case IMPORT:
|
|
|
+ case INTERFACE:
|
|
|
+ case ONEWAY:
|
|
|
+ {
|
|
|
+ setState(45);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ while (_la==IMPORT) {
|
|
|
+ {
|
|
|
+ {
|
|
|
+ setState(42);
|
|
|
+ importStatement();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setState(47);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ }
|
|
|
+ setState(48);
|
|
|
+ interfaceStatement();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new NoViableAltException(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class PackageStatementContext extends ParserRuleContext {
|
|
|
+ public TerminalNode PACKAGE() { return getToken(AidlParser.PACKAGE, 0); }
|
|
|
+ public NameContext name() {
|
|
|
+ return getRuleContext(NameContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
|
|
|
+ public PackageStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_packageStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterPackageStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitPackageStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitPackageStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final PackageStatementContext packageStatement() throws RecognitionException {
|
|
|
+ PackageStatementContext _localctx = new PackageStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 2, RULE_packageStatement);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(51);
|
|
|
+ match(PACKAGE);
|
|
|
+ setState(52);
|
|
|
+ name();
|
|
|
+ setState(53);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ParcelableStatementContext extends ParserRuleContext {
|
|
|
+ public TerminalNode PARCELABLE() { return getToken(AidlParser.PARCELABLE, 0); }
|
|
|
+ public IdContext id() {
|
|
|
+ return getRuleContext(IdContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
|
|
|
+ public ParcelableStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_parcelableStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParcelableStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParcelableStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParcelableStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ParcelableStatementContext parcelableStatement() throws RecognitionException {
|
|
|
+ ParcelableStatementContext _localctx = new ParcelableStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 4, RULE_parcelableStatement);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(55);
|
|
|
+ match(PARCELABLE);
|
|
|
+ setState(56);
|
|
|
+ id();
|
|
|
+ setState(57);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ImportStatementContext extends ParserRuleContext {
|
|
|
+ public TerminalNode IMPORT() { return getToken(AidlParser.IMPORT, 0); }
|
|
|
+ public PathContext path() {
|
|
|
+ return getRuleContext(PathContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
|
|
|
+ public ImportStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_importStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterImportStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitImportStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitImportStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ImportStatementContext importStatement() throws RecognitionException {
|
|
|
+ ImportStatementContext _localctx = new ImportStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 6, RULE_importStatement);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(59);
|
|
|
+ match(IMPORT);
|
|
|
+ setState(60);
|
|
|
+ path();
|
|
|
+ setState(61);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class InterfaceStatementContext extends ParserRuleContext {
|
|
|
+ public TerminalNode INTERFACE() { return getToken(AidlParser.INTERFACE, 0); }
|
|
|
+ public IdContext id() {
|
|
|
+ return getRuleContext(IdContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode LC() { return getToken(AidlParser.LC, 0); }
|
|
|
+ public TerminalNode RC() { return getToken(AidlParser.RC, 0); }
|
|
|
+ public TerminalNode ONEWAY() { return getToken(AidlParser.ONEWAY, 0); }
|
|
|
+ public List<InterfaceSubStatementContext> interfaceSubStatement() {
|
|
|
+ return getRuleContexts(InterfaceSubStatementContext.class);
|
|
|
+ }
|
|
|
+ public InterfaceSubStatementContext interfaceSubStatement(int i) {
|
|
|
+ return getRuleContext(InterfaceSubStatementContext.class,i);
|
|
|
+ }
|
|
|
+ public InterfaceStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_interfaceStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final InterfaceStatementContext interfaceStatement() throws RecognitionException {
|
|
|
+ InterfaceStatementContext _localctx = new InterfaceStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 8, RULE_interfaceStatement);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ int _alt;
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ oneway = 0;
|
|
|
+ setState(66);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ if (_la==ONEWAY) {
|
|
|
+ {
|
|
|
+ setState(64);
|
|
|
+ match(ONEWAY);
|
|
|
+ oneway = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ setState(68);
|
|
|
+ match(INTERFACE);
|
|
|
+ setState(69);
|
|
|
+ id();
|
|
|
+ setState(70);
|
|
|
+ match(LC);
|
|
|
+ setState(74);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _alt = getInterpreter().adaptivePredict(_input,3,_ctx);
|
|
|
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
|
|
|
+ if ( _alt==1 ) {
|
|
|
+ {
|
|
|
+ {
|
|
|
+ setState(71);
|
|
|
+ interfaceSubStatement();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setState(76);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _alt = getInterpreter().adaptivePredict(_input,3,_ctx);
|
|
|
+ }
|
|
|
+ setState(77);
|
|
|
+ match(RC);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class InterfaceSubStatementContext extends ParserRuleContext {
|
|
|
+ public MethodStatementContext methodStatement() {
|
|
|
+ return getRuleContext(MethodStatementContext.class,0);
|
|
|
+ }
|
|
|
+ public ConstStatementContext constStatement() {
|
|
|
+ return getRuleContext(ConstStatementContext.class,0);
|
|
|
+ }
|
|
|
+ public InterfaceSubStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_interfaceSubStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceSubStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceSubStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceSubStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final InterfaceSubStatementContext interfaceSubStatement() throws RecognitionException {
|
|
|
+ InterfaceSubStatementContext _localctx = new InterfaceSubStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 10, RULE_interfaceSubStatement);
|
|
|
+ try {
|
|
|
+ setState(81);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(79);
|
|
|
+ methodStatement();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(80);
|
|
|
+ constStatement();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class MethodStatementContext extends ParserRuleContext {
|
|
|
+ public MethodReturnTypeContext methodReturnType() {
|
|
|
+ return getRuleContext(MethodReturnTypeContext.class,0);
|
|
|
+ }
|
|
|
+ public IdContext id() {
|
|
|
+ return getRuleContext(IdContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode LP() { return getToken(AidlParser.LP, 0); }
|
|
|
+ public TerminalNode RP() { return getToken(AidlParser.RP, 0); }
|
|
|
+ public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
|
|
|
+ public TerminalNode ONEWAY() { return getToken(AidlParser.ONEWAY, 0); }
|
|
|
+ public ParamListContext paramList() {
|
|
|
+ return getRuleContext(ParamListContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode EQ() { return getToken(AidlParser.EQ, 0); }
|
|
|
+ public TerminalNode INT() { return getToken(AidlParser.INT, 0); }
|
|
|
+ public MethodStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_methodStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterMethodStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitMethodStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitMethodStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final MethodStatementContext methodStatement() throws RecognitionException {
|
|
|
+ MethodStatementContext _localctx = new MethodStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 12, RULE_methodStatement);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ oneway &= 1;
|
|
|
+ setState(86);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(84);
|
|
|
+ match(ONEWAY);
|
|
|
+ oneway |= 2;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ setState(88);
|
|
|
+ methodReturnType();
|
|
|
+ setState(89);
|
|
|
+ id();
|
|
|
+ setState(90);
|
|
|
+ match(LP);
|
|
|
+ setState(92);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(91);
|
|
|
+ paramList();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ setState(94);
|
|
|
+ match(RP);
|
|
|
+ setState(97);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ if (_la==EQ) {
|
|
|
+ {
|
|
|
+ setState(95);
|
|
|
+ match(EQ);
|
|
|
+ setState(96);
|
|
|
+ match(INT);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ setState(99);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ConstStatementContext extends ParserRuleContext {
|
|
|
+ public TerminalNode CONST() { return getToken(AidlParser.CONST, 0); }
|
|
|
+ public TerminalNode INT() { return getToken(AidlParser.INT, 0); }
|
|
|
+ public IdContext id() {
|
|
|
+ return getRuleContext(IdContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode EQ() { return getToken(AidlParser.EQ, 0); }
|
|
|
+ public TerminalNode INTEGER() { return getToken(AidlParser.INTEGER, 0); }
|
|
|
+ public TerminalNode SE() { return getToken(AidlParser.SE, 0); }
|
|
|
+ public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
|
|
|
+ public TerminalNode LITERALSTRING() { return getToken(AidlParser.LITERALSTRING, 0); }
|
|
|
+ public ConstStatementContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_constStatement; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterConstStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitConstStatement(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitConstStatement(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ConstStatementContext constStatement() throws RecognitionException {
|
|
|
+ ConstStatementContext _localctx = new ConstStatementContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 14, RULE_constStatement);
|
|
|
+ try {
|
|
|
+ setState(115);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(101);
|
|
|
+ match(CONST);
|
|
|
+ setState(102);
|
|
|
+ match(INT);
|
|
|
+ setState(103);
|
|
|
+ id();
|
|
|
+ setState(104);
|
|
|
+ match(EQ);
|
|
|
+ setState(105);
|
|
|
+ match(INTEGER);
|
|
|
+ setState(106);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(108);
|
|
|
+ match(CONST);
|
|
|
+ setState(109);
|
|
|
+ match(STRING);
|
|
|
+ setState(110);
|
|
|
+ id();
|
|
|
+ setState(111);
|
|
|
+ match(EQ);
|
|
|
+ setState(112);
|
|
|
+ match(LITERALSTRING);
|
|
|
+ setState(113);
|
|
|
+ match(SE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class MethodReturnTypeContext extends ParserRuleContext {
|
|
|
+ public TypeContext type() {
|
|
|
+ return getRuleContext(TypeContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode NULLABLE() { return getToken(AidlParser.NULLABLE, 0); }
|
|
|
+ public TerminalNode VOID() { return getToken(AidlParser.VOID, 0); }
|
|
|
+ public MethodReturnTypeContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_methodReturnType; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterMethodReturnType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitMethodReturnType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitMethodReturnType(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final MethodReturnTypeContext methodReturnType() throws RecognitionException {
|
|
|
+ MethodReturnTypeContext _localctx = new MethodReturnTypeContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 16, RULE_methodReturnType);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ setState(123);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(117);
|
|
|
+ if (!(oneway==0)) throw new FailedPredicateException(this, "oneway==0");
|
|
|
+ {
|
|
|
+ setState(119);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ if (_la==NULLABLE) {
|
|
|
+ {
|
|
|
+ setState(118);
|
|
|
+ match(NULLABLE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ setState(121);
|
|
|
+ type();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(122);
|
|
|
+ match(VOID);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ParamListContext extends ParserRuleContext {
|
|
|
+ public List<ParamContext> param() {
|
|
|
+ return getRuleContexts(ParamContext.class);
|
|
|
+ }
|
|
|
+ public ParamContext param(int i) {
|
|
|
+ return getRuleContext(ParamContext.class,i);
|
|
|
+ }
|
|
|
+ public List<TerminalNode> CO() { return getTokens(AidlParser.CO); }
|
|
|
+ public TerminalNode CO(int i) {
|
|
|
+ return getToken(AidlParser.CO, i);
|
|
|
+ }
|
|
|
+ public ParamListContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_paramList; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamList(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamList(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamList(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ParamListContext paramList() throws RecognitionException {
|
|
|
+ ParamListContext _localctx = new ParamListContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 18, RULE_paramList);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(125);
|
|
|
+ param();
|
|
|
+ setState(130);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ while (_la==CO) {
|
|
|
+ {
|
|
|
+ {
|
|
|
+ setState(126);
|
|
|
+ match(CO);
|
|
|
+ setState(127);
|
|
|
+ param();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setState(132);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ParamContext extends ParserRuleContext {
|
|
|
+ public ParamTagContext paramTag;
|
|
|
+ public ParamTypeContext paramType() {
|
|
|
+ return getRuleContext(ParamTypeContext.class,0);
|
|
|
+ }
|
|
|
+ public IdContext id() {
|
|
|
+ return getRuleContext(IdContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode NULLABLE() { return getToken(AidlParser.NULLABLE, 0); }
|
|
|
+ public ParamTagContext paramTag() {
|
|
|
+ return getRuleContext(ParamTagContext.class,0);
|
|
|
+ }
|
|
|
+ public ParamContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_param; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParam(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParam(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParam(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ParamContext param() throws RecognitionException {
|
|
|
+ ParamContext _localctx = new ParamContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 20, RULE_param);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(134);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(133);
|
|
|
+ match(NULLABLE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ setState(137);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(136);
|
|
|
+ ((ParamContext)_localctx).paramTag = paramTag();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ setState(139);
|
|
|
+ paramType((((ParamContext)_localctx).paramTag!=null?_input.getText(((ParamContext)_localctx).paramTag.start,((ParamContext)_localctx).paramTag.stop):null));
|
|
|
+ setState(140);
|
|
|
+ id();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ParamTagContext extends ParserRuleContext {
|
|
|
+ public TerminalNode IN() { return getToken(AidlParser.IN, 0); }
|
|
|
+ public TerminalNode OUT() { return getToken(AidlParser.OUT, 0); }
|
|
|
+ public TerminalNode INOUT() { return getToken(AidlParser.INOUT, 0); }
|
|
|
+ public ParamTagContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_paramTag; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamTag(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamTag(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamTag(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ParamTagContext paramTag() throws RecognitionException {
|
|
|
+ ParamTagContext _localctx = new ParamTagContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 22, RULE_paramTag);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ setState(145);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(142);
|
|
|
+ match(IN);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(143);
|
|
|
+ if (!(oneway==0)) throw new FailedPredicateException(this, "oneway==0");
|
|
|
+ setState(144);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ if ( !(_la==INOUT || _la==OUT) ) {
|
|
|
+ _errHandler.recoverInline(this);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
|
+ _errHandler.reportMatch(this);
|
|
|
+ consume();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ParamTypeContext extends ParserRuleContext {
|
|
|
+ public String tag;
|
|
|
+ public int tid = 0;
|
|
|
+ public TypeContext type;
|
|
|
+ public TerminalNode PRIMITIVE() { return getToken(AidlParser.PRIMITIVE, 0); }
|
|
|
+ public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
|
|
|
+ public InterfaceNameContext interfaceName() {
|
|
|
+ return getRuleContext(InterfaceNameContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode MAP() { return getToken(AidlParser.MAP, 0); }
|
|
|
+ public TerminalNode CHARSEQUENCE() { return getToken(AidlParser.CHARSEQUENCE, 0); }
|
|
|
+ public ListContext list() {
|
|
|
+ return getRuleContext(ListContext.class,0);
|
|
|
+ }
|
|
|
+ public ClassNameContext className() {
|
|
|
+ return getRuleContext(ClassNameContext.class,0);
|
|
|
+ }
|
|
|
+ public TypeContext type() {
|
|
|
+ return getRuleContext(TypeContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode LB() { return getToken(AidlParser.LB, 0); }
|
|
|
+ public TerminalNode RB() { return getToken(AidlParser.RB, 0); }
|
|
|
+ public NameContext name() {
|
|
|
+ return getRuleContext(NameContext.class,0);
|
|
|
+ }
|
|
|
+ public ParamTypeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); }
|
|
|
+ public ParamTypeContext(ParserRuleContext parent, int invokingState, String tag) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ this.tag = tag;
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_paramType; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterParamType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitParamType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitParamType(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ParamTypeContext paramType(String tag) throws RecognitionException {
|
|
|
+ ParamTypeContext _localctx = new ParamTypeContext(_ctx, getState(), tag);
|
|
|
+ enterRule(_localctx, 24, RULE_paramType);
|
|
|
+ try {
|
|
|
+ setState(178);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(147);
|
|
|
+ if (!(_localctx.tag==null)) throw new FailedPredicateException(this, "$tag==null");
|
|
|
+ {
|
|
|
+ setState(153);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch (_input.LA(1)) {
|
|
|
+ case PRIMITIVE:
|
|
|
+ {
|
|
|
+ setState(148);
|
|
|
+ match(PRIMITIVE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case STRING:
|
|
|
+ {
|
|
|
+ setState(149);
|
|
|
+ match(STRING);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case IBINDER:
|
|
|
+ case PATH:
|
|
|
+ case ID:
|
|
|
+ {
|
|
|
+ setState(150);
|
|
|
+ interfaceName();
|
|
|
+ ((ParamTypeContext)_localctx).tid = 1;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new NoViableAltException(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(155);
|
|
|
+ if (!(_localctx.tag!=null)) throw new FailedPredicateException(this, "$tag!=null");
|
|
|
+ setState(176);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(156);
|
|
|
+ match(MAP);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ {
|
|
|
+ setState(157);
|
|
|
+ match(CHARSEQUENCE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ {
|
|
|
+ setState(158);
|
|
|
+ list();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ {
|
|
|
+ setState(165);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(159);
|
|
|
+ name();
|
|
|
+ ((ParamTypeContext)_localctx).tid = -1;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ {
|
|
|
+ setState(162);
|
|
|
+ ((ParamTypeContext)_localctx).type = type();
|
|
|
+ ((ParamTypeContext)_localctx).tid = ((ParamTypeContext)_localctx).type.tid;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ setState(167);
|
|
|
+ if (!(_localctx.tag.equals("in"))) throw new FailedPredicateException(this, "$tag.equals(\"in\")");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ {
|
|
|
+ setState(169);
|
|
|
+ className();
|
|
|
+ ((ParamTypeContext)_localctx).tid = 2;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ {
|
|
|
+ setState(172);
|
|
|
+ ((ParamTypeContext)_localctx).type = type();
|
|
|
+ setState(173);
|
|
|
+ match(LB);
|
|
|
+ setState(174);
|
|
|
+ match(RB);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class TypeContext extends ParserRuleContext {
|
|
|
+ public int tid = 0;
|
|
|
+ public TerminalNode PRIMITIVE() { return getToken(AidlParser.PRIMITIVE, 0); }
|
|
|
+ public TerminalNode STRING() { return getToken(AidlParser.STRING, 0); }
|
|
|
+ public TerminalNode CHARSEQUENCE() { return getToken(AidlParser.CHARSEQUENCE, 0); }
|
|
|
+ public TerminalNode MAP() { return getToken(AidlParser.MAP, 0); }
|
|
|
+ public ListContext list() {
|
|
|
+ return getRuleContext(ListContext.class,0);
|
|
|
+ }
|
|
|
+ public ClassNameContext className() {
|
|
|
+ return getRuleContext(ClassNameContext.class,0);
|
|
|
+ }
|
|
|
+ public List<TerminalNode> LB() { return getTokens(AidlParser.LB); }
|
|
|
+ public TerminalNode LB(int i) {
|
|
|
+ return getToken(AidlParser.LB, i);
|
|
|
+ }
|
|
|
+ public List<TerminalNode> RB() { return getTokens(AidlParser.RB); }
|
|
|
+ public TerminalNode RB(int i) {
|
|
|
+ return getToken(AidlParser.RB, i);
|
|
|
+ }
|
|
|
+ public TypeContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_type; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitType(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitType(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final TypeContext type() throws RecognitionException {
|
|
|
+ TypeContext _localctx = new TypeContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 26, RULE_type);
|
|
|
+ try {
|
|
|
+ int _alt;
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(188);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch (_input.LA(1)) {
|
|
|
+ case PRIMITIVE:
|
|
|
+ {
|
|
|
+ setState(180);
|
|
|
+ match(PRIMITIVE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case STRING:
|
|
|
+ {
|
|
|
+ setState(181);
|
|
|
+ match(STRING);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case CHARSEQUENCE:
|
|
|
+ {
|
|
|
+ setState(182);
|
|
|
+ match(CHARSEQUENCE);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MAP:
|
|
|
+ {
|
|
|
+ setState(183);
|
|
|
+ match(MAP);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case LIST:
|
|
|
+ {
|
|
|
+ setState(184);
|
|
|
+ list();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case PATH:
|
|
|
+ case ID:
|
|
|
+ {
|
|
|
+ setState(185);
|
|
|
+ className();
|
|
|
+ ((TypeContext)_localctx).tid = 2;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new NoViableAltException(this);
|
|
|
+ }
|
|
|
+ setState(194);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
|
|
|
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
|
|
|
+ if ( _alt==1 ) {
|
|
|
+ {
|
|
|
+ {
|
|
|
+ setState(190);
|
|
|
+ match(LB);
|
|
|
+ setState(191);
|
|
|
+ match(RB);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setState(196);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ListContext extends ParserRuleContext {
|
|
|
+ public TerminalNode LIST() { return getToken(AidlParser.LIST, 0); }
|
|
|
+ public TerminalNode LA() { return getToken(AidlParser.LA, 0); }
|
|
|
+ public TypeContext type() {
|
|
|
+ return getRuleContext(TypeContext.class,0);
|
|
|
+ }
|
|
|
+ public TerminalNode RA() { return getToken(AidlParser.RA, 0); }
|
|
|
+ public ListContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_list; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterList(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitList(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitList(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ListContext list() throws RecognitionException {
|
|
|
+ ListContext _localctx = new ListContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 28, RULE_list);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(197);
|
|
|
+ match(LIST);
|
|
|
+ setState(202);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) {
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ setState(198);
|
|
|
+ match(LA);
|
|
|
+ setState(199);
|
|
|
+ type();
|
|
|
+ setState(200);
|
|
|
+ match(RA);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class InterfaceNameContext extends ParserRuleContext {
|
|
|
+ public TerminalNode IBINDER() { return getToken(AidlParser.IBINDER, 0); }
|
|
|
+ public NameContext name() {
|
|
|
+ return getRuleContext(NameContext.class,0);
|
|
|
+ }
|
|
|
+ public InterfaceNameContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_interfaceName; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterInterfaceName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitInterfaceName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitInterfaceName(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final InterfaceNameContext interfaceName() throws RecognitionException {
|
|
|
+ InterfaceNameContext _localctx = new InterfaceNameContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 30, RULE_interfaceName);
|
|
|
+ try {
|
|
|
+ setState(206);
|
|
|
+ _errHandler.sync(this);
|
|
|
+ switch (_input.LA(1)) {
|
|
|
+ case IBINDER:
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(204);
|
|
|
+ match(IBINDER);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case PATH:
|
|
|
+ case ID:
|
|
|
+ enterOuterAlt(_localctx, 2);
|
|
|
+ {
|
|
|
+ setState(205);
|
|
|
+ name();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new NoViableAltException(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class ClassNameContext extends ParserRuleContext {
|
|
|
+ public NameContext name() {
|
|
|
+ return getRuleContext(NameContext.class,0);
|
|
|
+ }
|
|
|
+ public ClassNameContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_className; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterClassName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitClassName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitClassName(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final ClassNameContext className() throws RecognitionException {
|
|
|
+ ClassNameContext _localctx = new ClassNameContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 32, RULE_className);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(208);
|
|
|
+ name();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class NameContext extends ParserRuleContext {
|
|
|
+ public TerminalNode ID() { return getToken(AidlParser.ID, 0); }
|
|
|
+ public TerminalNode PATH() { return getToken(AidlParser.PATH, 0); }
|
|
|
+ public NameContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_name; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitName(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitName(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final NameContext name() throws RecognitionException {
|
|
|
+ NameContext _localctx = new NameContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 34, RULE_name);
|
|
|
+ int _la;
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(210);
|
|
|
+ _la = _input.LA(1);
|
|
|
+ if ( !(_la==PATH || _la==ID) ) {
|
|
|
+ _errHandler.recoverInline(this);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
|
|
|
+ _errHandler.reportMatch(this);
|
|
|
+ consume();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class PathContext extends ParserRuleContext {
|
|
|
+ public TerminalNode PATH() { return getToken(AidlParser.PATH, 0); }
|
|
|
+ public PathContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_path; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterPath(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitPath(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitPath(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final PathContext path() throws RecognitionException {
|
|
|
+ PathContext _localctx = new PathContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 36, RULE_path);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(212);
|
|
|
+ match(PATH);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static class IdContext extends ParserRuleContext {
|
|
|
+ public TerminalNode ID() { return getToken(AidlParser.ID, 0); }
|
|
|
+ public IdContext(ParserRuleContext parent, int invokingState) {
|
|
|
+ super(parent, invokingState);
|
|
|
+ }
|
|
|
+ @Override public int getRuleIndex() { return RULE_id; }
|
|
|
+ @Override
|
|
|
+ public void enterRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).enterId(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void exitRule(ParseTreeListener listener) {
|
|
|
+ if ( listener instanceof AidlListener ) ((AidlListener)listener).exitId(this);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public <T> T accept(ParseTreeVisitor<? extends T> visitor) {
|
|
|
+ if ( visitor instanceof AidlVisitor ) return ((AidlVisitor<? extends T>)visitor).visitId(this);
|
|
|
+ else return visitor.visitChildren(this);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public final IdContext id() throws RecognitionException {
|
|
|
+ IdContext _localctx = new IdContext(_ctx, getState());
|
|
|
+ enterRule(_localctx, 38, RULE_id);
|
|
|
+ try {
|
|
|
+ enterOuterAlt(_localctx, 1);
|
|
|
+ {
|
|
|
+ setState(214);
|
|
|
+ match(ID);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (RecognitionException re) {
|
|
|
+ _localctx.exception = re;
|
|
|
+ _errHandler.reportError(this, re);
|
|
|
+ _errHandler.recover(this, re);
|
|
|
+ }
|
|
|
+ finally {
|
|
|
+ exitRule();
|
|
|
+ }
|
|
|
+ return _localctx;
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
|
|
+ switch (ruleIndex) {
|
|
|
+ case 8:
|
|
|
+ return methodReturnType_sempred((MethodReturnTypeContext)_localctx, predIndex);
|
|
|
+ case 11:
|
|
|
+ return paramTag_sempred((ParamTagContext)_localctx, predIndex);
|
|
|
+ case 12:
|
|
|
+ return paramType_sempred((ParamTypeContext)_localctx, predIndex);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ private boolean methodReturnType_sempred(MethodReturnTypeContext _localctx, int predIndex) {
|
|
|
+ switch (predIndex) {
|
|
|
+ case 0:
|
|
|
+ return oneway==0;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ private boolean paramTag_sempred(ParamTagContext _localctx, int predIndex) {
|
|
|
+ switch (predIndex) {
|
|
|
+ case 1:
|
|
|
+ return oneway==0;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ private boolean paramType_sempred(ParamTypeContext _localctx, int predIndex) {
|
|
|
+ switch (predIndex) {
|
|
|
+ case 2:
|
|
|
+ return _localctx.tag==null;
|
|
|
+ case 3:
|
|
|
+ return _localctx.tag!=null;
|
|
|
+ case 4:
|
|
|
+ return _localctx.tag.equals("in");
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static final String _serializedATN =
|
|
|
+ "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3.\u00db\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\4\20\t\20\4\21\t\21\4\22\t\22"+
|
|
|
+ "\4\23\t\23\4\24\t\24\4\25\t\25\3\2\3\2\3\2\7\2.\n\2\f\2\16\2\61\13\2\3"+
|
|
|
+ "\2\5\2\64\n\2\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6"+
|
|
|
+ "\3\6\5\6E\n\6\3\6\3\6\3\6\3\6\7\6K\n\6\f\6\16\6N\13\6\3\6\3\6\3\7\3\7"+
|
|
|
+ "\5\7T\n\7\3\b\3\b\3\b\5\bY\n\b\3\b\3\b\3\b\3\b\5\b_\n\b\3\b\3\b\3\b\5"+
|
|
|
+ "\bd\n\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+
|
|
|
+ "\t\5\tv\n\t\3\n\3\n\5\nz\n\n\3\n\3\n\5\n~\n\n\3\13\3\13\3\13\7\13\u0083"+
|
|
|
+ "\n\13\f\13\16\13\u0086\13\13\3\f\5\f\u0089\n\f\3\f\5\f\u008c\n\f\3\f\3"+
|
|
|
+ "\f\3\f\3\r\3\r\3\r\5\r\u0094\n\r\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u009c"+
|
|
|
+ "\n\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00a8\n\16"+
|
|
|
+ "\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u00b3\n\16\5\16\u00b5"+
|
|
|
+ "\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\5\17\u00bf\n\17\3\17\3\17"+
|
|
|
+ "\7\17\u00c3\n\17\f\17\16\17\u00c6\13\17\3\20\3\20\3\20\3\20\3\20\5\20"+
|
|
|
+ "\u00cd\n\20\3\21\3\21\5\21\u00d1\n\21\3\22\3\22\3\23\3\23\3\24\3\24\3"+
|
|
|
+ "\25\3\25\3\25\2\2\26\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(\2\4"+
|
|
|
+ "\4\2\24\24\26\26\3\2()\2\u00e6\2*\3\2\2\2\4\65\3\2\2\2\69\3\2\2\2\b=\3"+
|
|
|
+ "\2\2\2\nA\3\2\2\2\fS\3\2\2\2\16U\3\2\2\2\20u\3\2\2\2\22}\3\2\2\2\24\177"+
|
|
|
+ "\3\2\2\2\26\u0088\3\2\2\2\30\u0093\3\2\2\2\32\u00b4\3\2\2\2\34\u00be\3"+
|
|
|
+ "\2\2\2\36\u00c7\3\2\2\2 \u00d0\3\2\2\2\"\u00d2\3\2\2\2$\u00d4\3\2\2\2"+
|
|
|
+ "&\u00d6\3\2\2\2(\u00d8\3\2\2\2*\63\5\4\3\2+\64\5\6\4\2,.\5\b\5\2-,\3\2"+
|
|
|
+ "\2\2.\61\3\2\2\2/-\3\2\2\2/\60\3\2\2\2\60\62\3\2\2\2\61/\3\2\2\2\62\64"+
|
|
|
+ "\5\n\6\2\63+\3\2\2\2\63/\3\2\2\2\64\3\3\2\2\2\65\66\7\f\2\2\66\67\5$\23"+
|
|
|
+ "\2\678\7&\2\28\5\3\2\2\29:\7\r\2\2:;\5(\25\2;<\7&\2\2<\7\3\2\2\2=>\7\16"+
|
|
|
+ "\2\2>?\5&\24\2?@\7&\2\2@\t\3\2\2\2AD\b\6\1\2BC\7\20\2\2CE\b\6\1\2DB\3"+
|
|
|
+ "\2\2\2DE\3\2\2\2EF\3\2\2\2FG\7\17\2\2GH\5(\25\2HL\7\36\2\2IK\5\f\7\2J"+
|
|
|
+ "I\3\2\2\2KN\3\2\2\2LJ\3\2\2\2LM\3\2\2\2MO\3\2\2\2NL\3\2\2\2OP\7\37\2\2"+
|
|
|
+ "P\13\3\2\2\2QT\5\16\b\2RT\5\20\t\2SQ\3\2\2\2SR\3\2\2\2T\r\3\2\2\2UX\b"+
|
|
|
+ "\b\1\2VW\7\20\2\2WY\b\b\1\2XV\3\2\2\2XY\3\2\2\2YZ\3\2\2\2Z[\5\22\n\2["+
|
|
|
+ "\\\5(\25\2\\^\7\34\2\2]_\5\24\13\2^]\3\2\2\2^_\3\2\2\2_`\3\2\2\2`c\7\35"+
|
|
|
+ "\2\2ab\7\'\2\2bd\7\6\2\2ca\3\2\2\2cd\3\2\2\2de\3\2\2\2ef\7&\2\2f\17\3"+
|
|
|
+ "\2\2\2gh\7\22\2\2hi\7\6\2\2ij\5(\25\2jk\7\'\2\2kl\7*\2\2lm\7&\2\2mv\3"+
|
|
|
+ "\2\2\2no\7\22\2\2op\7\27\2\2pq\5(\25\2qr\7\'\2\2rs\7+\2\2st\7&\2\2tv\3"+
|
|
|
+ "\2\2\2ug\3\2\2\2un\3\2\2\2v\21\3\2\2\2wy\6\n\2\2xz\7\23\2\2yx\3\2\2\2"+
|
|
|
+ "yz\3\2\2\2z{\3\2\2\2{~\5\34\17\2|~\7\21\2\2}w\3\2\2\2}|\3\2\2\2~\23\3"+
|
|
|
+ "\2\2\2\177\u0084\5\26\f\2\u0080\u0081\7%\2\2\u0081\u0083\5\26\f\2\u0082"+
|
|
|
+ "\u0080\3\2\2\2\u0083\u0086\3\2\2\2\u0084\u0082\3\2\2\2\u0084\u0085\3\2"+
|
|
|
+ "\2\2\u0085\25\3\2\2\2\u0086\u0084\3\2\2\2\u0087\u0089\7\23\2\2\u0088\u0087"+
|
|
|
+ "\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008b\3\2\2\2\u008a\u008c\5\30\r\2"+
|
|
|
+ "\u008b\u008a\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008e"+
|
|
|
+ "\5\32\16\2\u008e\u008f\5(\25\2\u008f\27\3\2\2\2\u0090\u0094\7\25\2\2\u0091"+
|
|
|
+ "\u0092\6\r\3\2\u0092\u0094\t\2\2\2\u0093\u0090\3\2\2\2\u0093\u0091\3\2"+
|
|
|
+ "\2\2\u0094\31\3\2\2\2\u0095\u009b\6\16\4\3\u0096\u009c\7\3\2\2\u0097\u009c"+
|
|
|
+ "\7\27\2\2\u0098\u0099\5 \21\2\u0099\u009a\b\16\1\2\u009a\u009c\3\2\2\2"+
|
|
|
+ "\u009b\u0096\3\2\2\2\u009b\u0097\3\2\2\2\u009b\u0098\3\2\2\2\u009c\u00b5"+
|
|
|
+ "\3\2\2\2\u009d\u00b2\6\16\5\3\u009e\u00b3\7\31\2\2\u009f\u00b3\7\30\2"+
|
|
|
+ "\2\u00a0\u00b3\5\36\20\2\u00a1\u00a2\5$\23\2\u00a2\u00a3\b\16\1\2\u00a3"+
|
|
|
+ "\u00a8\3\2\2\2\u00a4\u00a5\5\34\17\2\u00a5\u00a6\b\16\1\2\u00a6\u00a8"+
|
|
|
+ "\3\2\2\2\u00a7\u00a1\3\2\2\2\u00a7\u00a4\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9"+
|
|
|
+ "\u00aa\6\16\6\3\u00aa\u00b3\3\2\2\2\u00ab\u00ac\5\"\22\2\u00ac\u00ad\b"+
|
|
|
+ "\16\1\2\u00ad\u00b3\3\2\2\2\u00ae\u00af\5\34\17\2\u00af\u00b0\7 \2\2\u00b0"+
|
|
|
+ "\u00b1\7!\2\2\u00b1\u00b3\3\2\2\2\u00b2\u009e\3\2\2\2\u00b2\u009f\3\2"+
|
|
|
+ "\2\2\u00b2\u00a0\3\2\2\2\u00b2\u00a7\3\2\2\2\u00b2\u00ab\3\2\2\2\u00b2"+
|
|
|
+ "\u00ae\3\2\2\2\u00b3\u00b5\3\2\2\2\u00b4\u0095\3\2\2\2\u00b4\u009d\3\2"+
|
|
|
+ "\2\2\u00b5\33\3\2\2\2\u00b6\u00bf\7\3\2\2\u00b7\u00bf\7\27\2\2\u00b8\u00bf"+
|
|
|
+ "\7\30\2\2\u00b9\u00bf\7\31\2\2\u00ba\u00bf\5\36\20\2\u00bb\u00bc\5\"\22"+
|
|
|
+ "\2\u00bc\u00bd\b\17\1\2\u00bd\u00bf\3\2\2\2\u00be\u00b6\3\2\2\2\u00be"+
|
|
|
+ "\u00b7\3\2\2\2\u00be\u00b8\3\2\2\2\u00be\u00b9\3\2\2\2\u00be\u00ba\3\2"+
|
|
|
+ "\2\2\u00be\u00bb\3\2\2\2\u00bf\u00c4\3\2\2\2\u00c0\u00c1\7 \2\2\u00c1"+
|
|
|
+ "\u00c3\7!\2\2\u00c2\u00c0\3\2\2\2\u00c3\u00c6\3\2\2\2\u00c4\u00c2\3\2"+
|
|
|
+ "\2\2\u00c4\u00c5\3\2\2\2\u00c5\35\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c7\u00cc"+
|
|
|
+ "\7\32\2\2\u00c8\u00c9\7\"\2\2\u00c9\u00ca\5\34\17\2\u00ca\u00cb\7#\2\2"+
|
|
|
+ "\u00cb\u00cd\3\2\2\2\u00cc\u00c8\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd\37"+
|
|
|
+ "\3\2\2\2\u00ce\u00d1\7\33\2\2\u00cf\u00d1\5$\23\2\u00d0\u00ce\3\2\2\2"+
|
|
|
+ "\u00d0\u00cf\3\2\2\2\u00d1!\3\2\2\2\u00d2\u00d3\5$\23\2\u00d3#\3\2\2\2"+
|
|
|
+ "\u00d4\u00d5\t\3\2\2\u00d5%\3\2\2\2\u00d6\u00d7\7(\2\2\u00d7\'\3\2\2\2"+
|
|
|
+ "\u00d8\u00d9\7)\2\2\u00d9)\3\2\2\2\31/\63DLSX^cuy}\u0084\u0088\u008b\u0093"+
|
|
|
+ "\u009b\u00a7\u00b2\u00b4\u00be\u00c4\u00cc\u00d0";
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|