| 53 | return self.parent.getLongName() + "." + self.name if self.parent else self.name |
| 54 | |
| 55 | def getInitDump(self): |
| 56 | t = [] |
| 57 | if self.isPositional: |
| 58 | t.append('P') |
| 59 | if self.isDesignated: |
| 60 | t.append('D') |
| 61 | if self.numInits == 0: |
| 62 | t.append('_') |
| 63 | if self.numInits > 1: |
| 64 | t.append(str(self.numInits)) |
| 65 | |
| 66 | myDump = "".join(t) |
| 67 | |
| 68 | if len(self.children): |
| 69 | childDumps = [] |
| 70 | for c in self.children: |
| 71 | childDumps.append(c.getInitDump()) |
| 72 | if self.structureViolationToken is not None: |
| 73 | myDump += "!" |
| 74 | myDump += "{ " + ", ".join(childDumps) + " }" |
| 75 | |
| 76 | return myDump |
| 77 | |
| 78 | def addChild(self, child): |
| 79 | self.children.append(child) |