equal
deleted
inserted
replaced
2 |
2 |
3 "{ NameSpace: Smalltalk }" |
3 "{ NameSpace: Smalltalk }" |
4 |
4 |
5 PPAbstractParserTest subclass:#PPCTokenizingCodeGeneratorTest |
5 PPAbstractParserTest subclass:#PPCTokenizingCodeGeneratorTest |
6 instanceVariableNames:'visitor node result compiler parser context options tokenizer |
6 instanceVariableNames:'visitor node result compiler parser context options tokenizer |
7 whitespace configuration' |
7 whitespace' |
8 classVariableNames:'' |
8 classVariableNames:'' |
9 poolDictionaries:'' |
9 poolDictionaries:'' |
10 category:'PetitCompiler-Tests-Visitors' |
10 category:'PetitCompiler-Tests-Visitors' |
11 ! |
11 ! |
12 |
12 |
24 scannerClass removeFromSystem |
24 scannerClass removeFromSystem |
25 ]. |
25 ]. |
26 ! |
26 ! |
27 |
27 |
28 compileTree: root |
28 compileTree: root |
29 parser := configuration compile: root. |
29 parser := compiler compile: root. |
30 |
30 |
31 ! |
31 ! |
32 |
32 |
33 context |
33 context |
34 ^ context := PPCProfilingContext new |
34 ^ context := PPCProfilingContext new |
35 ! |
35 ! |
36 |
36 |
37 setUp |
37 setUp |
38 options := PPCCompilationOptions default |
38 options := (PPCCompilationOptions default) |
39 profile: true; |
39 profile:true; |
40 tokenize: true; |
40 tokenize:true; |
41 yourself. |
41 yourself. |
42 |
|
43 self cleanClass. |
42 self cleanClass. |
44 |
43 compiler := PPCCompiler new. |
45 configuration := PPCConfiguration new. |
44 compiler passes:{ |
46 configuration passes: { |
45 PPCCacheFirstFollowPass. |
47 PPCCacheFirstFollowPass. |
46 PPCTokenizingCodeGenerator. |
48 PPCTokenizingCodeGenerator. |
47 PPCFSAVisitor. |
49 PPCFSAVisitor. |
48 PPCTokenCodeGenerator. |
50 PPCTokenCodeGenerator. |
49 PPCScannerCodeGenerator |
51 PPCScannerCodeGenerator. |
50 }. |
52 }. |
51 compiler options:options. |
53 |
|
54 configuration options: options. |
|
55 |
52 |
56 "Modified: / 04-09-2015 / 16:21:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
53 "Modified: / 04-09-2015 / 16:21:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
57 ! |
54 ! |
58 |
55 |
59 tearDown |
56 tearDown |