diff -r e1b11f74e142 -r 90de244a7fa2 extensions.st --- a/extensions.st Mon Sep 12 19:48:53 2011 +0200 +++ b/extensions.st Fri Jan 13 12:22:50 2012 +0100 @@ -1,4 +1,4 @@ -"{ Package: 'squeak:petitparser' }"! +"{ Package: 'stx:goodies/petitparser' }"! !Block methodsFor:'*petitparser-core-converting'! @@ -18,12 +18,12 @@ "Return the Character that is lower than the receiver. Wrap if the resulting value is not a legal Character value. (JS) claus: - modified to return the difference as integer, if the argument - is another character. If the argument is a number, a character is - returned." + modified to return the difference as integer, if the argument + is another character. If the argument is a number, a character is + returned." aMagnitude isCharacter ifTrue:[ - ^ asciivalue - aMagnitude asInteger + ^ asciivalue - aMagnitude asInteger ]. ^ Character codePoint:((asciivalue - aMagnitude asInteger) \\ 16r3FFFFFFF) @@ -46,7 +46,7 @@ ppMinus: aCharacter "Create a range of characters between the receiver and the argument." - + ^ PPPredicateObjectParser between: self and: aCharacter "Created: / 19-12-2010 / 18:13:19 / Jan Kurs " @@ -73,14 +73,14 @@ !PositionableStream methodsFor:'*petitparser-core-converting'! 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." + "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." - "DUNNO WHY, but on: collection from: position to: last set the start to position -1" - self breakPoint: #petitparser. + "DUNNO WHY, but on: collection from: position to: last set the start to position -1" + self breakPoint: #petitparser. - ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) - ifFalse: [ PPStream on: collection from: (position +1) to: readLimit ] - ifTrue: [ super asPetitStream ] + ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) + ifFalse: [ PPStream on: collection from: (position +1) to: readLimit ] + ifTrue: [ super asPetitStream ] "/ ^ (collection isNil or: [ position isNil or: [ readLimit isNil ] ]) @@ -146,8 +146,8 @@ ^ PPEpsilonParser new ! ! -!squeak_petitparser class methodsFor:'documentation'! +!stx_goodies_petitparser class methodsFor:'documentation'! extensionsVersion_CVS - ^ '$Header: /cvs/stx/stx/goodies/petitparser/extensions.st,v 1.2 2011-09-12 17:48:53 cg Exp $' -! ! \ No newline at end of file + ^ '$Header: /cvs/stx/stx/goodies/petitparser/extensions.st,v 1.3 2012-01-13 11:22:50 cg Exp $' +! !