PPRepeatingParser.st
changeset 378 53d66ecfeb1b
parent 179 c7539657b514
child 406 c05417ade8ac
equal deleted inserted replaced
377:6112a403a52d 378:53d66ecfeb1b
    24 
    24 
    25 on: aParser min: aMinInteger max: aMaxInteger
    25 on: aParser min: aMinInteger max: aMaxInteger
    26 	^ (self on: aParser) setMin: aMinInteger max: aMaxInteger
    26 	^ (self on: aParser) setMin: aMinInteger max: aMaxInteger
    27 ! !
    27 ! !
    28 
    28 
    29 !PPRepeatingParser methodsFor:'*petitanalyzer-matching'!
       
    30 
    29 
    31 match: aParser inContext: aDictionary seen: anIdentitySet
       
    32 	^ (super match: aParser inContext: aDictionary seen: anIdentitySet) and: [ self min = aParser min and: [ self max = aParser max ] ]
       
    33 ! !
       
    34 
    30 
    35 !PPRepeatingParser methodsFor:'*petitanalyzer-testing'!
       
    36 
       
    37 isNullable
       
    38 	^ min = 0
       
    39 ! !
       
    40 
    31 
    41 !PPRepeatingParser methodsFor:'accessing'!
    32 !PPRepeatingParser methodsFor:'accessing'!
    42 
    33 
    43 max
    34 max
    44 	"Answer the maximum number of repetitions."
    35 	"Answer the maximum number of repetitions."