author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 31 Jul 2015 07:57:23 +0100 | |
changeset 512 | 694a247a12ba |
parent 380 | 8fe3cb4e607f |
permissions | -rw-r--r-- |
4 | 1 |
"{ Package: 'stx:goodies/petitparser' }" |
0 | 2 |
|
3 |
PPParser subclass:#PPFailingParser |
|
4 |
instanceVariableNames:'message' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'PetitParser-Parsers' |
|
8 |
! |
|
9 |
||
10 |
||
11 |
!PPFailingParser class methodsFor:'instance creation'! |
|
12 |
||
13 |
message: aString |
|
14 |
^ self new setMessage: aString |
|
15 |
! ! |
|
16 |
||
164 | 17 |
|
0 | 18 |
!PPFailingParser methodsFor:'accessing'! |
19 |
||
20 |
message |
|
21 |
"Answer the error message of the receiving parser." |
|
22 |
||
23 |
^ message |
|
24 |
! ! |
|
25 |
||
26 |
!PPFailingParser methodsFor:'initialization'! |
|
27 |
||
28 |
setMessage: aString |
|
29 |
message := aString |
|
30 |
! ! |
|
31 |
||
377
6112a403a52d
Updated to latest version from Moose repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
164
diff
changeset
|
32 |
!PPFailingParser methodsFor:'pp-context'! |
0 | 33 |
|
377
6112a403a52d
Updated to latest version from Moose repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
164
diff
changeset
|
34 |
parseOn: aPPContext |
6112a403a52d
Updated to latest version from Moose repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
164
diff
changeset
|
35 |
^ PPFailure message: message context: aPPContext |
0 | 36 |
! ! |
37 |
||
38 |
!PPFailingParser methodsFor:'printing'! |
|
39 |
||
40 |
printNameOn: aStream |
|
41 |
super printNameOn: aStream. |
|
42 |
aStream nextPutAll: ', '; print: message |
|
43 |
! ! |
|
44 |
||
45 |
!PPFailingParser class methodsFor:'documentation'! |
|
46 |
||
41 | 47 |
version |
164 | 48 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPFailingParser.st,v 1.4 2014-03-04 14:32:28 cg Exp $' |
41 | 49 |
! |
50 |
||
51 |
version_CVS |
|
164 | 52 |
^ '$Header: /cvs/stx/stx/goodies/petitparser/PPFailingParser.st,v 1.4 2014-03-04 14:32:28 cg Exp $' |
41 | 53 |
! |
54 |
||
380
8fe3cb4e607f
Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
377
diff
changeset
|
55 |
version_HG |
8fe3cb4e607f
Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
377
diff
changeset
|
56 |
|
8fe3cb4e607f
Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
377
diff
changeset
|
57 |
^ '$Changeset: <not expanded> $' |
8fe3cb4e607f
Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
377
diff
changeset
|
58 |
! |
8fe3cb4e607f
Remove Pharoisms to make code more portable and running on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
377
diff
changeset
|
59 |
|
0 | 60 |
version_SVN |
164 | 61 |
^ '$Id: PPFailingParser.st,v 1.4 2014-03-04 14:32:28 cg Exp $' |
0 | 62 |
! ! |
164 | 63 |