$ANTLR start "FETCH"
508440
public final void mFETCH() throws RecognitionException {
		try {
			int _type = FETCH;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:28:7: ( 'fetch' )
			// hql.g:28:9: 'fetch'
			{
			match("fetch"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
585790
@Override
	public void mTokens() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:8: ( WS | FLOAT | HEX | DECIMAL | STRING | TIME_INTERVAL | BOOL | NULL | AT | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | UNIFY | DECR | INCR | ARROW | SEMICOLON | COLON | EQUALS | NOT_EQUALS | GREATER_EQUALS | LESS_EQUALS | GREATER | LESS | EQUALS_ASSIGN | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOT | NULL_SAFE_DOT | DOUBLE_AMPER | DOUBLE_PIPE | QUESTION | NEGATION | TILDE | PIPE | AMPER | XOR | MOD | STAR | MINUS | PLUS | HASH | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | ID | DIV | MISC )
		int alt63=57;
		alt63 = dfa63.predict(input);
		switch (alt63) {
			case 1 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:10: WS
				{
				mWS(); if (state.failed) return;

				}
				break;
			case 2 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:13: FLOAT
				{
				mFLOAT(); if (state.failed) return;

				}
				break;
			case 3 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:19: HEX
				{
				mHEX(); if (state.failed) return;

				}
				break;
			case 4 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:23: DECIMAL
				{
				mDECIMAL(); if (state.failed) return;

				}
				break;
			case 5 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:31: STRING
				{
				mSTRING(); if (state.failed) return;

				}
				break;
			case 6 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:38: TIME_INTERVAL
				{
				mTIME_INTERVAL(); if (state.failed) return;

				}
				break;
			case 7 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:52: BOOL
				{
				mBOOL(); if (state.failed) return;

				}
				break;
			case 8 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:57: NULL
				{
				mNULL(); if (state.failed) return;

				}
				break;
			case 9 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:62: AT
				{
				mAT(); if (state.failed) return;

				}
				break;
			case 10 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:65: PLUS_ASSIGN
				{
				mPLUS_ASSIGN(); if (state.failed) return;

				}
				break;
			case 11 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:77: MINUS_ASSIGN
				{
				mMINUS_ASSIGN(); if (state.failed) return;

				}
				break;
			case 12 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:90: MULT_ASSIGN
				{
				mMULT_ASSIGN(); if (state.failed) return;

				}
				break;
			case 13 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:102: DIV_ASSIGN
				{
				mDIV_ASSIGN(); if (state.failed) return;

				}
				break;
			case 14 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:113: AND_ASSIGN
				{
				mAND_ASSIGN(); if (state.failed) return;

				}
				break;
			case 15 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:124: OR_ASSIGN
				{
				mOR_ASSIGN(); if (state.failed) return;

				}
				break;
			case 16 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:134: XOR_ASSIGN
				{
				mXOR_ASSIGN(); if (state.failed) return;

				}
				break;
			case 17 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:145: MOD_ASSIGN
				{
				mMOD_ASSIGN(); if (state.failed) return;

				}
				break;
			case 18 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:156: UNIFY
				{
				mUNIFY(); if (state.failed) return;

				}
				break;
			case 19 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:162: DECR
				{
				mDECR(); if (state.failed) return;

				}
				break;
			case 20 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:167: INCR
				{
				mINCR(); if (state.failed) return;

				}
				break;
			case 21 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:172: ARROW
				{
				mARROW(); if (state.failed) return;

				}
				break;
			case 22 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:178: SEMICOLON
				{
				mSEMICOLON(); if (state.failed) return;

				}
				break;
			case 23 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:188: COLON
				{
				mCOLON(); if (state.failed) return;

				}
				break;
			case 24 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:194: EQUALS
				{
				mEQUALS(); if (state.failed) return;

				}
				break;
			case 25 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:201: NOT_EQUALS
				{
				mNOT_EQUALS(); if (state.failed) return;

				}
				break;
			case 26 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:212: GREATER_EQUALS
				{
				mGREATER_EQUALS(); if (state.failed) return;

				}
				break;
			case 27 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:227: LESS_EQUALS
				{
				mLESS_EQUALS(); if (state.failed) return;

				}
				break;
			case 28 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:239: GREATER
				{
				mGREATER(); if (state.failed) return;

				}
				break;
			case 29 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:247: LESS
				{
				mLESS(); if (state.failed) return;

				}
				break;
			case 30 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:252: EQUALS_ASSIGN
				{
				mEQUALS_ASSIGN(); if (state.failed) return;

				}
				break;
			case 31 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:266: LEFT_PAREN
				{
				mLEFT_PAREN(); if (state.failed) return;

				}
				break;
			case 32 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:277: RIGHT_PAREN
				{
				mRIGHT_PAREN(); if (state.failed) return;

				}
				break;
			case 33 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:289: LEFT_SQUARE
				{
				mLEFT_SQUARE(); if (state.failed) return;

				}
				break;
			case 34 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:301: RIGHT_SQUARE
				{
				mRIGHT_SQUARE(); if (state.failed) return;

				}
				break;
			case 35 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:314: LEFT_CURLY
				{
				mLEFT_CURLY(); if (state.failed) return;

				}
				break;
			case 36 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:325: RIGHT_CURLY
				{
				mRIGHT_CURLY(); if (state.failed) return;

				}
				break;
			case 37 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:337: COMMA
				{
				mCOMMA(); if (state.failed) return;

				}
				break;
			case 38 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:343: DOT
				{
				mDOT(); if (state.failed) return;

				}
				break;
			case 39 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:347: NULL_SAFE_DOT
				{
				mNULL_SAFE_DOT(); if (state.failed) return;

				}
				break;
			case 40 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:361: DOUBLE_AMPER
				{
				mDOUBLE_AMPER(); if (state.failed) return;

				}
				break;
			case 41 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:374: DOUBLE_PIPE
				{
				mDOUBLE_PIPE(); if (state.failed) return;

				}
				break;
			case 42 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:386: QUESTION
				{
				mQUESTION(); if (state.failed) return;

				}
				break;
			case 43 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:395: NEGATION
				{
				mNEGATION(); if (state.failed) return;

				}
				break;
			case 44 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:404: TILDE
				{
				mTILDE(); if (state.failed) return;

				}
				break;
			case 45 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:410: PIPE
				{
				mPIPE(); if (state.failed) return;

				}
				break;
			case 46 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:415: AMPER
				{
				mAMPER(); if (state.failed) return;

				}
				break;
			case 47 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:421: XOR
				{
				mXOR(); if (state.failed) return;

				}
				break;
			case 48 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:425: MOD
				{
				mMOD(); if (state.failed) return;

				}
				break;
			case 49 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:429: STAR
				{
				mSTAR(); if (state.failed) return;

				}
				break;
			case 50 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:434: MINUS
				{
				mMINUS(); if (state.failed) return;

				}
				break;
			case 51 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:440: PLUS
				{
				mPLUS(); if (state.failed) return;

				}
				break;
			case 52 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:445: HASH
				{
				mHASH(); if (state.failed) return;

				}
				break;
			case 53 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:450: C_STYLE_SINGLE_LINE_COMMENT
				{
				mC_STYLE_SINGLE_LINE_COMMENT(); if (state.failed) return;

				}
				break;
			case 54 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:478: MULTI_LINE_COMMENT
				{
				mMULTI_LINE_COMMENT(); if (state.failed) return;

				}
				break;
			case 55 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:497: ID
				{
				mID(); if (state.failed) return;

				}
				break;
			case 56 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:500: DIV
				{
				mDIV(); if (state.failed) return;

				}
				break;
			case 57 :
				// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:504: MISC
				{
				mMISC(); if (state.failed) return;

				}
				break;

		}
	}
815650
public final void mDOT() throws RecognitionException {
		try {
			int _type = DOT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:264:5: ( '.' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:264:7: '.'
			{
			match('.'); if (state.failed) return;
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
244951
private void read() throws IOException, GrammarException {
	try {
	    logger.debug("Read grammar file...");
	    logger.debug("Starting lexer...");
	    Lexer lexer = new RegExpLexer(uhuraGrammar);
	    TokenStream tokenStream = lexer.lex(SourceCode.read(reader,
		    new UnspecifiedSourceCodeLocation()));
	    logger.debug("Starting parser...");
	    parse(tokenStream);
	    logger.debug("done reading grammar file.");
	} catch (LexerException e) {
	    logger.error(e.getMessage(), e);
	    throw new IOException(e.getMessage(), e);
	} catch (ParserException e) {
	    logger.error(e.getMessage(), e);
	    throw new IOException(e.getMessage(), e);
	}
    }
834093
public final void mEMPTY() throws RecognitionException {
		try {
			int _type = EMPTY;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:23:7: ( 'empty' )
			// hql.g:23:9: 'empty'
			{
			match("empty"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
639127
def fetch(*args)
      raise ArgumentError, "Expected 1-2 arguments, got #{args.length}" \
        unless (1..2).cover?(args.length)

      key, default = args

      all(key) do |value|
        return value
      end

      if block_given?
        yield key
      elsif default
        default
      else
        raise KeyError, "key not found: #{key.inspect}"
      end
    end
722756
function parseTag(str, line) {
    var tokens, parser, chunks, tagName, tag, args, last;

    if (utils.startsWith(str, 'end')) {
      last = stack[stack.length - 1];
      if (last && last.name === str.split(/\s+/)[0].replace(/^end/, '') && last.ends) {
        switch (last.name) {
        case 'autoescape':
          escape = opts.autoescape;
          break;
        case 'raw':
          inRaw = false;
          break;
        }
        stack.pop();
        return;
      }

      if (!inRaw) {
        utils.throwError('Unexpected end of tag "' + str.replace(/^end/, '') + '"', line, opts.filename);
      }
    }

    if (inRaw) {
      return;
    }

    chunks = str.split(/\s+(.+)?/);
    tagName = chunks.shift();

    if (!tags.hasOwnProperty(tagName)) {
      utils.throwError('Unexpected tag "' + str + '"', line, opts.filename);
    }

    tokens = lexer.read(utils.strip(chunks.join(' ')));
    parser = new TokenParser(tokens, filters, false, line, opts.filename);
    tag = tags[tagName];

    /**
     * Define custom parsing methods for your tag.
     * @callback parse
     *
     * @example
     * exports.parse = function (str, line, parser, types, options, swig) {
     *   parser.on('start', function () {
     *     // ...
     *   });
     *   parser.on(types.STRING, function (token) {
     *     // ...
     *   });
     * };
     *
     * @param {string} str The full token string of the tag.
     * @param {number} line The line number that this tag appears on.
     * @param {TokenParser} parser A TokenParser instance.
     * @param {TYPES} types Lexer token type enum.
     * @param {TagToken[]} stack The current stack of open tags.
     * @param {SwigOpts} options Swig Options Object.
     * @param {object} swig The Swig instance (gives acces to loaders, parsers, etc)
     */
    if (!tag.parse(chunks[1], line, parser, _t, stack, opts, swig)) {
      utils.throwError('Unexpected tag "' + tagName + '"', line, opts.filename);
    }

    parser.parse();
    args = parser.out;

    switch (tagName) {
    case 'autoescape':
      escape = (args[0] !== 'false') ? args[0] : false;
      break;
    case 'raw':
      inRaw = true;
      break;
    }

    /**
     * A parsed tag token.
     * @typedef {Object} TagToken
     * @property {compile} [compile] Method for compiling this token.
     * @property {array} [args] Array of arguments for the tag.
     * @property {Token[]} [content=[]] An array of tokens that are children of this Token.
     * @property {boolean} [ends] Whether or not this tag requires an end tag.
     * @property {string} name The name of this tag.
     */
    return {
      block: !!tags[tagName].block,
      compile: tag.compile,
      args: args,
      content: [],
      ends: tag.ends,
      name: tagName
    };
  }
1024180
def call_antlr4(arg):
    ""
    # pylint: disable=unused-argument, unused-variable
    antlr_path = os.path.join(ROOT_DIR, "java", "antlr-4.7-complete.jar")
    classpath = os.pathsep.join([".", "{:s}".format(antlr_path), "$CLASSPATH"])
    generated = os.path.join(ROOT_DIR, 'src', 'pymoca', 'generated')
    cmd = "java -Xmx500M -cp \"{classpath:s}\" org.antlr.v4.Tool {arg:s}" \
          " -o {generated:s} -visitor -Dlanguage=Python3".format(**locals())
    print(cmd)
    proc = subprocess.Popen(cmd.split(), cwd=os.path.join(ROOT_DIR, 'src', 'pymoca'))
    proc.communicate()
    with open(os.path.join(generated, '__init__.py'), 'w') as fid:
        fid.write('')
681918
public void mTokens() throws RecognitionException {
        // /home/victor/srec/core/src/main/antlr/srec.g:1:8: ( T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | BOOLEAN | NULL | ID | NUMBER | STRING | WS | NEWLINE | COMMENT )
        int alt12=15;
        alt12 = dfa12.predict(input);
        switch (alt12) {
            case 1 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:10: T__28
                {
                mT__28(); 

                }
                break;
            case 2 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:16: T__29
                {
                mT__29(); 

                }
                break;
            case 3 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:22: T__30
                {
                mT__30(); 

                }
                break;
            case 4 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:28: T__31
                {
                mT__31(); 

                }
                break;
            case 5 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:34: T__32
                {
                mT__32(); 

                }
                break;
            case 6 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:40: T__33
                {
                mT__33(); 

                }
                break;
            case 7 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:46: T__34
                {
                mT__34(); 

                }
                break;
            case 8 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:52: BOOLEAN
                {
                mBOOLEAN(); 

                }
                break;
            case 9 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:60: NULL
                {
                mNULL(); 

                }
                break;
            case 10 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:65: ID
                {
                mID(); 

                }
                break;
            case 11 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:68: NUMBER
                {
                mNUMBER(); 

                }
                break;
            case 12 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:75: STRING
                {
                mSTRING(); 

                }
                break;
            case 13 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:82: WS
                {
                mWS(); 

                }
                break;
            case 14 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:85: NEWLINE
                {
                mNEWLINE(); 

                }
                break;
            case 15 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:93: COMMENT
                {
                mCOMMENT(); 

                }
                break;

        }

    }
334190
function initializeParser(document, debug) {
    const chars = new antlr.InputStream(document);
    const lexer = new grammar.DocumentLexer(chars);
    const listener = new CustomErrorListener(debug);
    lexer.removeErrorListeners();
    lexer.addErrorListener(listener);
    const tokens = new antlr.CommonTokenStream(lexer);
    const parser = new grammar.DocumentParser(tokens);
    parser.buildParseTrees = true;
    parser.removeErrorListeners();
    parser.addErrorListener(listener);
    parser._errHandler = new CustomErrorStrategy();
    return parser;
}
835609
function getSyntacticAutoCompleteSuggestions(input, startRule = 'prog') {
  const lexResult = JDLLexer.tokenize(input);

  // ".input" is a setter which will reset the parser's internal state.
  parserSingleton.input = lexResult.tokens;

  const syntacticSuggestions = parserSingleton.computeContentAssist(startRule, lexResult.tokens);

  // Each suggestion includes additional information such as the "Rule Stack" at suggestion point.
  // This may be handy for advanced implementations, e.g: different logic for suggesting a NAME token in an entity
  // or a field. But it is irrelevant in the scope of the POC.
  return _.uniq(syntacticSuggestions.map(suggestion => suggestion.nextTokenType));
}
708344
def parent_fetcher(getter)
      parent = getter.strip.gsub(/[.][^.]+$/, '')

      parent = 'self' if parent.blank? || !getter.index('.')

      parent
    end
229101
public final void selector() throws RecognitionException {
		int selector_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 138) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1284:5: ( '.' methodName ( arguments )? | '.' 'this' | '.' 'super' superSuffix | '.' 'new' ( nonWildcardTypeArguments )? innerCreator | '[' expression ']' )
			int alt189=5;
			int LA189_0 = input.LA(1);
			if ( (LA189_0==47) ) {
				switch ( input.LA(2) ) {
				case 111:
					{
					alt189=2;
					}
					break;
				case 108:
					{
					alt189=3;
					}
					break;
				case 97:
					{
					alt189=4;
					}
					break;
				case Identifier:
				case 75:
				case 90:
				case 95:
				case 103:
				case 117:
					{
					alt189=1;
					}
					break;
				default:
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 189, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}
			}
			else if ( (LA189_0==59) ) {
				alt189=5;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 189, 0, input);
				throw nvae;
			}

			switch (alt189) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1284:7: '.' methodName ( arguments )?
					{
					match(input,47,FOLLOW_47_in_selector6270); if (state.failed) return;
					pushFollow(FOLLOW_methodName_in_selector6272);
					methodName();
					state._fsp--;
					if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1284:22: ( arguments )?
					int alt187=2;
					int LA187_0 = input.LA(1);
					if ( (LA187_0==36) ) {
						alt187=1;
					}
					switch (alt187) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1284:23: arguments
							{
							pushFollow(FOLLOW_arguments_in_selector6275);
							arguments();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1285:9: '.' 'this'
					{
					match(input,47,FOLLOW_47_in_selector6287); if (state.failed) return;
					match(input,111,FOLLOW_111_in_selector6289); if (state.failed) return;
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1286:9: '.' 'super' superSuffix
					{
					match(input,47,FOLLOW_47_in_selector6299); if (state.failed) return;
					match(input,108,FOLLOW_108_in_selector6301); if (state.failed) return;
					pushFollow(FOLLOW_superSuffix_in_selector6303);
					superSuffix();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 4 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1287:9: '.' 'new' ( nonWildcardTypeArguments )? innerCreator
					{
					match(input,47,FOLLOW_47_in_selector6313); if (state.failed) return;
					match(input,97,FOLLOW_97_in_selector6315); if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1287:19: ( nonWildcardTypeArguments )?
					int alt188=2;
					int LA188_0 = input.LA(1);
					if ( (LA188_0==53) ) {
						alt188=1;
					}
					switch (alt188) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1287:20: nonWildcardTypeArguments
							{
							pushFollow(FOLLOW_nonWildcardTypeArguments_in_selector6318);
							nonWildcardTypeArguments();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					pushFollow(FOLLOW_innerCreator_in_selector6322);
					innerCreator();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 5 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1288:9: '[' expression ']'
					{
					match(input,59,FOLLOW_59_in_selector6332); if (state.failed) return;
					pushFollow(FOLLOW_expression_in_selector6334);
					expression();
					state._fsp--;
					if (state.failed) return;
					match(input,60,FOLLOW_60_in_selector6336); if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 138, selector_StartIndex); }

		}
	}
1307958
function fetch( $template = false, $extraParameters = false, $returnResourceData = false )
    {
        $this->resetErrorLog();
        // Reset fetch list when a new fetch is started
        $this->TemplateFetchList = array();

        eZDebug::accumulatorStart( 'template_total' );
        eZDebug::accumulatorStart( 'template_load', 'template_total', 'Template load' );
        $root = null;
        if ( is_string( $template ) )
        {
            $resourceData = $this->loadURIRoot( $template, true, $extraParameters );
            if ( $resourceData and
                 $resourceData['root-node'] !== null )
                $root =& $resourceData['root-node'];
        }
        eZDebug::accumulatorStop( 'template_load' );
        if ( $resourceData['locales'] && !empty( $resourceData['locales'] ) )
        {
            $savedLocale = setlocale( LC_CTYPE, null );
            setlocale( LC_CTYPE, $resourceData['locales'] );
        }

        $text = "";

        if ( $root !== null or
             $resourceData['compiled-template'] )
        {
            if ( $this->ShowDetails )
                eZDebug::addTimingPoint( "Process" );
            eZDebug::accumulatorStart( 'template_processing', 'template_total', 'Template processing' );

            $templateCompilationUsed = false;
            if ( $resourceData['compiled-template'] )
            {
                $textElements = array();
                if ( $this->executeCompiledTemplate( $resourceData, $textElements, "", "", $extraParameters ) )
                {
                    $text = implode( '', $textElements );
                    $templateCompilationUsed = true;
                }
            }
            if ( !$templateCompilationUsed )
            {
                if ( eZTemplate::isDebugEnabled() )
                {
                    $fname = $resourceData['template-filename'];
                    eZDebug::writeDebug( "FETCH START URI: $template, $fname" );
                }
                $this->process( $root, $text, "", "" );
                if ( eZTemplate::isDebugEnabled() )
                    eZDebug::writeDebug( "FETCH END URI: $template, $fname" );
            }

            eZDebug::accumulatorStop( 'template_processing' );
            if ( $this->ShowDetails )
                eZDebug::addTimingPoint( "Process done" );
        }

        eZDebug::accumulatorStop( 'template_total' );

        if ( $resourceData['locales'] && !empty( $resourceData['locales'] ) )
        {
            setlocale( LC_CTYPE, $savedLocale );
        }

        if ( $returnResourceData )
        {
            $resourceData['result_text'] = $text;
            return $resourceData;
        }
        return $text;
    }
1129503
function fetch(name, spec, options) {
  if (typeof spec === 'object' && options === undefined) {
    options = spec
    spec = undefined
  }
  spec = spec || '*'

  var p = url.parse(spec) || {}

  switch (p.protocol) {
    case 'http:':
    case 'https:':
      return exports.tarball(name, spec, options)
    case "git:":
    case "git+http:":
    case "git+https:":
    case "git+rsync:":
    case "git+ftp:":
    case "git+ssh:":
      return exports.git(name, spec, options)
    default:
      var result = new PassThrough()
      fs.stat(spec, function (err, stat) {
        if (err === null && stat.isDirectory()) {
          exports.local.dir(name, spec, options)
            .on('end', result.end.bind(result))
            .syphon(result)
        } else if (err === null && stat.isFile()) {
          exports.local.file(name, spec, options)
            .on('end', result.end.bind(result))
            .syphon(result)
        } else if (/^([^\/]+)\/([^\/#]+)(?:#(.+))?$/.test(spec)) {
          exports.github(name, spec, options)
            .on('end', result.end.bind(result))
            .syphon(result)
        } else {
          exports.npm(name, spec, options)
            .on('end', result.end.bind(result))
            .syphon(result)
        }
      })
      return result
  }
}
400055
public final void mAS() throws RecognitionException {
		try {
			int _type = AS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:10:4: ( 'as' )
			// hql.g:10:6: 'as'
			{
			match("as"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
558267
async function main({ isFragment, needsHelp, showVersion, useTabs }) {
  /* eslint-disable no-console */
  const stdin = await getStdin()

  if (showVersion) {
    return console.log(version)
  }

  if (needsHelp || !stdin) {
    return console.log(help)
  }

  const pug = html2pug(stdin, { isFragment, useTabs })
  return console.log(pug)

  /* eslint-enable no-console */
}