author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 26 Aug 2015 23:34:48 +0100 | |
changeset 533 | 666372dbe307 |
parent 529 | 439c4057517f |
child 534 | a949c4fe44df |
permissions | -rw-r--r-- |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'stx:goodies/petitparser/compiler' }" |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
5 |
Object subclass:#PPCCompilationOptions |
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
6 |
instanceVariableNames:'options' |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
classVariableNames:'' |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
poolDictionaries:'' |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
category:'PetitCompiler-Core' |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
12 |
!PPCCompilationOptions class methodsFor:'as yet unclassified'! |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
default |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
15 |
^ self new |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
new |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
19 |
^ self basicNew |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
20 |
initialize; |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
21 |
yourself |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
! ! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
|
533
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
24 |
!PPCCompilationOptions methodsFor:'initialization'! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
25 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
26 |
initialize |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
27 |
super initialize. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
28 |
options := IdentityDictionary new |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
29 |
! ! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
30 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
31 |
!PPCCompilationOptions methodsFor:'options'! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
32 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
33 |
mode |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
34 |
^ self at: #mode ifAbsent: #JIT |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
35 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
36 |
"Created: / 26-08-2015 / 23:18:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
37 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
38 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
39 |
mode: mode |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
40 |
"Set the compilation mode - valid values are #JIT or #AOT. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
41 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
42 |
#JIT mode put less constraints on the original pure PetitParser |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
43 |
parser (such as action blocks are not required to be purely functional, |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
44 |
support mixing of compiled parsing code with custom PPParsers and so on). |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
45 |
However, JIT-compiled parser class SHOULD NOT be commited into the |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
46 |
repository - it won't work when loaded back. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
47 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
48 |
#AOT mode allows for parser to be pre-compiled and generated code |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
49 |
to be commited to repository. Thus, the deployed application don't need |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
50 |
to contain full PetitCompiler. However, this is at cost of more contraints |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
51 |
being put on the original Petit Parser. In other words, not all PetitParser |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
52 |
parser may be compiled in AOT mode. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
53 |
WARNING: #AOT mode is not yet fully supported, do not use!! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
54 |
" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
55 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
56 |
(#(JIT AOT) includes: mode) ifFalse:[ |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
57 |
PPCCompilationError new signal: 'Invalid mode: option value - must be either #JIT or #AOT'. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
58 |
]. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
59 |
mode == #AOT ifTrue:[ |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
60 |
PPCCompilationWarning new signal: '#AOT mode not yet supported'. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
61 |
]. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
62 |
self at: #mode put: mode |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
63 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
64 |
"Created: / 26-08-2015 / 23:07:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
65 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
66 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
67 |
parserName |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
68 |
^ self at: #parserName ifAbsent: #PPGeneratedParser |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
69 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
70 |
"Modified (format): / 26-08-2015 / 23:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
71 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
72 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
73 |
parserName: aSymbol |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
74 |
"Sets the name of the generated parser class. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
75 |
Defaults to #PPGeneratedParser." |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
76 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
77 |
self set: #parserName to: aSymbol. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
78 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
79 |
"Modified (comment): / 26-08-2015 / 23:05:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
80 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
81 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
82 |
scannerName |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
83 |
^ self at: #scannerName ifAbsent: #PPGeneratedScanner |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
84 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
85 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
86 |
scannerName: value |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
87 |
"Sets the name of the generated parser class. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
88 |
Defaults to #PPGeneratedScanner." |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
89 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
90 |
self set: #scannerName to: value. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
91 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
92 |
"Modified (comment): / 26-08-2015 / 23:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
93 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
94 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
95 |
tokenize |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
96 |
^ self at: #tokenize ifAbsent: true |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
97 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
98 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
99 |
tokenize: aBoolean |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
100 |
"Build tokenizing parser, i.e., build scanner that tokenizes the input and then |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
101 |
parser consuming tokens produced by scanner. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
102 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
103 |
Tokenizing parser more resemble hand-written top-down parser and |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
104 |
makes hand-tuning of the parser / scanner easier. However, not all |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
105 |
PetitParsers may be tokenized. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
106 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
107 |
Default value is true. If the compilation fails, try to set it to |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
108 |
false |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
109 |
" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
110 |
self set: #tokenize to: aBoolean. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
111 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
112 |
"Modified (comment): / 26-08-2015 / 23:24:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
113 |
! ! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
114 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
115 |
!PPCCompilationOptions methodsFor:'options - undocumented (do not use)'! |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
116 |
|
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
117 |
cacheFirstFollow |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
118 |
^ self at: #cacheFirstFollow ifAbsent: true |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
119 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
120 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
121 |
cacheFirstFollow: value |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
122 |
self set: #cacheFirstFollow to: value. |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
123 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
124 |
|
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
debug |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
126 |
^ self at: #debug ifAbsent: true |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
128 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
debug: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
130 |
self set: #debug to: value. |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
131 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
132 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
133 |
detectTokens |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
134 |
^ self at: #detectTokens ifAbsent: true |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
135 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
136 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
137 |
detectTokens: value |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
138 |
self set: #detectTokens to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
generate |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
142 |
^ self at: #generate ifAbsent: true |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
143 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
144 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
145 |
generate: value |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
146 |
^ self set: #generate to: value |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
147 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
148 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
149 |
guards |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
150 |
^ self at: #guards ifAbsent: true |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
151 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
152 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
153 |
guards: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
154 |
self set: #guards to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
155 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
156 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
157 |
inline |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
158 |
^ self at: #inline ifAbsent: true |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
inline: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
162 |
self set: #inline to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
165 |
merge |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
166 |
^ self at: #merge ifAbsent: true |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
merge: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
170 |
self set: #merge to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
171 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
172 |
|
524
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
173 |
parserSuperclass |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
174 |
^ self at: #parserSuperclass ifAbsent: PPTokenizingCompiledParser |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
175 |
! |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
176 |
|
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
177 |
parserSuperclass: value |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
178 |
self set: #parserSuperclass to: value. |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
179 |
! |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
180 |
|
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
181 |
profile |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
182 |
^ self at: #profile ifAbsent: false |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
183 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
185 |
profile: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
186 |
self set: #profile to: value. |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
187 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
188 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
189 |
recognizingComponents |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
190 |
^ self at: #recognizingComponents ifAbsent: true |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
191 |
! |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
192 |
|
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
193 |
recognizingComponents: value |
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
194 |
self set: #recognizingComponents to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
195 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
196 |
|
524
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
197 |
scannerSuperclass |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
198 |
^ self at: #scannerSuperclass ifAbsent: PPCDistinctScanner |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
199 |
! |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
200 |
|
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
201 |
scannerSuperclass: value |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
202 |
self set: #scannerSuperclass to: value. |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
203 |
! |
f6f68d32de73
Merged in PetitCompiler-JanVrany.170, PetitCompiler-Tests-JanKurs.116, PetitCompiler-Extras-Tests-JanKurs.29, PetitCompiler-Benchmarks-JanKurs.19
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
502
diff
changeset
|
204 |
|
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
205 |
specialize |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
206 |
^ self at: #specialize ifAbsent: true |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
207 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
208 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
209 |
specialize: value |
452
9f4558b3be66
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
438
diff
changeset
|
210 |
self set: #specialize to: value. |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
211 |
! ! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
212 |
|
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
213 |
!PPCCompilationOptions methodsFor:'private'! |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
214 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
215 |
at: symbol ifAbsent: defaultValue |
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
216 |
^ options at: symbol ifAbsent: [ ^ defaultValue ] |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
217 |
! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
218 |
|
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
219 |
set: symbol to: defaultValue |
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
220 |
^ options at: symbol put: defaultValue |
438
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
221 |
! ! |
20598d7ce9fa
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
222 |