Portability fixes
* do not use Object>>asString. Not all Smalltalks implement it.
* do not use Object>>name. Not all Smalltalks implement it.
* do not use Dictionary keysAndValuesRemove:. Not all Smalltalks implement it.
* do not use Class>>methods The semantics is different among Smalltalks.
Use `Class methodDictionary values` instead.
* do not modify dictionary in #at:ifAbsentPut: block!
"{ Package: 'stx:goodies/petitparser' }"
"{ NameSpace: Smalltalk }"
PPParser subclass:#PPStartOfWordParser
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitParser-Parsers'
!
!PPStartOfWordParser methodsFor:'as yet unclassified'!
acceptsEpsilon
^ true
!
parseOn: aPPContext
aPPContext atEnd ifTrue: [
^ PPFailure message: 'Start of word expected' context: aPPContext at: aPPContext position
].
(aPPContext position == 0) ifTrue: [
(aPPContext peek isAlphaNumeric) ifTrue: [
^ #startOfWord
] ifFalse: [
^ PPFailure message: 'Start of word expected' context: aPPContext at: aPPContext position
]
].
aPPContext back.
aPPContext peek isAlphaNumeric ifTrue: [
^ PPFailure message: 'Start of word expected' context: aPPContext at: aPPContext position
].
aPPContext next.
^ aPPContext peek isAlphaNumeric ifTrue: [ #startOfWord ] ifFalse: [
PPFailure message: 'Start of word expected' context: aPPContext at: aPPContext position
]
! !