(self, instream)
| 56 | _split_decimal = re.compile("([.,])") |
| 57 | |
| 58 | def __init__(self, instream): |
| 59 | if isinstance(instream, (bytes, bytearray)): |
| 60 | instream = instream.decode() |
| 61 | |
| 62 | if isinstance(instream, str): |
| 63 | instream = StringIO(instream) |
| 64 | elif getattr(instream, 'read', None) is None: |
| 65 | raise TypeError('Parser must be a string or character stream, not ' |
| 66 | '{itype}'.format(itype=instream.__class__.__name__)) |
| 67 | |
| 68 | self.instream = instream |
| 69 | self.charstack = [] |
| 70 | self.tokenstack = [] |
| 71 | self.eof = False |
| 72 | |
| 73 | def get_token(self): |
| 74 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected