--- a/compiler/PPCCompilerTokenizingRememberStrategy.st Tue May 12 01:24:03 2015 +0100
+++ b/compiler/PPCCompilerTokenizingRememberStrategy.st Thu May 21 14:12:22 2015 +0100
@@ -6,7 +6,7 @@
instanceVariableNames:'compiler'
classVariableNames:''
poolDictionaries:''
- category:'PetitCompiler-Core'
+ category:'PetitCompiler-Compiler'
!
@@ -29,6 +29,7 @@
smartRemember: parser to: variableName
parser isContextFree ifTrue: [
compiler codeAssign: '{ context lwRemember. currentTokenType . currentTokenValue }.'
+" compiler codeAssign: 'context lwRemember.' "
to: variableName.
] ifFalse: [
compiler codeAssign: '{ context remember. currentTokenType . currentTokenValue }.'
@@ -38,12 +39,15 @@
smartRestore: parser from: mementoName
parser isContextFree ifTrue: [
- compiler add: 'context lwRestore: ', mementoName, ' first.'.
+ compiler add: 'context lwRestore: (', mementoName, ' at: 1).'.
+" compiler add: 'context lwRestore: ', mementoName, '.'."
] ifFalse: [
- compiler add: 'context restore: ', mementoName, ' first.'.
+ compiler add: 'context restore: (', mementoName, ' at: 1).'.
].
- compiler codeAssign: mementoName, ' second.' to: 'currentTokenType'.
- compiler codeAssign: mementoName, ' third.' to: 'currentTokenValue'.
+
+ compiler codeAssign: '(', mementoName, ' at: 2).' to: 'currentTokenType'.
+ compiler codeAssign: '(', mementoName, ' at: 3).' to: 'currentTokenValue'.
+
! !
!PPCCompilerTokenizingRememberStrategy class methodsFor:'documentation'!