public Token match(int ttype) throws RecognitionException {
		Token t = getCurrentToken();
		if ( t.getType()==ttype ) {
			if ( ttype==Token.EOF ) {
				matchedEOF = true;
			}
			_errHandler.reportMatch(this);
			consume();
		}
		else {
			t = _errHandler.recoverInline(this);
			if ( _buildParseTrees && t.getTokenIndex()==-1 ) {
				// we must have conjured up a new token during single token insertion
				// if it's not the current symbol
				_ctx.addErrorNode(createErrorNode(_ctx,t));
			}
		}
		return t;
	}
Match current input symbol against {@code ttype}. If the symbol type
matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are
called to complete the match process.

<p>If the symbol type does not match,
{@link ANTLRErrorStrategy#recoverInline} is called on the current error
strategy to attempt recovery. If {@link #getBuildParseTree} is
{@code true} and the token index of the symbol returned by
{@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to
the parse tree by calling {@link #createErrorNode(ParserRuleContext, Token)} then
{@link ParserRuleContext#addErrorNode(ErrorNode)}.</p>

@param ttype the token type to match
@return the matched symbol
@throws RecognitionException if the current input symbol did not match
{@code ttype} and the error strategy could not recover from the
mismatched symbol
runtime/Java/src/org/antlr/v4/runtime/Parser.java