PPParser.st
changeset 421 7e08b31e0dae
parent 389 009c2e13973c
child 427 a7f5e6de19d2
equal deleted inserted replaced
420:b2f2f15cef26 421:7e08b31e0dae
    15 !
    15 !
    16 
    16 
    17 new
    17 new
    18 	^ self basicNew initialize
    18 	^ self basicNew initialize
    19 ! !
    19 ! !
       
    20 
    20 
    21 
    21 
    22 
    22 
    23 
    23 
    24 
    24 
    25 
   298 
   299 
   299 trim
   300 trim
   300 	"Answer a new parser that consumes spaces before and after the receiving parser."
   301 	"Answer a new parser that consumes spaces before and after the receiving parser."
   301 	
   302 	
   302 	^ self trimSpaces
   303 	^ self trimSpaces
       
   304 ! !
       
   305 
       
   306 !PPParser methodsFor:'operators'!
       
   307 
       
   308 // aParser 
       
   309 	"
       
   310 		Answer a new parser that parses the receiver, if the receiver fails try with aParser (ordered-choice).
       
   311 		If the receiver passes, limit must pass as well.
       
   312 	"
       
   313 	
       
   314 	^ PPLimitedChoiceParser with: self with: aParser
   303 ! !
   315 ! !
   304 
   316 
   305 !PPParser methodsFor:'operators-convenience'!
   317 !PPParser methodsFor:'operators-convenience'!
   306 
   318 
   307 withoutSeparators
   319 withoutSeparators