equal
deleted
inserted
replaced
|
1 "{ Package: 'stx:goodies/petitparser/compiler' }" |
|
2 |
|
3 PPCAbstractPredicateNode subclass:#PPCNotCharSetPredicateNode |
|
4 instanceVariableNames:'' |
|
5 classVariableNames:'' |
|
6 poolDictionaries:'' |
|
7 category:'PetitCompiler-Nodes' |
|
8 ! |
|
9 |
|
10 PPCNotCharSetPredicateNode comment:'' |
|
11 ! |
|
12 |
|
13 !PPCNotCharSetPredicateNode methodsFor:'as yet unclassified'! |
|
14 |
|
15 asInlined |
|
16 ^ PPCInlineNotCharSetPredicateNode new |
|
17 predicate: predicate; |
|
18 name: name; |
|
19 yourself |
|
20 ! |
|
21 |
|
22 bodyOfPredicate: compiler |
|
23 | classificationId classification | |
|
24 classification := self extendClassification: predicate classification. |
|
25 classificationId := (compiler idFor: classification prefixed: #classification). |
|
26 compiler addConstant: classification as: classificationId. |
|
27 |
|
28 compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'. |
|
29 compiler indent. |
|
30 compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'. |
|
31 compiler add: ' ifFalse: [ nil ].'. |
|
32 compiler dedent. |
|
33 ! |
|
34 |
|
35 firstCharParser |
|
36 ^ (PPPredicateObjectParser on: predicate message: 'predicate not expected') not. |
|
37 ! ! |
|
38 |