diff -r 000000000000 -r 739fe9b7253e PPPredicateParser.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PPPredicateParser.st Thu Aug 18 20:56:17 2011 +0200 @@ -0,0 +1,44 @@ +"{ Package: 'squeak:petitparser' }" + +PPParser subclass:#PPPredicateParser + instanceVariableNames:'predicate predicateMessage negated negatedMessage' + classVariableNames:'' + poolDictionaries:'' + category:'PetitParser-Parsers' +! + +PPPredicateParser comment:'An abstract parser that accepts if a given predicate holds. +Instance Variables: + predicate The block testing for the predicate. + predicateMessage The error message of the predicate. + negated The block testing for the negation of the predicate. + negatedMessage The error message of the negated predicate.' +! + + +!PPPredicateParser methodsFor:'accessing'! + +block + "Answer the predicate block of the receiver." + + ^ predicate +! + +message + "Answer the failure message." + + ^ predicateMessage +! ! + +!PPPredicateParser methodsFor:'printing'! + +printNameOn: aStream + super printNameOn: aStream. + aStream nextPutAll: ', '; print: predicateMessage +! ! + +!PPPredicateParser class methodsFor:'documentation'! + +version_SVN + ^ '$Id: PPPredicateParser.st,v 1.1 2011-08-18 18:56:17 cg Exp $' +! !