Portability fixes in PPPredicateTest>>charactersDo: / parsedCharacterSet:
* It is my understanding that charactersDo: should iterate over all signle byte
characters. If so, the method suffer from off-by-one error, it should generate
characters with code points 0..255. 256 is actually a two-byte character.
Method changed accordingly.
* Use Character>>asString instead of `String>>with:` which is safer
w.r.t. multi-byte characters. Under Smalltalk/X, String may contain only
signle byte characters.
"{ Package: 'stx:goodies/petitparser/parsers/smalltalk' }"
PPParser subclass:#PPSmalltalkWhitespaceParser
instanceVariableNames:'separator'
classVariableNames:''
poolDictionaries:''
category:'PetitSmalltalk-Core'
!
!PPSmalltalkWhitespaceParser methodsFor:'analysis'!
isNullable
^ true
! !
!PPSmalltalkWhitespaceParser methodsFor:'initialization'!
initialize
super initialize.
separator := PPCharSetPredicate on: [ :char | char isSeparator ].
! !
!PPSmalltalkWhitespaceParser methodsFor:'parsing'!
parseOn: aPPContext
[ [aPPContext atEnd not and: [ separator value: aPPContext uncheckedPeek ] ]
whileTrue: [ aPPContext next ].
aPPContext atEnd not and: [ aPPContext uncheckedPeek = $" ] ] whileTrue: [
aPPContext next.
aPPContext upTo: $".
].
! !
!PPSmalltalkWhitespaceParser class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
! !