1 "{ Package: 'stx:goodies/petitparser/compiler' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 PPCConfiguration subclass:#PPCTokenizingConfiguration |
|
6 instanceVariableNames:'' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'PetitCompiler-Core' |
|
10 ! |
|
11 |
|
12 !PPCTokenizingConfiguration methodsFor:'accessing - defaults'! |
|
13 |
|
14 defaultParserSuperclass |
|
15 ^ PPTokenizingCompiledParser |
|
16 |
|
17 "Modified (comment): / 01-09-2015 / 08:48:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
18 ! ! |
|
19 |
|
20 !PPCTokenizingConfiguration methodsFor:'compiling'! |
|
21 |
|
22 invokePhases |
|
23 |
|
24 self runPass: PPCTokenDetector. |
|
25 |
|
26 context options cacheFirstFollow ifTrue:[ |
|
27 self runPass: PPCCacheFirstFollowPass |
|
28 ]. |
|
29 self runPass: PPCLL1Visitor. |
|
30 context options tokenize ifTrue:[ |
|
31 self runPass: PPCTokenizingVisitor |
|
32 ]. |
|
33 |
|
34 self runPass: PPCMergingVisitor . |
|
35 |
|
36 context options specialize ifTrue:[ |
|
37 self runPass: PPCSpecializingVisitor |
|
38 ]. |
|
39 |
|
40 self runPass: PPCRecognizerComponentDetector . |
|
41 |
|
42 context options specialize ifTrue:[ |
|
43 self runPass: PPCSpecializingVisitor |
|
44 ]. |
|
45 context options inline ifTrue:[ |
|
46 self runPass: PPCInliningVisitor |
|
47 ]. |
|
48 |
|
49 self runPass: PPCMergingVisitor . |
|
50 |
|
51 self runPass: PPCCheckingVisitor. |
|
52 context options cacheFirstFollow ifTrue:[ |
|
53 self runPass: PPCCacheFirstFollowPass |
|
54 ]. |
|
55 self runPass: PPCTokenizingCodeGenerator. |
|
56 self runPass: PPCFSAVisitor. |
|
57 self runPass: PPCTokenCodeGenerator. |
|
58 self runPass: PPCScannerCodeGenerator. |
|
59 |
|
60 self generateScanner. |
|
61 self generateParser. |
|
62 |
|
63 "Modified: / 04-09-2015 / 10:25:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
64 ! ! |
|
65 |
|