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);
        }
        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);
        }
Exemple #3
0
 public SimpleExpressionPartNode()
 {
     part = null;
 }
Exemple #4
0
 public SimpleExpressionNode()
 {
     part = null;
     sign = "";
 }