예제 #1
0
 protected ASTElement(string text, nodeType type, ASTElement parent)
 {
     m_nodeType = type;
     m_parent   = parent;
     m_serial   = ms_serialCounter++;
     m_text     = text;
 }
예제 #2
0
 protected ASTComposite(string text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent)
 {
     m_children = new List <ASTElement> [numContexts];
     for (int i = 0; i < numContexts; i++)
     {
         m_children[i] = new List <ASTElement>();
     }
     m_nodeName = GenerateNodeName();
 }
예제 #3
0
 public CASTReturnStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENT_RETURN, parent, numContexts)
 {
 }
예제 #4
0
 public CASTEpxressionStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENT_EXPRESSION, parent, numContexts)
 {
 }
예제 #5
0
 public CASTExpressionDivision(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_DIVISION, parent, numContexts)
 {
 }
예제 #6
0
 public CASTFunctionDefinition(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_FUNCTIOΝDEFINITION, parent, numContexts)
 {
 }
예제 #7
0
 public CASTStatement(String text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent, numContexts)
 {
 }
예제 #8
0
 public CASTWhileStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_WHILESTATEMENT, parent, numContexts)
 {
 }
예제 #9
0
 public CASTExpressionInParenthesis(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_PARENTHESIS, parent, numContexts)
 {
 }
예제 #10
0
 public CASTExpressionMinus(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_MINUS, parent, numContexts)
 {
 }
예제 #11
0
 public CASTExpressionSubtraction(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_SUBSTRACTION, parent, numContexts)
 {
 }
예제 #12
0
 public CASTExpressionAddition(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_ADDITION, parent, numContexts)
 {
 }
예제 #13
0
 public CASTIDENTIFIER(string idText, ASTElement parent) : base(idText, nodeType.NT_EXPRESSION_IDENTIFIER,
                                                                parent)
 {
     m_nodeName = GenerateNodeName();
 }
예제 #14
0
 protected ASTTerminal(string text, nodeType type, ASTElement parent) : base(text, type, parent)
 {
     m_text = text;
 }
예제 #15
0
        internal void AddChild(ASTElement child, contextType ct)
        {
            int index = GetContextIndex(ct);

            m_children[index].Add(child);
        }
예제 #16
0
 public CASTNUMBER(string numberText, ASTElement parent) : base(numberText, nodeType.NT_EXPRESSION_NUMBER,
                                                                parent)
 {
     m_value    = Int32.Parse(numberText);
     m_nodeName = GenerateNodeName();
 }
예제 #17
0
 public CASTBreakStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENT_BREAK, parent, numContexts)
 {
 }
예제 #18
0
 public CASTExpressionAssign(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_ASSIGN, parent, numContexts)
 {
 }
예제 #19
0
 public CASTIfStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_IFSTATEMENT, parent, numContexts)
 {
 }
예제 #20
0
 public CASTExpressionLte(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_LTE, parent, numContexts)
 {
 }
예제 #21
0
 public CASTCompileUnit(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_COMPILEUNIT, parent, numContexts)
 {
 }
예제 #22
0
 public CASTExpressionNequal(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_NEQUAL, parent, numContexts)
 {
 }
예제 #23
0
 public CASTExpressionMultiplication(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_MULTIPLICATION, parent, numContexts)
 {
 }
예제 #24
0
 public CASTStatementList(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENTLIST, parent, numContexts)
 {
 }
예제 #25
0
 public Result Visit(ASTElement node, VParam param = default(VParam))
 {
     return(node.Accept(this, param));
 }
예제 #26
0
 public CASTCompoundStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_COMPOUNDSTATEMENT, parent, numContexts)
 {
 }