--- a/extensions.st Wed Nov 19 10:52:37 2014 +0000
+++ b/extensions.st Mon Nov 24 00:09:23 2014 +0000
@@ -56,7 +56,7 @@
!Interval methodsFor:'*petitparser-core-converting'!
asParser
- "Create a range of characters between start and stop."
+ "Create a range of characters between start and stop."
self assert:start isCharacter.
self assert:stop isCharacter.
@@ -64,11 +64,9 @@
^ PPPredicateObjectParser between: start and: stop
"
- ($a to: $f) asParser parse: 'a'
- ($a to: $f) asParser parse: 'g'
+ ($a to: $f) asParser parse: 'a'
+ ($a to: $f) asParser parse: 'g'
"
-
- "Modified (comment): / 01-11-2014 / 13:13:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Object methodsFor:'*petitparser-core-converting'!
@@ -96,9 +94,14 @@
asPetitStream
"Some of my subclasses do not use the instance-variables collection, position and readLimit but instead have a completely different internal representation. In these cases just use the super implementation that is inefficient but should work in all cases."
+"
+ Disabled until we agree on some way how to optimize this
+
^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ])
ifFalse: [ PPStream on: collection from: ( position + 1 ) to: readLimit ]
ifTrue: [ super asPetitStream ]
+"
+ ^ super asPetitStream
! !
!PositionableStream methodsFor:'*petitparser-core'!