45
45
46
46
package org .m2sf .m2j ;
47
47
48
-
49
- /* Face palm alert: Java doesn't allow interfaces on enums -- use abstract. */
50
-
51
- abstract public enum ProtoAstNodeType {
52
-
53
48
/* ---------------------------------------------------------------------------
54
49
* type AstNodeType
55
50
* ---------------------------------------------------------------------------
56
51
* Enumerated values representing AST node types.
57
52
* ------------------------------------------------------------------------ */
58
53
54
+ public enum ProtoAstNodeType {
55
+
59
56
/* Empty Node Type */
60
57
61
58
AST_EMPTY ,
@@ -201,6 +198,7 @@ abstract public enum ProtoAstNodeType {
201
198
202
199
AST_INVALID ; /* for use as failure indicator */
203
200
201
+ } /* ProtoAstNodeType */
204
202
205
203
/* ---------------------------------------------------------------------------
206
204
* AST node type groupings.
@@ -236,75 +234,4 @@ abstract public enum ProtoAstNodeType {
236
234
* last literal node type : AST_QUOTEDVAL
237
235
* ------------------------------------------------------------------------ */
238
236
239
-
240
- /* ---------------------------------------------------------------------------
241
- * method isValid(nodeType)
242
- * ---------------------------------------------------------------------------
243
- * Returns true if nodeType is a valid node type, otherwise false.
244
- * ------------------------------------------------------------------------ */
245
-
246
- abstract public boolean isValid (ProtoAstNodeType nodeType );
247
-
248
-
249
- /* ---------------------------------------------------------------------------
250
- * method isNonterminalType(nodeType)
251
- * ---------------------------------------------------------------------------
252
- * Returns true if nodeType is a nonterminal node type, otherwise false.
253
- * ------------------------------------------------------------------------ */
254
-
255
- abstract public boolean isNonterminalType (ProtoAstNodeType nodeType );
256
-
257
-
258
- /* ---------------------------------------------------------------------------
259
- * method isTerminalType(nodeType)
260
- * ---------------------------------------------------------------------------
261
- * Returns true if nodeType is a terminal node type, otherwise false.
262
- * ------------------------------------------------------------------------ */
263
-
264
- abstract public boolean isTerminalType (ProtoAstNodeType nodeType );
265
-
266
-
267
- /* ---------------------------------------------------------------------------
268
- * method isListType(nodeType)
269
- * ---------------------------------------------------------------------------
270
- * Returns true if nodeType is a list node type, otherwise false.
271
- * ------------------------------------------------------------------------ */
272
-
273
- abstract public boolean isListType (ProtoAstNodeType nodeType );
274
-
275
-
276
- /* ---------------------------------------------------------------------------
277
- * method isLegalSubnodeCount(nodeType, subnodeCount)
278
- * ---------------------------------------------------------------------------
279
- * Returns true if the given subnode count is a legal value for the given
280
- * node type, otherwise false.
281
- * ------------------------------------------------------------------------ */
282
-
283
- abstract public boolean isLegalSubnodeCount
284
- (ProtoAstNodeType nodeType , int SubnodeCount );
285
-
286
-
287
- /* ---------------------------------------------------------------------------
288
- * method isLegalSubnodeType(inNodeType, subnodeType, index)
289
- * ---------------------------------------------------------------------------
290
- * Returns true if the given subnode type is a legal node type for the given
291
- * index in a node of the given subnode type, otherwise false.
292
- * ------------------------------------------------------------------------ */
293
-
294
- abstract public boolean isLegalSubnodeType
295
- (ProtoAstNodeType inNodeType , ProtoAstNodeType subnodeType , int index );
296
-
297
-
298
- /* ---------------------------------------------------------------------------
299
- * method nameForNodeType(nodeType)
300
- * ---------------------------------------------------------------------------
301
- * Returns a string with a human readable name for nodeType or null if the
302
- * given node type is invalid.
303
- * ------------------------------------------------------------------------ */
304
-
305
- abstract public String nameForNodeType (ProtoAstNodeType nodeType );
306
-
307
-
308
- } /* ProtoNodeType */
309
-
310
237
/* END OF FILE */
0 commit comments