compiler/PPCStarCharSetPredicateNode.st
changeset 422 116d2b2af905
parent 421 7e08b31e0dae
child 438 20598d7ce9fa
equal deleted inserted replaced
421:7e08b31e0dae 422:116d2b2af905
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
       
     2 
       
     3 "{ NameSpace: Smalltalk }"
     2 
     4 
     3 PPCStarNode subclass:#PPCStarCharSetPredicateNode
     5 PPCStarNode subclass:#PPCStarCharSetPredicateNode
     4 	instanceVariableNames:'predicate'
     6 	instanceVariableNames:'predicate'
     5 	classVariableNames:''
     7 	classVariableNames:''
     6 	poolDictionaries:''
     8 	poolDictionaries:''
     7 	category:'PetitCompiler-Nodes'
     9 	category:'PetitCompiler-Nodes'
     8 !
    10 !
     9 
    11 
    10 !PPCStarCharSetPredicateNode methodsFor:'accessing'!
    12 !PPCStarCharSetPredicateNode methodsFor:'accessing'!
    11 
       
    12 acceptsEpsilon
       
    13 	^ true
       
    14 !
       
    15 
    13 
    16 compileWith: compiler effect: effect id: id
    14 compileWith: compiler effect: effect id: id
    17 	| classification classificationId |
    15 	| classification classificationId |
    18 	
    16 	
    19 	compiler startMethod: id.
    17 	compiler startMethod: id.
    32  ^ compiler stopMethod.
    30  ^ compiler stopMethod.
    33 !
    31 !
    34 
    32 
    35 extendClassification: classification
    33 extendClassification: classification
    36 	^ (classification asOrderedCollection addLast: false; yourself) asArray
    34 	^ (classification asOrderedCollection addLast: false; yourself) asArray
    37 !
       
    38 
       
    39 firstCharParser
       
    40 	^ PPPredicateObjectParser on: predicate message: 'predicate expected'.
       
    41 !
    35 !
    42 
    36 
    43 firstCharSet
    37 firstCharSet
    44 	^ PPCharSetPredicate on: predicate 	
    38 	^ PPCharSetPredicate on: predicate 	
    45 !
    39 !