compiler/PPCAbstractActionNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 30 Apr 2015 23:43:14 +0200
changeset 438 20598d7ce9fa
parent 428 b879012e366e
child 452 9f4558b3be66
permissions -rw-r--r--
Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4 Name: PetitCompiler-JanKurs.100 Author: JanKurs Time: 30-04-2015, 10:48:52.165 AM UUID: 80196870-5921-46d9-ac20-a43bf5c2f3c2 Name: PetitCompiler-Tests-JanKurs.44 Author: JanKurs Time: 30-04-2015, 10:49:22.489 AM UUID: 348c02e8-18ce-48f6-885d-fcff4516a298 Name: PetitCompiler-Benchmarks-JanKurs.4 Author: JanKurs Time: 30-04-2015, 10:58:44.890 AM UUID: 18cadb42-f9ef-45fb-82e9-8469ade56c8b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
391
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/compiler' }"
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
422
116d2b2af905 To fold
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 421
diff changeset
     3
"{ NameSpace: Smalltalk }"
116d2b2af905 To fold
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 421
diff changeset
     4
391
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
PPCDelegateNode subclass:#PPCAbstractActionNode
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:'block'
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'PetitCompiler-Nodes'
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
428
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    12
391
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
!PPCAbstractActionNode methodsFor:'accessing'!
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
block
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	^ block
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
!
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
block: anObject
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
	
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
	block := anObject
438
20598d7ce9fa Updated to PetitCompiler-JanKurs.100, PetitCompiler-Tests-JanKurs.44 and PetitCompiler-Benchmarks-JanKurs.4
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 428
diff changeset
    23
!
391
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
prefix
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	^ #action
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
! !
553a5456963b Ported PetitCompiler-(Tests).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
421
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    29
!PPCAbstractActionNode methodsFor:'comparing'!
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    30
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    31
= anotherNode
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    32
	super = anotherNode ifFalse: [ ^ false ].
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    33
	^ block = anotherNode block.
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    34
!
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    35
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    36
hash
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    37
	^ super hash bitXor: block hash
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    38
! !
7e08b31e0dae Merged JK's version from Monticello
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 392
diff changeset
    39
428
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    40
!PPCAbstractActionNode class methodsFor:'documentation'!
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    41
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    42
version_HG
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    43
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    44
    ^ '$Changeset: <not expanded> $'
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    45
! !
b879012e366e Compilation fixed, removed obsolete methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 422
diff changeset
    46