author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 24 Nov 2015 19:37:14 +0100 | |
changeset 553 | d83cb4945d5e |
parent 538 | 16e8536f5cfb |
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 |
|
538
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
12 |
!PPCCompilationOptions class methodsFor:'instance creation'! |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
13 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
14 |
from: aCollection |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
15 |
"Initialized options from an array containing option: value pairs. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
16 |
Example: |
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
|
17 |
|
538
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
18 |
PPCCompilationOptions from: { #tokenize: true } |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
19 |
" |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
20 |
^ self new initializeFrom: aCollection |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
21 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
22 |
" |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
23 |
PPCCompilationOptions from: #( tokenize: true ) |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
24 |
" |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
25 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
26 |
"Created: / 07-09-2015 / 10:25:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
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
|
27 |
! |
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
|
28 |
|
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
|
29 |
new |
538
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
30 |
"return an initialized instance" |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
31 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
32 |
^ self basicNew initialize. |
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
|
33 |
! ! |
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
|
34 |
|
533
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
35 |
!PPCCompilationOptions methodsFor:'initialization'! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
36 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
37 |
initialize |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
38 |
super initialize. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
39 |
options := IdentityDictionary new |
538
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
40 |
! |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
41 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
42 |
initializeFrom: aSequenceableCollection |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
43 |
aSequenceableCollection size even ifFalse:[ |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
44 |
self error: 'Invalid options' |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
45 |
]. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
46 |
1 to: aSequenceableCollection size by: 2 do:[:i | |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
47 |
| option value | |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
48 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
49 |
option := aSequenceableCollection at: i. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
50 |
value := aSequenceableCollection at: i + 1. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
51 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
52 |
[ |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
53 |
self perform: option asSymbol with: value |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
54 |
] on: MessageNotUnderstood do:[:ex | |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
55 |
self error: 'Invalid option: ', option storeString. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
56 |
] |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
57 |
]. |
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
58 |
|
16e8536f5cfb
PPCConfiguration refactoring: [10/10]: Cleaned up compilation API
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
535
diff
changeset
|
59 |
"Created: / 07-09-2015 / 10:36:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
533
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
60 |
! ! |
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 |
!PPCCompilationOptions methodsFor:'options'! |
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 |
mode |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
65 |
^ 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
|
66 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
67 |
"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
|
68 |
! |
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 |
mode: mode |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
71 |
"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
|
72 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
73 |
#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
|
74 |
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
|
75 |
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
|
76 |
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
|
77 |
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
|
78 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
79 |
#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
|
80 |
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
|
81 |
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
|
82 |
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
|
83 |
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
|
84 |
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
|
85 |
" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
86 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
87 |
(#(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
|
88 |
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
|
89 |
]. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
90 |
mode == #AOT ifTrue:[ |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
91 |
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
|
92 |
]. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
93 |
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
|
94 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
95 |
"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
|
96 |
! |
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 |
parserName |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
99 |
^ 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
|
100 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
101 |
"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
|
102 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
103 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
104 |
parserName: aSymbol |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
105 |
"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
|
106 |
Defaults to #PPGeneratedParser." |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
107 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
108 |
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
|
109 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
110 |
"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
|
111 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
112 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
113 |
scannerName |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
114 |
^ 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
|
115 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
116 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
117 |
scannerName: value |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
118 |
"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
|
119 |
Defaults to #PPGeneratedScanner." |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
120 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
121 |
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
|
122 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
123 |
"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
|
124 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
125 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
126 |
tokenize |
535
a8feb0f47574
PPCConfiguration refactoring: [7/10]: allow to configure passes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
534
diff
changeset
|
127 |
^ self at: #tokenize ifAbsent: false |
a8feb0f47574
PPCConfiguration refactoring: [7/10]: allow to configure passes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
534
diff
changeset
|
128 |
|
a8feb0f47574
PPCConfiguration refactoring: [7/10]: allow to configure passes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
534
diff
changeset
|
129 |
"Modified: / 04-09-2015 / 15:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
533
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
130 |
! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
131 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
132 |
tokenize: aBoolean |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
133 |
"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
|
134 |
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
|
135 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
136 |
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
|
137 |
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
|
138 |
PetitParsers may be tokenized. |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
139 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
140 |
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
|
141 |
false |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
142 |
" |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
143 |
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
|
144 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
145 |
"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
|
146 |
! ! |
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
147 |
|
666372dbe307
PPCConfiguration refactoring: [5/10]: Commented options in PPCCompilationOptions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
529
diff
changeset
|
148 |
!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
|
149 |
|
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
|
150 |
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
|
151 |
^ 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
|
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 |
|
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
|
154 |
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
|
155 |
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
|
156 |
! |
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
|
157 |
|
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
|
158 |
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
|
159 |
^ 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
|
160 |
! |
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
|
161 |
|
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 |
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
|
163 |
^ 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
|
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 |
|
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
|
166 |
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
|
167 |
^ 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
|
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 |
|
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
|
170 |
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
|
171 |
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
|
172 |
! |
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
|
173 |
|
534
a949c4fe44df
PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
533
diff
changeset
|
174 |
parserSuperclass |
a949c4fe44df
PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
533
diff
changeset
|
175 |
^ self at: #parserSuperclass ifAbsent: nil |
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
|
176 |
|
535
a8feb0f47574
PPCConfiguration refactoring: [7/10]: allow to configure passes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
534
diff
changeset
|
177 |
"Modified: / 04-09-2015 / 16:06:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
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
|
178 |
! |
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 |
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
|
181 |
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
|
182 |
! |
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
|
183 |
|
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
|
184 |
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
|
185 |
^ 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
|
186 |
! |
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
|
187 |
|
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
|
188 |
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
|
189 |
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
|
190 |
! |
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 |
|
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
|
192 |
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
|
193 |
^ 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
|
194 |
! |
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
|
195 |
|
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
|
196 |
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
|
197 |
self set: #scannerSuperclass 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
|
198 |
! ! |
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
|
199 |
|
529
439c4057517f
PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
524
diff
changeset
|
200 |
!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
|
201 |
|
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
|
202 |
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
|
203 |
^ 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
|
204 |
! |
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 |
|
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
|
206 |
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
|
207 |
^ 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
|
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 |