analyzer/PPSentinel.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 16 Jun 2015 06:45:26 +0100
changeset 489 0ca7a70db0f5
parent 378 53d66ecfeb1b
permissions -rw-r--r--
Fix in codegen for inlined sequence nodes. For inlined sequence nodes, generate nested ifs rather than sequential code which does not work when inlined. The reason is that #codeReturn: in inline generates instvar assignment, not method return, so in sequential code the next child of a sequence will be probed even if previous failed. If that happends, the whole sequence fail and therefore we must generate nested ifs to correctly handle this w.r.t. inlining.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
206
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/analyzer' }"
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
PPEpsilonParser subclass:#PPSentinel
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	instanceVariableNames:''
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	classVariableNames:''
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	poolDictionaries:''
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	category:'PetitAnalyzer-Core'
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
!
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
PPSentinel class instanceVariableNames:'instance'
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
 No other class instance variables are inherited by this class.
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
!
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
!PPSentinel class methodsFor:'instance creation'!
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
instance
378
53d66ecfeb1b Merged in latest version from Moose repository
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 286
diff changeset
    21
	^ instance ifNil: [ instance := self new ]
206
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
! !
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!PPSentinel class methodsFor:'documentation'!
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
version
286
Claus Gittinger <cg@exept.de>
parents: 206
diff changeset
    27
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPSentinel.st,v 1.2 2014-03-04 20:27:45 cg Exp $'
206
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
version_CVS
286
Claus Gittinger <cg@exept.de>
parents: 206
diff changeset
    31
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPSentinel.st,v 1.2 2014-03-04 20:27:45 cg Exp $'
206
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
! !
11938b6657cb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33