Poratbility: do not use #removeAtIndex: under Pharo.
Pharo does not have #removeAtIndex: which is actually
and ANSI protocol. But Pharoers do not like ANSI and don't
give a shit about compatibility.
To workaround it, use super-ugly #respondsTo: test.
"{ Package: 'stx:goodies/petitparser' }"
"{ NameSpace: Smalltalk }"
PPParser subclass:#PPStartOfLogicalLineParser
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitParser-Parsers'
!
!PPStartOfLogicalLineParser methodsFor:'as yet unclassified'!
isBlank: character
^ (character == Character space or: [character == Character tab])
!
parseOn: aPPContext
aPPContext peek isAlphaNumeric ifFalse: [
^ PPFailure message: 'Start of logical line expected' context: aPPContext
].
aPPContext isStartOfLine ifTrue: [ ^ #startOfLogicalLine ].
[ aPPContext position ~= 0 ] whileTrue: [
aPPContext back.
(self isBlank: aPPContext peek) ifFalse: [
^ PPFailure message: 'Start of logical line expected' context: aPPContext
].
aPPContext isStartOfLine ifTrue: [ ^ #startOfLogicalLine ].
]
! !