AIMA.Core.Logic.Propositional.Parsing.PELexer.symbol C# (CSharp) Method

symbol() private method

private symbol ( ) : Token
return AIMA.Core.Logic.Common.Token
        private Token symbol()
        {
            StringBuilder sbuf = new StringBuilder();
            while ((char.IsLetterOrDigit(lookAhead(1)))
                    || (lookAhead(1) == '=') || (lookAhead(1) == '<')
                    || (lookAhead(1) == '>'))
            {
                sbuf.Append(lookAhead(1));
                consume();
            }
            String symbol = sbuf.ToString();
            if (isConnector(symbol))
            {
                return new Token((int)LogicTokenTypes.CONNECTOR, sbuf.ToString());
            }
            else if (symbol.ToLower().Equals("true"))
            {
                return new Token((int)LogicTokenTypes.TRUE, "TRUE");
            }
            else if (symbol.ToLower().Equals("false"))
            {
                return new Token((int)LogicTokenTypes.FALSE, "FALSE");
            }
            else
            {
                return new Token((int)LogicTokenTypes.SYMBOL, sbuf.ToString());
            }

        }