Exemplo n.º 1
0
 protected ASTElement(string text, nodeType type, ASTElement parent)
 {
     m_nodeType = type;
     m_parent   = parent;
     m_serial   = ms_serialCounter++;
     m_text     = text;
 }
Exemplo n.º 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();
 }
Exemplo n.º 3
0
 public CASTReturnStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENT_RETURN, parent, numContexts)
 {
 }
Exemplo n.º 4
0
 public CASTEpxressionStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_STATEMENT_EXPRESSION, parent, numContexts)
 {
 }
Exemplo n.º 5
0
 public CASTExpressionDivision(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_DIVISION, parent, numContexts)
 {
 }
Exemplo n.º 6
0
 public CASTFunctionDefinition(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_FUNCTIOΝDEFINITION, parent, numContexts)
 {
 }
Exemplo n.º 7
0
 public CASTStatement(String text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent, numContexts)
 {
 }
Exemplo n.º 8
0
 public CASTWhileStatement(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_WHILESTATEMENT, parent, numContexts)
 {
 }
Exemplo n.º 9
0
 public CASTExpressionInParenthesis(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_PARENTHESIS, parent, numContexts)
 {
 }
Exemplo n.º 10
0
 public CASTExpressionMinus(String text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_MINUS, parent, numContexts)
 {
 }
Exemplo n.º 11
0
 public CASTExpressionSubtraction(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_SUBSTRACTION, parent, numContexts)
 {
 }
Exemplo n.º 12
0
 public CASTExpressionAddition(string text, ASTElement parent, int numContexts) : base(text, nodeType.NT_EXPRESSION_ADDITION, parent, numContexts)
 {
 }
Exemplo n.º 13
0
 public CASTIDENTIFIER(string idText, ASTElement parent) : base(idText, nodeType.NT_EXPRESSION_IDENTIFIER,
                                                                parent)
 {
     m_nodeName = GenerateNodeName();
 }
Exemplo n.º 14
0
 protected ASTTerminal(string text, nodeType type, ASTElement parent) : base(text, type, parent)
 {
     m_text = text;
 }
Exemplo n.º 15
0
        internal void AddChild(ASTElement child, contextType ct)
        {
            int index = GetContextIndex(ct);

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