Grab another set of input tokens and convert them to an output string.
(self)
| 151 | return nextoutput |
| 152 | |
| 153 | def chunk(self): |
| 154 | """Grab another set of input tokens and convert them to an output string.""" |
| 155 | for delta,c in self.candidates(0): |
| 156 | if c in _l2u: |
| 157 | self.pos += delta |
| 158 | return unichr(_l2u[c]) |
| 159 | elif len(c) == 2 and c[1] == 'i' and (c[0],'\\i') in _l2u: |
| 160 | self.pos += delta # correct failure to undot i |
| 161 | return unichr(_l2u[(c[0],'\\i')]) |
| 162 | elif len(c) == 1 and c[0].startswith('\\char') and c[0][5:].isdigit(): |
| 163 | self.pos += delta |
| 164 | return unichr(int(c[0][5:])) |
| 165 | |
| 166 | # nothing matches, just pass through token as-is |
| 167 | self.pos += 1 |
| 168 | return self[-1] |
| 169 | |
| 170 | def candidates(self,offset): |
| 171 | """Generate pairs delta,c where c is a token or tuple of tokens from tex |
no test coverage detected