"{ Package: 'stx:goodies/petitparser/compiler' }"
"{ NameSpace: Smalltalk }"
PPCNode subclass:#PPCAbstractPredicateNode
instanceVariableNames:'predicate'
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Nodes'
!
!PPCAbstractPredicateNode methodsFor:'accessing'!
predicate
^ predicate
!
predicate: anObject
predicate := anObject
!
prefix
^ #predicate
! !
!PPCAbstractPredicateNode methodsFor:'analysis'!
acceptsEpsilon
^ false
!
firstCharSet
^ PPCharSetPredicate on: predicate
! !
!PPCAbstractPredicateNode methodsFor:'comparison'!
= anotherNode
super = anotherNode ifFalse: [ ^ false ].
^ predicate = anotherNode predicate.
!
hash
^ super hash bitXor: predicate hash
! !
!PPCAbstractPredicateNode methodsFor:'compiling'!
bodyOfPredicate: compiler
self subclassResponsibility
!
compileWith: compiler effect: effect id: id
compiler startMethod: id.
compiler add: '^'.
self bodyOfPredicate: compiler.
^ compiler stopMethod.
!
extendClassification: classification
^ (classification asOrderedCollection addLast: false; yourself) asArray
! !
!PPCAbstractPredicateNode methodsFor:'initialization'!
initialize
super initialize.
! !
!PPCAbstractPredicateNode methodsFor:'optimizing'!
asInlined
^ super asInlined
! !