--- a/PPPredicateObjectParser.st Sat May 05 00:05:38 2012 +0200
+++ b/PPPredicateObjectParser.st Sat May 05 00:05:48 2012 +0200
@@ -7,9 +7,6 @@
category:'PetitParser-Parsers'
!
-PPPredicateObjectParser comment:'A parser that accepts if a given predicate on one element of the input sequence holds.'
-!
-
!PPPredicateObjectParser class methodsFor:'instance creation'!
@@ -48,10 +45,10 @@
!
hex
- ^ self
- on: (PPCharSetPredicate on: [ :char |
- (char between: $0 and: $9)
- or: [ (char between: $a and: $f)
+ ^ self
+ on: (PPCharSetPredicate on: [ :char |
+ (char between: $0 and: $9)
+ or: [ (char between: $a and: $f)
or: [ (char between: $A and: $F) ] ] ])
message: 'hex digit expected'
!
@@ -123,7 +120,7 @@
!
expect: anObject message: aString
- ^ self
+ ^ self
on: [ :each | each = anObject ] message: aString
negated: [ :each | each ~= anObject ] message: 'no ' , aString
! !
@@ -141,9 +138,9 @@
negate
"Answer a parser that is the negation of the receiving predicate parser."
-
- ^ self class
- on: negated message: negatedMessage
+
+ ^ self class
+ on: negated message: negatedMessage
negated: predicate message: predicateMessage
! !
@@ -157,6 +154,14 @@
!PPPredicateObjectParser class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.3 2012-05-04 22:05:48 vrany Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/PPPredicateObjectParser.st,v 1.3 2012-05-04 22:05:48 vrany Exp $'
+!
+
version_SVN
- ^ '$Id: PPPredicateObjectParser.st,v 1.2 2012-01-13 11:22:50 cg Exp $'
+ ^ '§Id: PPPredicateObjectParser.st 2 2010-12-17 18:44:23Z vranyj1 §'
! !