compiler/PPCCompilationOptions.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 29 Aug 2015 07:56:14 +0100
changeset 534 a949c4fe44df
parent 533 666372dbe307
child 535 a8feb0f47574
permissions -rw-r--r--
PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends. ...in PPCConfiguration>>invokePhases. This is a preparation for removing #invokePhases completely and configuring the compilation via list of phases.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
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
   133
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
   134
    ^ 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
   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
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
   138
    ^ 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
   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
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
   142
    ^ 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
   143
!
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
   144
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
   145
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
   146
    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
   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
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
   150
    ^ 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
   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
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
   154
    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
   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
534
a949c4fe44df PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 533
diff changeset
   157
parserSuperclass
a949c4fe44df PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 533
diff changeset
   158
    ^ 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
   159
534
a949c4fe44df PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 533
diff changeset
   160
    "Modified: / 01-09-2015 / 08:45:25 / 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
   161
!
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
   162
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
   163
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
   164
    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
   165
!
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
   166
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
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
   168
    ^ 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
   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
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
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
   172
    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
   173
!
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
   174
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
   175
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
   176
    ^ 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
   177
!
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
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
   180
    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
   181
!
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
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
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
   184
    ^ 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
   185
!
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
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
   188
    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
   189
! !
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
   190
529
439c4057517f PPCConfiguration refactoring [1/10]: renamed PPCArguments to PPCCompilationOptions
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 524
diff changeset
   191
!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
   192
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
   193
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
   194
    ^ 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
   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
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
   197
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
   198
    ^ 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
   199
! !
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
   200