Пример #1
0
        private string SimpleExpressionPart(SimpleExpressionPartNode node)
        {
            string output = "";

            output += Term(node.term);
            switch (node.addop)
            {
            case "+":
                output += "add\n";
                break;

            case "-":
                output += "sub\n";
                break;

            case "or":
                output += "or\n";
                break;
            }
            if (node.part != null)
            {
                output += SimpleExpressionPart(node.part);
            }
            return(output);
        }
Пример #2
0
        public SimpleExpressionPartNode SimpleExpressionPart()
        {
            var simpleExpressionPart = new SimpleExpressionPartNode();

            Match(TokenTypes.ADDOP);
            simpleExpressionPart.addop = returnToken.value;
            simpleExpressionPart.term  = Term();
            if (token.type == TokenTypes.ADDOP)
            {
                simpleExpressionPart.part = SimpleExpressionPart();
            }

            return(simpleExpressionPart);
        }
Пример #3
0
 public SimpleExpressionPartNode()
 {
     part = null;
 }
Пример #4
0
 public SimpleExpressionNode()
 {
     part = null;
     sign = "";
 }