AIMA.Core.Logic.FOL.Parsing.FOLParser.match C# (CSharp) Method

match() protected method

protected match ( String terminalSymbol ) : void
terminalSymbol String
return void
        protected void match(String terminalSymbol)
        {
            if (lookAhead(1).getText().Equals(terminalSymbol))
            {
                consume();
            }
            else
            {
                throw new ApplicationException(
                        "Syntax error detected at match. Expected "
                                + terminalSymbol + " but got "
                                + lookAhead(1).getText());
            }

        }