Create additional useful structures. (Internal).
(self)
| 246 | assert 0, (lineno, line) |
| 247 | |
| 248 | def finish_off(self): |
| 249 | """Create additional useful structures. (Internal).""" |
| 250 | self.keywords = {} # map from keyword strings to arc labels |
| 251 | self.tokens = {} # map from numeric token values to arc labels |
| 252 | for ilabel, (type, value) in enumerate(self.labels): |
| 253 | if type == token.NAME and value is not None: |
| 254 | self.keywords[value] = ilabel |
| 255 | elif value is None: |
| 256 | self.tokens[type] = ilabel |