PPTokenParser.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 04 May 2012 23:58:48 +0200
changeset 10 cbaaa689fab2
parent 4 90de244a7fa2
child 16 3b8de4bf5696
permissions -rw-r--r--
Checkin from browser

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

PPFlattenParser subclass:#PPTokenParser
	instanceVariableNames:'tokenClass'
	classVariableNames:''
	poolDictionaries:''
	category:'PetitParser-Parsers'
!

PPTokenParser comment:'A parser that answers a token of the range my delegate parses.
Instance Variables:
	tokenClass      <PPToken class> The token sub-class to be used.'
!


!PPTokenParser methodsFor:'accessing'!

tokenClass
	^ tokenClass
!

tokenClass: aTokenClass
	tokenClass := aTokenClass
! !

!PPTokenParser methodsFor:'initialization'!

initialize
	tokenClass := self defaultTokenClass

! !

!PPTokenParser methodsFor:'private'!

create: aCollection start: aStartInteger stop: aStopInteger
	^ self tokenClass on: aCollection start: aStartInteger stop: aStopInteger
!

defaultTokenClass
	^ PPToken
! !

!PPTokenParser class methodsFor:'documentation'!

version_SVN
    ^ '$Id: PPTokenParser.st,v 1.2 2012-01-13 11:22:50 cg Exp $'
! !