File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 2
2
"""
3
3
Code needed to run a grammar after it has been compiled.
4
4
"""
5
- import string
6
5
import time
7
- import operator
8
6
from textwrap import dedent
9
7
from terml .nodes import coerceToTerm , Term , termMaker as t
10
8
from ometa .builder import moduleFromGrammar , writePython
@@ -598,7 +596,7 @@ def _not(self, fn):
598
596
m = self .input
599
597
try :
600
598
fn ()
601
- except ParseError , e :
599
+ except ParseError :
602
600
self .input = m
603
601
return True , self .input .nullError ()
604
602
else :
@@ -614,9 +612,9 @@ def eatWhitespace(self):
614
612
c , e = self .input .head ()
615
613
except EOFError , e :
616
614
break
617
- t = self .input .tail ()
615
+ tl = self .input .tail ()
618
616
if c .isspace ():
619
- self .input = t
617
+ self .input = tl
620
618
else :
621
619
break
622
620
return True , e
@@ -851,7 +849,7 @@ def parseGrammar(self, name):
851
849
self .name = name
852
850
res , err = self .apply ("grammar" )
853
851
try :
854
- x = self .input .head ()
852
+ self .input .head ()
855
853
except EOFError :
856
854
pass
857
855
else :
You can’t perform that action at this time.
0 commit comments