protected ASTElement(string text, nodeType type, ASTElement parent)
 {
     m_nodeType = type;
     m_parent   = parent;
     m_serial   = ms_serialCounter++;
     m_text     = text;
 }
Example #2
0
 protected ASTElement(nodeType type, ASTElement parent)
 {
     m_nodeType = type;
     m_parent   = parent;
     m_serial   = ms_serialCounter++;
     m_nodeName = GenerateNodeName();
 }
 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();
 }
        internal void AddChild(ASTElement child, contextType ct)
        {
            int index = GetContextIndex(ct);

            m_children[index].Add(child);
        }
 protected ASTTerminal(string text, nodeType type, ASTElement parent) : base(text, type, parent)
 {
 }
Example #6
0
 protected ASTTerminal(nodeType type, ASTElement parent) : base(type, parent)
 {
 }
Example #7
0
 protected ASTComposite(nodeType type, ASTElement parent, int numContexts) : base(type, parent)
 {
     m_children = new List <ASTElement> [numContexts];
 }
 public CASTAssignment(string text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent, numContexts)
 {
 }
 public CASTDivision(string text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent, numContexts)
 {
 }
 public CASTIDENTIFIER(string idText, nodeType type, ASTElement parent, int numContexts) : base(idText, type,
                                                                                                parent, numContexts)
 {
     m_nodeName = GenerateNodeName();
 }
 public CASTNUMBER(string numberText, nodeType type, ASTElement parent, int numContexts) : base(numberText, type,
                                                                                                parent, numContexts)
 {
     m_value    = Int32.Parse(numberText);
     m_nodeName = GenerateNodeName();
 }
 public CASTCompileUnit(string text, nodeType type, ASTElement parent, int numContexts) : base(text, type, parent, numContexts)
 {
 }