compiler/PPTokenizingCompiledParser.st
changeset 502 1e45d3c96ec5
parent 464 f6d77fee9811
child 515 b5316ef15274
--- a/compiler/PPTokenizingCompiledParser.st	Thu May 21 14:12:22 2015 +0100
+++ b/compiler/PPTokenizingCompiledParser.st	Fri Jul 24 15:06:54 2015 +0100
@@ -3,7 +3,7 @@
 "{ NameSpace: Smalltalk }"
 
 PPCompiledParser subclass:#PPTokenizingCompiledParser
-	instanceVariableNames:'currentTokenValue currentTokenType'
+	instanceVariableNames:'currentTokenValue currentTokenType scanner'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Parsers'
@@ -12,6 +12,7 @@
 !PPTokenizingCompiledParser methodsFor:'tokenizing'!
 
 consume: tokenType
+    self halt: 'deprecated'.
     (self perform: tokenType) ifTrue: [ 
         currentTokenType := nil.
         ^ currentTokenValue.
@@ -56,6 +57,7 @@
     context noteFailure: failure.
     error := false.
     currentTokenType := nil.
+    scanner := PPCScanner new.
 
     self consumeWhitespace.
     retval := self perform: startSymbol.