MCTraitParser.st
author mawalch
Mon, 08 Aug 2016 20:13:50 +0200
changeset 1010 bac4a6f2690e
parent 694 2d78d481fd7a
child 1095 87f223484bc3
permissions -rw-r--r--
#OTHER by mawalch Fix ridiculously propagated typo.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
232
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/monticello' }"
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
MCDoItParser subclass:#MCTraitParser
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	instanceVariableNames:''
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	classVariableNames:''
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	poolDictionaries:''
694
2d78d481fd7a category change
Claus Gittinger <cg@exept.de>
parents: 353
diff changeset
     7
	category:'SCM-Monticello-Modeling'
232
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
!MCTraitParser class methodsFor:'as yet unclassified'!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
pattern
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
	^ 'Trait named:*'
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
! !
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
!MCTraitParser methodsFor:'as yet unclassified'!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
addDefinitionsTo: aCollection
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	| tokens  definition traitCompositionString |
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	tokens := Scanner new scanTokens: source.
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	traitCompositionString := ((ReadStream on: source)
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
		match: 'uses:';
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
		upToAll: 'category:') withBlanksTrimmed.
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
	definition := MCTraitDefinition
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
		name: (tokens at: 3) 
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
		traitComposition: traitCompositionString
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
		category:  tokens last
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
		comment:  ''  
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
		commentStamp:   ''.
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
	aCollection add: definition.
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
! !
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
!MCTraitParser class methodsFor:'documentation'!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
version
694
2d78d481fd7a category change
Claus Gittinger <cg@exept.de>
parents: 353
diff changeset
    37
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCTraitParser.st,v 1.3 2012-09-11 21:29:58 cg Exp $'
232
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
version_CVS
694
2d78d481fd7a category change
Claus Gittinger <cg@exept.de>
parents: 353
diff changeset
    41
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCTraitParser.st,v 1.3 2012-09-11 21:29:58 cg Exp $'
232
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
version_SVN
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    ^ '§Id: MCTraitParser.st 5 2010-08-29 07:30:29Z vranyj1 §'
3a51f21c4120 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
! !