compiler/PPCContext.st
changeset 419 5c502ab8e87d
parent 414 0eaf09920532
child 421 7e08b31e0dae
equal deleted inserted replaced
418:b3080b20b14c 419:5c502ab8e87d
     4 	instanceVariableNames:'root properties globals furthestFailure compiledParser rc ws'
     4 	instanceVariableNames:'root properties globals furthestFailure compiledParser rc ws'
     5 	classVariableNames:''
     5 	classVariableNames:''
     6 	poolDictionaries:''
     6 	poolDictionaries:''
     7 	category:'PetitCompiler-Context'
     7 	category:'PetitCompiler-Context'
     8 !
     8 !
       
     9 
     9 
    10 
    10 !PPCContext class methodsFor:'as yet unclassified'!
    11 !PPCContext class methodsFor:'as yet unclassified'!
    11 
    12 
    12 new
    13 new
    13 	^ self basicNew initialize
    14 	^ self basicNew initialize
   232 	
   233 	
   233 	position := aPPContextMemento.
   234 	position := aPPContextMemento.
   234 !
   235 !
   235 
   236 
   236 remember
   237 remember
   237 	| memento |
   238         | memento |
   238 "
   239 "
   239 	^ position
   240         ^ position
   240 "
   241 "
   241 	memento := PPCContextMemento new
   242         memento := PPCContextMemento new
   242 		position: position;
   243                 position: position;
   243 		yourself.
   244                 yourself.
   244 		
   245                 
   245 	self rememberProperties: memento.
   246         self rememberProperties: memento.
   246 	"JK: Just while developing"
   247         "JK: Just while developing"
   247 	rc := rc + 1.
   248         "
   248 	(rc > ((self size + 1)* 1000*1000)) ifTrue: [ self error: 'Hey, this is not normal, is it?' ].
   249         rc := rc + 1.
   249 	^ memento
   250         (rc > ((self size + 1)* 1000*1000)) ifTrue: [ self error: 'Hey, this is not normal, is it?' ].
       
   251         "
       
   252         ^ memento
       
   253 
       
   254     "Modified (comment): / 08-11-2014 / 02:08:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   250 !
   255 !
   251 
   256 
   252 rememberProperties: aPPContextMemento
   257 rememberProperties: aPPContextMemento
   253 	properties ifNil: [ ^ self ].
   258 	properties ifNil: [ ^ self ].
   254 	
   259 	
   279 	aPPContextMemento keysAndValuesDo: [ :key :value |
   284 	aPPContextMemento keysAndValuesDo: [ :key :value |
   280 		properties at: key put: value
   285 		properties at: key put: value
   281 	]
   286 	]
   282 ! !
   287 ! !
   283 
   288 
       
   289 !PPCContext class methodsFor:'documentation'!
       
   290 
       
   291 version_HG
       
   292 
       
   293     ^ '$Changeset: <not expanded> $'
       
   294 ! !
       
   295