1: ================================================================================
  2: 
  3: Smalltalk defineClass: #SynapseParseAction
  4:     superclass: #{Core.Object}
  5:     indexedType: #none
  6:     private: false
  7:     instanceVariableNames: 'actionType errorMessage nextState reductionSymbols nextSymbol '
  8:     classInstanceVariableNames: ''
  9:     imports: ''
 10:     category: ''
 11: 
 12: ================================================================================
 13: 
 14: SynapseParseAction method for 'initialize-release'
 15: 
 16: acceptAction
 17: 
 18:     actionType := #accept
 19: 
 20: ------------------------------------------------------------
 21: 
 22: SynapseParseAction method for 'initialize-release'
 23: 
 24: errorActionWithMessage: aString
 25: 
 26:     actionType := #error.
 27:     errorMessage := aString
 28: 
 29: ------------------------------------------------------------
 30: 
 31: SynapseParseAction method for 'accessing'
 32: 
 33: errorMessage
 34: 
 35:     ^errorMessage
 36: 
 37: ------------------------------------------------------------
 38: 
 39: SynapseParseAction method for 'initialize-release'
 40: 
 41: initialize
 42: 
 43:     actionType := nil.
 44:     nextState := nil.
 45:     reductionSymbols := nil.
 46:     nextSymbol := nil.
 47:     errorMessage := nil
 48: 
 49: ------------------------------------------------------------
 50: 
 51: SynapseParseAction method for 'testing'
 52: 
 53: isAccept
 54: 
 55:     ^actionType = #accept
 56: 
 57: ------------------------------------------------------------
 58: 
 59: SynapseParseAction method for 'testing'
 60: 
 61: isCompleted
 62: 
 63:     ^self isAccept or: [self isError]
 64: 
 65: ------------------------------------------------------------
 66: 
 67: SynapseParseAction method for 'testing'
 68: 
 69: isError
 70: 
 71:     ^actionType = #error
 72: 
 73: ------------------------------------------------------------
 74: 
 75: SynapseParseAction method for 'testing'
 76: 
 77: isNotCompleted
 78: 
 79:     ^self isCompleted not
 80: 
 81: ------------------------------------------------------------
 82: 
 83: SynapseParseAction method for 'testing'
 84: 
 85: isReduce
 86: 
 87:     ^actionType = #reduce
 88: 
 89: ------------------------------------------------------------
 90: 
 91: SynapseParseAction method for 'testing'
 92: 
 93: isShift
 94: 
 95:     ^actionType = #shift
 96: 
 97: ------------------------------------------------------------
 98: 
 99: SynapseParseAction method for 'accessing'
100: 
101: nextState
102: 
103:     ^nextState
104: 
105: ------------------------------------------------------------
106: 
107: SynapseParseAction method for 'accessing'
108: 
109: nextSymbol
110: 
111:     ^nextSymbol
112: 
113: ------------------------------------------------------------
114: 
115: SynapseParseAction method for 'initialize-release'
116: 
117: reduceAction: aCollection to: aSymbol
118: 
119:     actionType := #reduce.
120:     reductionSymbols := aCollection.
121:     nextSymbol := aSymbol
122: 
123: ------------------------------------------------------------
124: 
125: SynapseParseAction method for 'accessing'
126: 
127: reductionSymbols
128: 
129:     ^reductionSymbols
130: 
131: ------------------------------------------------------------
132: 
133: SynapseParseAction method for 'initialize-release'
134: 
135: shiftAction: stateSymbol
136: 
137:     actionType := #shift.
138:     nextState := stateSymbol
139: 
140: ================================================================================
141: 
142: Smalltalk.SynapseParseAction class
143:     instanceVariableNames: ''
144: 
145: ================================================================================
146: 
147: SynapseParseAction class method for 'instance creation'
148: 
149: acceptAction
150: 
151:     ^(self new)
152:         acceptAction;
153:         yourself
154: 
155: ------------------------------------------------------------
156: 
157: SynapseParseAction class method for 'instance creation'
158: 
159: errorAction
160: 
161:     ^self errorActionWithMessage: nil
162: 
163: ------------------------------------------------------------
164: 
165: SynapseParseAction class method for 'instance creation'
166: 
167: errorActionWithMessage: aString
168: 
169:     ^(self new)
170:         errorActionWithMessage: aString;
171:         yourself
172: 
173: ------------------------------------------------------------
174: 
175: SynapseParseAction class method for 'instance creation'
176: 
177: new
178: 
179:     ^(super new)
180:         initialize;
181:         yourself
182: 
183: ------------------------------------------------------------
184: 
185: SynapseParseAction class method for 'instance creation'
186: 
187: reduceAction: reductionSymbols to: aSymbol
188: 
189:     ^(self new)
190:         reduceAction: reductionSymbols to: aSymbol;
191:         yourself
192: 
193: ------------------------------------------------------------
194: 
195: SynapseParseAction class method for 'instance creation'
196: 
197: shiftAction: stateSymbol
198: 
199:     ^(self new)
200:         shiftAction: stateSymbol;
201:         yourself
202: 
203: ================================================================================

This document was generated by KSU.TextDoclet on 2013/02/22 at 01:01:17.