1
|
1 |
"{ Package: 'stx:goodies/smaCC' }"
|
|
2 |
|
|
3 |
"{ NameSpace: SmaCC }"
|
|
4 |
|
|
5 |
SmaCCSymbol subclass:#SmaCCTerminalSymbol
|
|
6 |
instanceVariableNames:'regularExpression createIdMethod'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'SmaCC-Parser Generator'
|
|
10 |
!
|
|
11 |
|
|
12 |
SmaCCTerminalSymbol comment:'SmaCCTerminalSymbol represents a terminal symbol in our grammar.
|
|
13 |
|
|
14 |
Instance Variables:
|
|
15 |
createIdMethod <Boolean> should we create a symbolNameId method for this symbol.
|
|
16 |
regularExpression <SmaCCRegularExpression> our regular expression that we must match for this terminal symbol'
|
|
17 |
!
|
|
18 |
|
|
19 |
|
|
20 |
!SmaCCTerminalSymbol methodsFor:'accessing'!
|
|
21 |
|
|
22 |
createIdMethod
|
|
23 |
^createIdMethod
|
|
24 |
!
|
|
25 |
|
|
26 |
createIdMethod: aBoolean
|
|
27 |
createIdMethod := aBoolean
|
|
28 |
!
|
|
29 |
|
|
30 |
regularExpression
|
|
31 |
^regularExpression
|
|
32 |
!
|
|
33 |
|
|
34 |
regularExpression: aScannerNode
|
|
35 |
regularExpression := aScannerNode
|
|
36 |
! !
|
|
37 |
|
|
38 |
!SmaCCTerminalSymbol methodsFor:'initialize-release'!
|
|
39 |
|
|
40 |
name: aString
|
|
41 |
super name: aString.
|
|
42 |
firstItems add: self.
|
|
43 |
createIdMethod := false
|
|
44 |
! !
|
|
45 |
|
|
46 |
!SmaCCTerminalSymbol methodsFor:'private'!
|
|
47 |
|
|
48 |
calculateFirstTerminals
|
|
49 |
^false
|
|
50 |
! !
|
|
51 |
|
|
52 |
!SmaCCTerminalSymbol methodsFor:'public'!
|
|
53 |
|
|
54 |
isTerminal
|
|
55 |
^true
|
|
56 |
! !
|
|
57 |
|
|
58 |
!SmaCCTerminalSymbol class methodsFor:'documentation'!
|
|
59 |
|
|
60 |
version
|
|
61 |
^ '$Header: /opt/data/cvs/stx/goodies/smaCC/SmaCC__SmaCCTerminalSymbol.st,v 1.1 2006-02-09 21:14:35 vranyj1 Exp $'
|
15
|
62 |
!
|
|
63 |
|
|
64 |
version_SVN
|
|
65 |
^ '$Id$'
|
1
|
66 |
! !
|