|
@@ -0,0 +1,22 @@
+--- py/lekatnet/tpg.py 2009-01-08 09:55:10.000000000 -0800
++++ py/lekatnet/tpg.py 2009-01-08 09:56:23.000000000 -0800
+@@ -748,8 +748,8 @@
+ item.start is the token from which the extraction starts
+ item.stop is the token where the extraction stops
+ """
+- start = item.start and item.start.next_start or 0
+- stop = item.stop and item.stop.stop or -1
++ start = item.start
++ stop = item.stop
+ return self.input[start:stop]
+
+ class Token:
+@@ -983,7 +983,7 @@
+ start : token object as returned by mark
+ stop : token object as returned by mark
+ """
+- return self.lexer[start:stop]
++ return self.lexer[start.start+1:stop.prev_stop+1]
+
+ def check(self, cond):
+ """ check a condition and backtrack when it is False
|