Fixed CI scripts on Windows
For an unknown reason, unzip on Windows reports status code 50
(presumably "the disk is (or was) full during extraction.") even
if there's plenty of space. To workaround this, simply ignore
status code 50 on Windows. Sigh.
"{ Package: 'stx:goodies/petitparser' }"
PPLimitedRepeatingParser subclass:#PPGreedyRepeatingParser
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitParser-Parsers'
!
!PPGreedyRepeatingParser methodsFor:'parsing'!
parseOn: aPPContext
| memento element elements positions |
memento := aPPContext remember.
elements := OrderedCollection new.
[ elements size < min ] whileTrue: [
(element := parser parseOn: aPPContext) isPetitFailure ifTrue: [
aPPContext restore: memento.
^ element ].
elements addLast: element ].
positions := OrderedCollection with: aPPContext remember.
[ elements size < max and: [ (element := parser parseOn: aPPContext) isPetitFailure not ] ] whileTrue: [
elements addLast: element.
positions addLast: aPPContext remember ].
[ positions isEmpty ] whileFalse: [
aPPContext restore: positions last.
element := limit parseOn: aPPContext.
element isPetitFailure ifFalse: [
aPPContext restore: positions last.
^ elements asArray ].
elements isEmpty ifTrue: [
aPPContext restore: memento.
^ element ].
elements removeLast.
positions removeLast ].
aPPContext restore: memento.
^ PPFailure message: 'overflow' context: aPPContext at: memento position
! !
!PPGreedyRepeatingParser class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPGreedyRepeatingParser.st,v 1.1 2014-03-04 14:32:42 cg Exp $'
!
version_CVS
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPGreedyRepeatingParser.st,v 1.1 2014-03-04 14:32:42 cg Exp $'
!
version_HG
^ '$Changeset: <not expanded> $'
! !