AIMA.Core.Logic.Propositional.Parsing.PEParser.parseBracketedSentence C# (CSharp) Метод

parseBracketedSentence() приватный Метод

private parseBracketedSentence ( ) : Sentence
Результат AIMA.Core.Logic.Propositional.Parsing.Ast.Sentence
        private Sentence parseBracketedSentence()
        {

            if (detectMultiOperator())
            {
                return parseMultiSentence();
            }
            else
            {
                match("(");
                Sentence one = parseSentence();
                if (lookAhead(1).getType() == (int)LogicTokenTypes.RPAREN)
                {
                    match(")");
                    return one;
                }
                else if ((lookAhead(1).getType() == (int)LogicTokenTypes.CONNECTOR)
                      && (!(lookAhead(1).getText().Equals("Not"))))
                {
                    String connector = lookAhead(1).getText();
                    consume(); // connector
                    Sentence two = parseSentence();
                    match(")");
                    return new BinarySentence(connector, one, two);
                }

            }
            throw new ApplicationException(
                    " Runtime Exception at Bracketed Expression with token "
                            + lookAhead(1));
        }