PPListParser.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Jan 2013 14:22:42 +0100
changeset 101 39017a935576
parent 56 e6c555201a3a
child 169 cba3a51b9704
permissions -rw-r--r--
initial checkin

"{ Package: 'stx:goodies/petitparser' }"

PPParser subclass:#PPListParser
	instanceVariableNames:'parsers'
	classVariableNames:''
	poolDictionaries:''
	category:'PetitParser-Parsers'
!


!PPListParser class methodsFor:'instance creation'!

with: aParser
	^ self withAll: (Array with: aParser)
!

with: aFirstParser with: aSecondParser
	^ self withAll: (Array with: aFirstParser with: aSecondParser)
!

withAll: aCollection
	^ self basicNew setParsers: aCollection
! !

!PPListParser methodsFor:'accessing'!

children
	^ parsers
! !

!PPListParser methodsFor:'copying'!

copyWith: aParser
	^ self species withAll: (parsers copyWith: aParser)
!

postCopy
	super postCopy.
	parsers := parsers copy
! !

!PPListParser methodsFor:'initialization'!

initialize
	super initialize.
	self setParsers: #()
!

setParsers: aCollection
	parsers := aCollection asArray
! !

!PPListParser class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPListParser.st,v 1.3 2012-05-04 22:10:13 vrany Exp $'
!

version_SVN
    ^ '§Id: PPListParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
! !