~washort/pymeta/ometa-2

« back to all changes in this revision

Viewing changes to pymeta/test/test_pymeta.py

  • Committer: Allen Short
  • Date: 2008-07-11 19:08:37 UTC
  • Revision ID: washort@divmod.com-20080711190837-i2n635hhl5mvlx2v
JS-style input buffer. Seems slightly faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
            """
29
29
            obj = self.klass(str)
30
30
            ret = obj.apply(name)
31
 
            extra = list(obj.input)
32
 
            if not extra:
 
31
            try:
 
32
                extra = obj.input.head()
 
33
            except IndexError:
33
34
                try:
34
35
                    return ''.join(ret)
35
36
                except TypeError:
455
456
 
456
457
class NullOptimizerTest(OMetaTestCase):
457
458
    """
458
 
    Tests of OMeta grammar compilation via the null optimizer..
 
459
    Tests of OMeta grammar compilation via the null optimizer.
459
460
    """
460
461
 
461
462
    def compile(self, grammar):