~ubuntu-branches/ubuntu/vivid/sablecc/vivid

« back to all changes in this revision

Viewing changes to src/org/sablecc/sablecc/lexer/Lexer.java

  • Committer: Bazaar Package Importer
  • Author(s): Etienne M. Gagnon
  • Date: 2004-01-25 13:28:01 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040125132801-0so74ui506b30b1q
Tags: 2.18.2-1
* New upstream release.
* Keep the org.sablecc.ant.taskdef.Sablecc ant task of the upstream
  package, closes: #213020.
* Improve man page.
* Update Standards-Version to 3.6.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
 
 * This file is part of SableCC.                             *
3
 
 * See the file "LICENSE" for copyright information and the  *
4
 
 * terms and conditions for copying, distribution and        *
5
 
 * modification of SableCC.                                  *
6
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
1
/* This file was generated by SableCC (http://www.sablecc.org/). */
7
2
 
8
3
package org.sablecc.sablecc.lexer;
9
4
 
10
5
import java.io.*;
11
 
import java.util.Stack;
12
 
import java.util.Vector;
13
 
 
14
6
import java.util.*;
15
7
import org.sablecc.sablecc.node.*;
16
8
 
17
 
public final class Lexer
 
9
public class Lexer
18
10
{
19
 
    private final Reader in;
20
 
 
21
 
    public Lexer(Reader in)
22
 
    {
23
 
        this.in = in;
24
 
    }
25
 
 
26
 
    private Token token;
27
 
 
28
 
    public Token peek() throws LexerException, IOException
29
 
    {
30
 
        if(token == null)
31
 
        {
32
 
            token = getToken();
33
 
        }
34
 
 
35
 
        return token;
36
 
    }
37
 
 
38
 
    public Token next() throws LexerException, IOException
39
 
    {
40
 
        if(token == null)
41
 
        {
42
 
            return getToken();
43
 
        }
44
 
 
45
 
        Token result = token;
46
 
        token = null;
47
 
        return result;
48
 
    }
49
 
 
50
 
    private int line;
51
 
    private int pos;
52
 
 
53
 
    private boolean cr;
54
 
 
55
 
    private Token getToken() throws IOException, LexerException
56
 
    {
57
 
        int state = 0;
58
 
 
59
 
        int start_pos = pos;
60
 
        int start_line = line;
61
 
 
62
 
        int accept_state = -1;
63
 
        int accept_token = -1;
64
 
        int accept_length = -1;
65
 
        int accept_pos = -1;
66
 
        int accept_line = -1;
67
 
 
68
 
        StringBuffer text = new StringBuffer();
69
 
 
70
 
        while(true)
71
 
        {
72
 
            int c = getChar();
73
 
 
74
 
            if(c != -1)
75
 
            {
76
 
                switch(c)
77
 
                {
78
 
                case 10:
79
 
                    if(cr)
80
 
                    {
81
 
                        cr = false;
82
 
                    }
83
 
                    else
84
 
                    {
85
 
                        line++;
86
 
                        pos = 0;
87
 
                    }
88
 
                    break;
89
 
                case 13:
90
 
                    line++;
91
 
                    pos = 0;
92
 
                    cr = true;
93
 
                    break;
94
 
                default:
95
 
                    pos++;
96
 
                    cr = false;
97
 
                    break;
98
 
                };
99
 
 
100
 
                text.append((char) c);
101
 
 
102
 
                int oldState = state;
103
 
                state = -1;
104
 
 
105
 
                int low = 0;
106
 
                int high = gotoTable[oldState].length - 1;
107
 
 
108
 
                while(low <= high)
109
 
                {
110
 
                    int middle = (low + high) / 2;
111
 
 
112
 
                    if(c < gotoTable[oldState][middle][0])
113
 
                    {
114
 
                        high = middle - 1;
115
 
                    }
116
 
                    else if(c > gotoTable[oldState][middle][1])
117
 
                    {
118
 
                        low = middle + 1;
119
 
                    }
120
 
                    else
121
 
                    {
122
 
                        state = gotoTable[oldState][middle][2];
123
 
                        break;
124
 
                    }
125
 
                }
126
 
            }
127
 
            else
128
 
            {
129
 
                state = -1;
130
 
            }
131
 
 
132
 
            if(state >= 0)
133
 
            {
134
 
                if(accept[state] != -1)
135
 
                {
136
 
                    accept_state = state;
137
 
                    accept_token = accept[state];
138
 
                    accept_length = text.length();
139
 
                    accept_pos = pos;
140
 
                    accept_line = line;
141
 
                }
142
 
            }
143
 
            else
144
 
            {
145
 
                if(accept_state != -1)
146
 
                {
147
 
                    switch(accept_token)
148
 
                    {
149
 
                    case 0:
150
 
                        {
151
 
                            TPackage token = new TPackage();
152
 
                            token.setPos(start_pos + 1);
153
 
                            token.setLine(start_line + 1);
154
 
                            token.setText(text.toString().substring(0, accept_length));
155
 
                            pushBack(text.toString().substring(accept_length));
156
 
                            pos = accept_pos;
157
 
                            line = accept_line;
158
 
                            return token;
159
 
                        }
160
 
                    case 1:
161
 
                        {
162
 
                            TStates token = new TStates();
163
 
                            token.setPos(start_pos + 1);
164
 
                            token.setLine(start_line + 1);
165
 
                            token.setText(text.toString().substring(0, accept_length));
166
 
                            pushBack(text.toString().substring(accept_length));
167
 
                            pos = accept_pos;
168
 
                            line = accept_line;
169
 
                            return token;
170
 
                        }
171
 
                    case 2:
172
 
                        {
173
 
                            THelpers token = new THelpers();
174
 
                            token.setPos(start_pos + 1);
175
 
                            token.setLine(start_line + 1);
176
 
                            token.setText(text.toString().substring(0, accept_length));
177
 
                            pushBack(text.toString().substring(accept_length));
178
 
                            pos = accept_pos;
179
 
                            line = accept_line;
180
 
                            return token;
181
 
                        }
182
 
                    case 3:
183
 
                        {
184
 
                            TTokens token = new TTokens();
185
 
                            token.setPos(start_pos + 1);
186
 
                            token.setLine(start_line + 1);
187
 
                            token.setText(text.toString().substring(0, accept_length));
188
 
                            pushBack(text.toString().substring(accept_length));
189
 
                            pos = accept_pos;
190
 
                            line = accept_line;
191
 
                            return token;
192
 
                        }
193
 
                    case 4:
194
 
                        {
195
 
                            TIgnored token = new TIgnored();
196
 
                            token.setPos(start_pos + 1);
197
 
                            token.setLine(start_line + 1);
198
 
                            token.setText(text.toString().substring(0, accept_length));
199
 
                            pushBack(text.toString().substring(accept_length));
200
 
                            pos = accept_pos;
201
 
                            line = accept_line;
202
 
                            return token;
203
 
                        }
204
 
                    case 5:
205
 
                        {
206
 
                            TProductions token = new TProductions();
207
 
                            token.setPos(start_pos + 1);
208
 
                            token.setLine(start_line + 1);
209
 
                            token.setText(text.toString().substring(0, accept_length));
210
 
                            pushBack(text.toString().substring(accept_length));
211
 
                            pos = accept_pos;
212
 
                            line = accept_line;
213
 
                            return token;
214
 
                        }
215
 
                    case 6:
216
 
                        {
217
 
                            TTokenSpecifier token = new TTokenSpecifier();
218
 
                            token.setPos(start_pos + 1);
219
 
                            token.setLine(start_line + 1);
220
 
                            token.setText(text.toString().substring(0, accept_length));
221
 
                            pushBack(text.toString().substring(accept_length));
222
 
                            pos = accept_pos;
223
 
                            line = accept_line;
224
 
                            return token;
225
 
                        }
226
 
                    case 7:
227
 
                        {
228
 
                            TProductionSpecifier token = new TProductionSpecifier();
229
 
                            token.setPos(start_pos + 1);
230
 
                            token.setLine(start_line + 1);
231
 
                            token.setText(text.toString().substring(0, accept_length));
232
 
                            pushBack(text.toString().substring(accept_length));
233
 
                            pos = accept_pos;
234
 
                            line = accept_line;
235
 
                            return token;
236
 
                        }
237
 
                    case 8:
238
 
                        {
239
 
                            TDot token = new TDot();
240
 
                            token.setPos(start_pos + 1);
241
 
                            token.setLine(start_line + 1);
242
 
                            token.setText(text.toString().substring(0, accept_length));
243
 
                            pushBack(text.toString().substring(accept_length));
244
 
                            pos = accept_pos;
245
 
                            line = accept_line;
246
 
                            return token;
247
 
                        }
248
 
                    case 9:
249
 
                        {
250
 
                            TDDot token = new TDDot();
251
 
                            token.setPos(start_pos + 1);
252
 
                            token.setLine(start_line + 1);
253
 
                            token.setText(text.toString().substring(0, accept_length));
254
 
                            pushBack(text.toString().substring(accept_length));
255
 
                            pos = accept_pos;
256
 
                            line = accept_line;
257
 
                            return token;
258
 
                        }
259
 
                    case 10:
260
 
                        {
261
 
                            TSemicolon token = new TSemicolon();
262
 
                            token.setPos(start_pos + 1);
263
 
                            token.setLine(start_line + 1);
264
 
                            token.setText(text.toString().substring(0, accept_length));
265
 
                            pushBack(text.toString().substring(accept_length));
266
 
                            pos = accept_pos;
267
 
                            line = accept_line;
268
 
                            return token;
269
 
                        }
270
 
                    case 11:
271
 
                        {
272
 
                            TEqual token = new TEqual();
273
 
                            token.setPos(start_pos + 1);
274
 
                            token.setLine(start_line + 1);
275
 
                            token.setText(text.toString().substring(0, accept_length));
276
 
                            pushBack(text.toString().substring(accept_length));
277
 
                            pos = accept_pos;
278
 
                            line = accept_line;
279
 
                            return token;
280
 
                        }
281
 
                    case 12:
282
 
                        {
283
 
                            TLBkt token = new TLBkt();
284
 
                            token.setPos(start_pos + 1);
285
 
                            token.setLine(start_line + 1);
286
 
                            token.setText(text.toString().substring(0, accept_length));
287
 
                            pushBack(text.toString().substring(accept_length));
288
 
                            pos = accept_pos;
289
 
                            line = accept_line;
290
 
                            return token;
291
 
                        }
292
 
                    case 13:
293
 
                        {
294
 
                            TRBkt token = new TRBkt();
295
 
                            token.setPos(start_pos + 1);
296
 
                            token.setLine(start_line + 1);
297
 
                            token.setText(text.toString().substring(0, accept_length));
298
 
                            pushBack(text.toString().substring(accept_length));
299
 
                            pos = accept_pos;
300
 
                            line = accept_line;
301
 
                            return token;
302
 
                        }
303
 
                    case 14:
304
 
                        {
305
 
                            TLPar token = new TLPar();
306
 
                            token.setPos(start_pos + 1);
307
 
                            token.setLine(start_line + 1);
308
 
                            token.setText(text.toString().substring(0, accept_length));
309
 
                            pushBack(text.toString().substring(accept_length));
310
 
                            pos = accept_pos;
311
 
                            line = accept_line;
312
 
                            return token;
313
 
                        }
314
 
                    case 15:
315
 
                        {
316
 
                            TRPar token = new TRPar();
317
 
                            token.setPos(start_pos + 1);
318
 
                            token.setLine(start_line + 1);
319
 
                            token.setText(text.toString().substring(0, accept_length));
320
 
                            pushBack(text.toString().substring(accept_length));
321
 
                            pos = accept_pos;
322
 
                            line = accept_line;
323
 
                            return token;
324
 
                        }
325
 
                    case 16:
326
 
                        {
327
 
                            TLBrace token = new TLBrace();
328
 
                            token.setPos(start_pos + 1);
329
 
                            token.setLine(start_line + 1);
330
 
                            token.setText(text.toString().substring(0, accept_length));
331
 
                            pushBack(text.toString().substring(accept_length));
332
 
                            pos = accept_pos;
333
 
                            line = accept_line;
334
 
                            return token;
335
 
                        }
336
 
                    case 17:
337
 
                        {
338
 
                            TRBrace token = new TRBrace();
339
 
                            token.setPos(start_pos + 1);
340
 
                            token.setLine(start_line + 1);
341
 
                            token.setText(text.toString().substring(0, accept_length));
342
 
                            pushBack(text.toString().substring(accept_length));
343
 
                            pos = accept_pos;
344
 
                            line = accept_line;
345
 
                            return token;
346
 
                        }
347
 
                    case 18:
348
 
                        {
349
 
                            TPlus token = new TPlus();
350
 
                            token.setPos(start_pos + 1);
351
 
                            token.setLine(start_line + 1);
352
 
                            token.setText(text.toString().substring(0, accept_length));
353
 
                            pushBack(text.toString().substring(accept_length));
354
 
                            pos = accept_pos;
355
 
                            line = accept_line;
356
 
                            return token;
357
 
                        }
358
 
                    case 19:
359
 
                        {
360
 
                            TMinus token = new TMinus();
361
 
                            token.setPos(start_pos + 1);
362
 
                            token.setLine(start_line + 1);
363
 
                            token.setText(text.toString().substring(0, accept_length));
364
 
                            pushBack(text.toString().substring(accept_length));
365
 
                            pos = accept_pos;
366
 
                            line = accept_line;
367
 
                            return token;
368
 
                        }
369
 
                    case 20:
370
 
                        {
371
 
                            TQMark token = new TQMark();
372
 
                            token.setPos(start_pos + 1);
373
 
                            token.setLine(start_line + 1);
374
 
                            token.setText(text.toString().substring(0, accept_length));
375
 
                            pushBack(text.toString().substring(accept_length));
376
 
                            pos = accept_pos;
377
 
                            line = accept_line;
378
 
                            return token;
379
 
                        }
380
 
                    case 21:
381
 
                        {
382
 
                            TStar token = new TStar();
383
 
                            token.setPos(start_pos + 1);
384
 
                            token.setLine(start_line + 1);
385
 
                            token.setText(text.toString().substring(0, accept_length));
386
 
                            pushBack(text.toString().substring(accept_length));
387
 
                            pos = accept_pos;
388
 
                            line = accept_line;
389
 
                            return token;
390
 
                        }
391
 
                    case 22:
392
 
                        {
393
 
                            TBar token = new TBar();
394
 
                            token.setPos(start_pos + 1);
395
 
                            token.setLine(start_line + 1);
396
 
                            token.setText(text.toString().substring(0, accept_length));
397
 
                            pushBack(text.toString().substring(accept_length));
398
 
                            pos = accept_pos;
399
 
                            line = accept_line;
400
 
                            return token;
401
 
                        }
402
 
                    case 23:
403
 
                        {
404
 
                            TComma token = new TComma();
405
 
                            token.setPos(start_pos + 1);
406
 
                            token.setLine(start_line + 1);
407
 
                            token.setText(text.toString().substring(0, accept_length));
408
 
                            pushBack(text.toString().substring(accept_length));
409
 
                            pos = accept_pos;
410
 
                            line = accept_line;
411
 
                            return token;
412
 
                        }
413
 
                    case 24:
414
 
                        {
415
 
                            TSlash token = new TSlash();
416
 
                            token.setPos(start_pos + 1);
417
 
                            token.setLine(start_line + 1);
418
 
                            token.setText(text.toString().substring(0, accept_length));
419
 
                            pushBack(text.toString().substring(accept_length));
420
 
                            pos = accept_pos;
421
 
                            line = accept_line;
422
 
                            return token;
423
 
                        }
424
 
                    case 25:
425
 
                        {
426
 
                            TArrow token = new TArrow();
427
 
                            token.setPos(start_pos + 1);
428
 
                            token.setLine(start_line + 1);
429
 
                            token.setText(text.toString().substring(0, accept_length));
430
 
                            pushBack(text.toString().substring(accept_length));
431
 
                            pos = accept_pos;
432
 
                            line = accept_line;
433
 
                            return token;
434
 
                        }
435
 
                    case 26:
436
 
                        {
437
 
                            TColon token = new TColon();
438
 
                            token.setPos(start_pos + 1);
439
 
                            token.setLine(start_line + 1);
440
 
                            token.setText(text.toString().substring(0, accept_length));
441
 
                            pushBack(text.toString().substring(accept_length));
442
 
                            pos = accept_pos;
443
 
                            line = accept_line;
444
 
                            return token;
445
 
                        }
446
 
                    case 27:
447
 
                        {
448
 
                            TId token = new TId();
449
 
                            token.setPos(start_pos + 1);
450
 
                            token.setLine(start_line + 1);
451
 
                            token.setText(text.toString().substring(0, accept_length));
452
 
                            pushBack(text.toString().substring(accept_length));
453
 
                            pos = accept_pos;
454
 
                            line = accept_line;
455
 
                            return token;
456
 
                        }
457
 
                    case 28:
458
 
                        {
459
 
                            TChar token = new TChar();
460
 
                            token.setPos(start_pos + 1);
461
 
                            token.setLine(start_line + 1);
462
 
                            token.setText(text.toString().substring(0, accept_length));
463
 
                            pushBack(text.toString().substring(accept_length));
464
 
                            pos = accept_pos;
465
 
                            line = accept_line;
466
 
                            return token;
467
 
                        }
468
 
                    case 29:
469
 
                        {
470
 
                            TDecChar token = new TDecChar();
471
 
                            token.setPos(start_pos + 1);
472
 
                            token.setLine(start_line + 1);
473
 
                            token.setText(text.toString().substring(0, accept_length));
474
 
                            pushBack(text.toString().substring(accept_length));
475
 
                            pos = accept_pos;
476
 
                            line = accept_line;
477
 
                            return token;
478
 
                        }
479
 
                    case 30:
480
 
                        {
481
 
                            THexChar token = new THexChar();
482
 
                            token.setPos(start_pos + 1);
483
 
                            token.setLine(start_line + 1);
484
 
                            token.setText(text.toString().substring(0, accept_length));
485
 
                            pushBack(text.toString().substring(accept_length));
486
 
                            pos = accept_pos;
487
 
                            line = accept_line;
488
 
                            return token;
489
 
                        }
490
 
                    case 31:
491
 
                        {
492
 
                            TString token = new TString();
493
 
                            token.setPos(start_pos + 1);
494
 
                            token.setLine(start_line + 1);
495
 
                            token.setText(text.toString().substring(0, accept_length));
496
 
                            pushBack(text.toString().substring(accept_length));
497
 
                            pos = accept_pos;
498
 
                            line = accept_line;
499
 
                            return token;
500
 
                        }
501
 
                    case 32:
502
 
                        {
503
 
                            TPkgId token = new TPkgId();
504
 
                            token.setPos(start_pos + 1);
505
 
                            token.setLine(start_line + 1);
506
 
                            token.setText(text.toString().substring(0, accept_length));
507
 
                            pushBack(text.toString().substring(accept_length));
508
 
                            pos = accept_pos;
509
 
                            line = accept_line;
510
 
                            return token;
511
 
                        }
512
 
                    case 33:
513
 
                        {
514
 
                            TBlank token = new TBlank();
515
 
                            token.setPos(start_pos + 1);
516
 
                            token.setLine(start_line + 1);
517
 
                            token.setText(text.toString().substring(0, accept_length));
518
 
                            pushBack(text.toString().substring(accept_length));
519
 
                            pos = accept_pos;
520
 
                            line = accept_line;
521
 
                            return token;
522
 
                        }
523
 
                    case 34:
524
 
                        {
525
 
                            TComment token = new TComment();
526
 
                            token.setPos(start_pos + 1);
527
 
                            token.setLine(start_line + 1);
528
 
                            token.setText(text.toString().substring(0, accept_length));
529
 
                            pushBack(text.toString().substring(accept_length));
530
 
                            pos = accept_pos;
531
 
                            line = accept_line;
532
 
                            return token;
533
 
                        }
534
 
                    }
535
 
                }
536
 
                else
537
 
                {
538
 
                    if(text.length() > 0)
539
 
                    {
540
 
                        throw new LexerException(
541
 
                            "[" + (start_line + 1) + "," + (start_pos + 1) + "]" +
542
 
                            " Unknown token: " + text);
543
 
                    }
544
 
                    else
545
 
                    {
546
 
                        EOF token = new EOF();
547
 
                        token.setPos(start_pos + 1);
548
 
                        token.setLine(start_line + 1);
549
 
                        return token;
550
 
                    }
551
 
                }
552
 
            }
553
 
        }
554
 
    }
555
 
 
556
 
    private final Stack chars = new Stack();
557
 
    private boolean eof;
558
 
 
559
 
    private int getChar() throws IOException
560
 
    {
561
 
        if(!chars.empty())
562
 
        {
563
 
            return ((Integer) chars.pop()).intValue();
564
 
        }
565
 
 
566
 
        if(eof)
567
 
        {
568
 
            return -1;
569
 
        }
570
 
 
571
 
        int result = in.read();
572
 
 
573
 
        if(result == -1)
574
 
        {
575
 
            eof = true;
576
 
        }
577
 
 
578
 
        return result;
579
 
    }
580
 
 
581
 
    private void pushBack(String text)
582
 
    {
583
 
        for(int i = text.length() - 1; i >= 0; i--)
584
 
        {
585
 
            chars.push(new Integer((int) text.charAt(i)));
586
 
        }
587
 
    }
588
 
 
589
 
    private static int[][][] gotoTable =
590
 
    {
591
 
        {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, {36, 36, 5}, {39, 39, 6}, {40, 40, 7}, {41, 41, 8}, {42, 42, 9}, {43, 43, 10}, {44, 44, 11}, {45, 45, 12}, {46, 46, 13}, {47, 47, 14}, {48, 48, 15}, {49, 57, 16}, {58, 58, 17}, {59, 59, 18}, {61, 61, 19}, {63, 63, 20}, {65, 71, 21}, {72, 72, 22}, {73, 73, 23}, {74, 79, 21}, {80, 80, 24}, {81, 82, 21}, {83, 83, 25}, {84, 84, 26}, {85, 90, 21}, {91, 91, 27}, {93, 93, 28}, {95, 95, 29}, {97, 122, 30}, {123, 123, 31}, {124, 124, 32}, {125, 125, 33}, },
592
 
        {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, },
593
 
        {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, },
594
 
        {{9, 9, 1}, {10, 10, 34}, {13, 13, 3}, {32, 32, 4}, },
595
 
        {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, },
596
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
597
 
        {{0, 9, 40}, {11, 12, 40}, {14, 38, 40}, {39, 39, 41}, {40, 65535, 40}, },
598
 
        {},
599
 
        {},
600
 
        {},
601
 
        {},
602
 
        {},
603
 
        {{62, 62, 42}, },
604
 
        {{46, 46, 43}, },
605
 
        {{42, 42, 44}, {47, 47, 45}, },
606
 
        {{48, 57, 16}, {88, 88, 46}, {120, 120, 47}, },
607
 
        {{48, 57, 16}, },
608
 
        {},
609
 
        {},
610
 
        {},
611
 
        {},
612
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
613
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 48}, {102, 122, 39}, },
614
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 102, 39}, {103, 103, 49}, {104, 122, 39}, },
615
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 97, 50}, {98, 113, 39}, {114, 114, 51}, {115, 122, 39}, },
616
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 115, 39}, {116, 116, 52}, {117, 122, 39}, },
617
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 110, 39}, {111, 111, 53}, {112, 122, 39}, },
618
 
        {},
619
 
        {},
620
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
621
 
        {{36, 36, 35}, {48, 57, 54}, {65, 90, 37}, {95, 95, 55}, {97, 122, 56}, },
622
 
        {},
623
 
        {},
624
 
        {},
625
 
        {{9, 9, 1}, {10, 10, 2}, {13, 13, 3}, {32, 32, 4}, },
626
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
627
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
628
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
629
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
630
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
631
 
        {{0, 9, 57}, {11, 12, 57}, {14, 38, 57}, {39, 39, 58}, {40, 65535, 57}, },
632
 
        {{39, 39, 59}, },
633
 
        {},
634
 
        {},
635
 
        {{0, 41, 60}, {42, 42, 61}, {43, 65535, 60}, },
636
 
        {{0, 9, 62}, {10, 10, 63}, {11, 12, 62}, {13, 13, 64}, {14, 65535, 62}, },
637
 
        {{48, 57, 65}, {65, 70, 65}, {97, 102, 65}, },
638
 
        {{48, 57, 65}, {65, 70, 65}, {97, 102, 65}, },
639
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 107, 39}, {108, 108, 66}, {109, 122, 39}, },
640
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 109, 39}, {110, 110, 67}, {111, 122, 39}, },
641
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 98, 39}, {99, 99, 68}, {100, 122, 39}, },
642
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 110, 39}, {111, 111, 69}, {112, 122, 39}, },
643
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 97, 70}, {98, 122, 39}, },
644
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 106, 39}, {107, 107, 71}, {108, 122, 39}, },
645
 
        {{36, 36, 35}, {48, 57, 54}, {65, 90, 37}, {95, 95, 55}, {97, 122, 56}, },
646
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 72}, },
647
 
        {{36, 36, 35}, {48, 57, 54}, {65, 90, 37}, {95, 95, 55}, {97, 122, 56}, },
648
 
        {{0, 9, 57}, {11, 12, 57}, {14, 38, 57}, {39, 39, 73}, {40, 65535, 57}, },
649
 
        {},
650
 
        {},
651
 
        {{0, 41, 60}, {42, 42, 61}, {43, 65535, 60}, },
652
 
        {{0, 41, 74}, {42, 42, 61}, {43, 46, 74}, {47, 47, 75}, {48, 65535, 74}, },
653
 
        {{0, 9, 62}, {10, 10, 63}, {11, 12, 62}, {13, 13, 64}, {14, 65535, 62}, },
654
 
        {},
655
 
        {{10, 10, 76}, },
656
 
        {{48, 57, 65}, {65, 70, 65}, {97, 102, 65}, },
657
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 111, 39}, {112, 112, 77}, {113, 122, 39}, },
658
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 110, 39}, {111, 111, 78}, {112, 122, 39}, },
659
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 106, 39}, {107, 107, 79}, {108, 122, 39}, },
660
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 99, 39}, {100, 100, 80}, {101, 122, 39}, },
661
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 115, 39}, {116, 116, 81}, {117, 122, 39}, },
662
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 82}, {102, 122, 39}, },
663
 
        {{36, 36, 35}, {48, 57, 83}, {65, 90, 37}, {95, 95, 55}, {97, 122, 84}, },
664
 
        {},
665
 
        {{0, 41, 85}, {42, 42, 86}, {43, 65535, 85}, },
666
 
        {},
667
 
        {},
668
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 87}, {102, 122, 39}, },
669
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 113, 39}, {114, 114, 88}, {115, 122, 39}, },
670
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 97, 89}, {98, 122, 39}, },
671
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 116, 39}, {117, 117, 90}, {118, 122, 39}, },
672
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 91}, {102, 122, 39}, },
673
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 109, 39}, {110, 110, 92}, {111, 122, 39}, },
674
 
        {{36, 36, 35}, {48, 57, 83}, {65, 90, 37}, {95, 95, 55}, {97, 122, 84}, },
675
 
        {{36, 36, 35}, {48, 57, 83}, {65, 90, 37}, {95, 95, 55}, {97, 122, 84}, },
676
 
        {{0, 41, 85}, {42, 42, 86}, {43, 65535, 85}, },
677
 
        {{0, 41, 74}, {42, 42, 86}, {43, 46, 74}, {47, 47, 75}, {48, 65535, 74}, },
678
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 113, 39}, {114, 114, 93}, {115, 122, 39}, },
679
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 94}, {102, 122, 39}, },
680
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 102, 39}, {103, 103, 95}, {104, 122, 39}, },
681
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 98, 39}, {99, 99, 96}, {100, 122, 39}, },
682
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 114, 39}, {115, 115, 97}, {116, 122, 39}, },
683
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 114, 39}, {115, 115, 98}, {116, 122, 39}, },
684
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 114, 39}, {115, 115, 99}, {116, 122, 39}, },
685
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 99, 39}, {100, 100, 100}, {101, 122, 39}, },
686
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 100, 39}, {101, 101, 101}, {102, 122, 39}, },
687
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 115, 39}, {116, 116, 102}, {117, 122, 39}, },
688
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
689
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
690
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
691
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
692
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
693
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 104, 39}, {105, 105, 103}, {106, 122, 39}, },
694
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 110, 39}, {111, 111, 104}, {112, 122, 39}, },
695
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 109, 39}, {110, 110, 105}, {111, 122, 39}, },
696
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 114, 39}, {115, 115, 106}, {116, 122, 39}, },
697
 
        {{36, 36, 35}, {48, 57, 36}, {65, 90, 37}, {95, 95, 38}, {97, 122, 39}, },
698
 
    };
699
 
 
700
 
    private static int[] accept =
701
 
    {
702
 
        -1, 33, 33, 33, 33, 32, -1, 14, 15, 21, 18, 23, 19, 8, 24, 29, 29, 26, 10, 11, 20, 32, 32, 32, 7, 32, 6, 12, 13, 32, 27, 16, 22, 17, 33, 32, 32, 32, 32, 32, -1, -1, 25, 9, -1, -1, -1, -1, 32, 32, 32, 32, 32, 32, 27, 32, 27, -1, 28, 28, -1, -1, -1, 34, 34, 30, 32, 32, 32, 32, 32, 32, 27, 31, -1, 34, 34, 32, 32, 32, 32, 32, 32, 27, 27, -1, -1, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 1, 3, 2, 4, 0, 32, 32, 32, 32, 5,
703
 
    };
 
11
  protected Token token;
 
12
  protected State state = State.NORMAL;
 
13
 
 
14
  private PushbackReader in;
 
15
  private int line;
 
16
  private int pos;
 
17
  private boolean cr;
 
18
  private boolean eof;
 
19
  private final StringBuffer text = new StringBuffer();
 
20
 
 
21
  protected void filter() throws LexerException, IOException
 
22
    {}
 
23
 
 
24
  public Lexer(PushbackReader in)
 
25
  {
 
26
    this.in = in;
 
27
 
 
28
    if(gotoTable == null)
 
29
    {
 
30
      try
 
31
      {
 
32
        DataInputStream s = new DataInputStream(
 
33
                              new BufferedInputStream(
 
34
                                Lexer.class.getResourceAsStream("lexer.dat")));
 
35
 
 
36
        // read gotoTable
 
37
        int length = s.readInt();
 
38
        gotoTable = new int[length][][][];
 
39
        for(int i = 0; i < gotoTable.length; i++)
 
40
        {
 
41
          length = s.readInt();
 
42
          gotoTable[i] = new int[length][][];
 
43
          for(int j = 0; j < gotoTable[i].length; j++)
 
44
          {
 
45
            length = s.readInt();
 
46
            gotoTable[i][j] = new int[length][3];
 
47
            for(int k = 0; k < gotoTable[i][j].length; k++)
 
48
            {
 
49
              for(int l = 0; l < 3; l++)
 
50
              {
 
51
                gotoTable[i][j][k][l] = s.readInt();
 
52
              }
 
53
            }
 
54
          }
 
55
        }
 
56
 
 
57
        // read accept
 
58
        length = s.readInt();
 
59
        accept = new int[length][];
 
60
        for(int i = 0; i < accept.length; i++)
 
61
        {
 
62
          length = s.readInt();
 
63
          accept[i] = new int[length];
 
64
          for(int j = 0; j < accept[i].length; j++)
 
65
          {
 
66
            accept[i][j] = s.readInt();
 
67
          }
 
68
        }
 
69
 
 
70
        s.close();
 
71
      }
 
72
      catch(Exception e)
 
73
      {
 
74
        throw new RuntimeException("The file \"lexer.dat\" is either missing or corrupted.");
 
75
      }
 
76
    }
 
77
  }
 
78
 
 
79
  public Token peek() throws LexerException, IOException
 
80
  {
 
81
    while(token == null)
 
82
    {
 
83
      token = getToken();
 
84
      filter();
 
85
    }
 
86
 
 
87
    return token;
 
88
  }
 
89
 
 
90
  public Token next() throws LexerException, IOException
 
91
  {
 
92
    while(token == null)
 
93
    {
 
94
      token = getToken();
 
95
      filter();
 
96
    }
 
97
 
 
98
    Token result = token;
 
99
    token = null;
 
100
    return result;
 
101
  }
 
102
 
 
103
  protected Token getToken() throws IOException, LexerException
 
104
  {
 
105
    int dfa_state = 0;
 
106
 
 
107
    int start_pos = pos;
 
108
    int start_line = line;
 
109
 
 
110
    int accept_state = -1;
 
111
    int accept_token = -1;
 
112
    int accept_length = -1;
 
113
    int accept_pos = -1;
 
114
    int accept_line = -1;
 
115
 
 
116
    int[][][] gotoTable = this.gotoTable[state.id()];
 
117
    int[] accept = this.accept[state.id()];
 
118
    text.setLength(0);
 
119
 
 
120
    while(true)
 
121
    {
 
122
      int c = getChar();
 
123
 
 
124
      if(c != -1)
 
125
      {
 
126
        switch(c)
 
127
        {
 
128
        case 10:
 
129
          if(cr)
 
130
          {
 
131
            cr = false;
 
132
          }
 
133
          else
 
134
          {
 
135
            line++;
 
136
            pos = 0;
 
137
          }
 
138
          break;
 
139
        case 13:
 
140
          line++;
 
141
          pos = 0;
 
142
          cr = true;
 
143
          break;
 
144
        default:
 
145
          pos++;
 
146
          cr = false;
 
147
          break;
 
148
        };
 
149
 
 
150
        text.append((char) c);
 
151
 
 
152
        do
 
153
        {
 
154
          int oldState = (dfa_state < -1) ? (-2 -dfa_state) : dfa_state;
 
155
 
 
156
          dfa_state = -1;
 
157
 
 
158
          int[][] tmp1 =  gotoTable[oldState];
 
159
          int low = 0;
 
160
          int high = tmp1.length - 1;
 
161
 
 
162
          while(low <= high)
 
163
          {
 
164
            int middle = (low + high) / 2;
 
165
            int[] tmp2 = tmp1[middle];
 
166
 
 
167
            if(c < tmp2[0])
 
168
            {
 
169
              high = middle - 1;
 
170
            }
 
171
            else if(c > tmp2[1])
 
172
            {
 
173
              low = middle + 1;
 
174
            }
 
175
            else
 
176
            {
 
177
              dfa_state = tmp2[2];
 
178
              break;
 
179
            }
 
180
          }
 
181
        }
 
182
        while(dfa_state < -1);
 
183
      }
 
184
      else
 
185
      {
 
186
        dfa_state = -1;
 
187
      }
 
188
 
 
189
      if(dfa_state >= 0)
 
190
      {
 
191
        if(accept[dfa_state] != -1)
 
192
        {
 
193
          accept_state = dfa_state;
 
194
          accept_token = accept[dfa_state];
 
195
          accept_length = text.length();
 
196
          accept_pos = pos;
 
197
          accept_line = line;
 
198
        }
 
199
      }
 
200
      else
 
201
      {
 
202
        if(accept_state != -1)
 
203
        {
 
204
          switch(accept_token)
 
205
          {
 
206
          case 0:
 
207
            {
 
208
              Token token = new0(
 
209
                              getText(accept_length),
 
210
                              start_line + 1,
 
211
                              start_pos + 1);
 
212
              pushBack(accept_length);
 
213
              pos = accept_pos;
 
214
              line = accept_line;
 
215
              switch(state.id())
 
216
              {
 
217
              case 1:
 
218
                state = State.PACKAGE;
 
219
                break;
 
220
              }
 
221
              return token;
 
222
            }
 
223
          case 1:
 
224
            {
 
225
              Token token = new1(
 
226
                              start_line + 1,
 
227
                              start_pos + 1);
 
228
              pushBack(accept_length);
 
229
              pos = accept_pos;
 
230
              line = accept_line;
 
231
              switch(state.id())
 
232
              {
 
233
              case 0:
 
234
                state = State.PACKAGE;
 
235
                break;
 
236
              }
 
237
              return token;
 
238
            }
 
239
          case 2:
 
240
            {
 
241
              Token token = new2(
 
242
                              start_line + 1,
 
243
                              start_pos + 1);
 
244
              pushBack(accept_length);
 
245
              pos = accept_pos;
 
246
              line = accept_line;
 
247
              return token;
 
248
            }
 
249
          case 3:
 
250
            {
 
251
              Token token = new3(
 
252
                              start_line + 1,
 
253
                              start_pos + 1);
 
254
              pushBack(accept_length);
 
255
              pos = accept_pos;
 
256
              line = accept_line;
 
257
              return token;
 
258
            }
 
259
          case 4:
 
260
            {
 
261
              Token token = new4(
 
262
                              start_line + 1,
 
263
                              start_pos + 1);
 
264
              pushBack(accept_length);
 
265
              pos = accept_pos;
 
266
              line = accept_line;
 
267
              return token;
 
268
            }
 
269
          case 5:
 
270
            {
 
271
              Token token = new5(
 
272
                              start_line + 1,
 
273
                              start_pos + 1);
 
274
              pushBack(accept_length);
 
275
              pos = accept_pos;
 
276
              line = accept_line;
 
277
              return token;
 
278
            }
 
279
          case 6:
 
280
            {
 
281
              Token token = new6(
 
282
                              start_line + 1,
 
283
                              start_pos + 1);
 
284
              pushBack(accept_length);
 
285
              pos = accept_pos;
 
286
              line = accept_line;
 
287
              return token;
 
288
            }
 
289
          case 7:
 
290
            {
 
291
              Token token = new7(
 
292
                              start_line + 1,
 
293
                              start_pos + 1);
 
294
              pushBack(accept_length);
 
295
              pos = accept_pos;
 
296
              line = accept_line;
 
297
              return token;
 
298
            }
 
299
          case 8:
 
300
            {
 
301
              Token token = new8(
 
302
                              start_line + 1,
 
303
                              start_pos + 1);
 
304
              pushBack(accept_length);
 
305
              pos = accept_pos;
 
306
              line = accept_line;
 
307
              return token;
 
308
            }
 
309
          case 9:
 
310
            {
 
311
              Token token = new9(
 
312
                              start_line + 1,
 
313
                              start_pos + 1);
 
314
              pushBack(accept_length);
 
315
              pos = accept_pos;
 
316
              line = accept_line;
 
317
              return token;
 
318
            }
 
319
          case 10:
 
320
            {
 
321
              Token token = new10(
 
322
                              start_line + 1,
 
323
                              start_pos + 1);
 
324
              pushBack(accept_length);
 
325
              pos = accept_pos;
 
326
              line = accept_line;
 
327
              return token;
 
328
            }
 
329
          case 11:
 
330
            {
 
331
              Token token = new11(
 
332
                              start_line + 1,
 
333
                              start_pos + 1);
 
334
              pushBack(accept_length);
 
335
              pos = accept_pos;
 
336
              line = accept_line;
 
337
              switch(state.id())
 
338
              {
 
339
              case 0:
 
340
                state = State.NORMAL;
 
341
                break;
 
342
              case 1:
 
343
                state = State.NORMAL;
 
344
                break;
 
345
              }
 
346
              return token;
 
347
            }
 
348
          case 12:
 
349
            {
 
350
              Token token = new12(
 
351
                              start_line + 1,
 
352
                              start_pos + 1);
 
353
              pushBack(accept_length);
 
354
              pos = accept_pos;
 
355
              line = accept_line;
 
356
              return token;
 
357
            }
 
358
          case 13:
 
359
            {
 
360
              Token token = new13(
 
361
                              start_line + 1,
 
362
                              start_pos + 1);
 
363
              pushBack(accept_length);
 
364
              pos = accept_pos;
 
365
              line = accept_line;
 
366
              return token;
 
367
            }
 
368
          case 14:
 
369
            {
 
370
              Token token = new14(
 
371
                              start_line + 1,
 
372
                              start_pos + 1);
 
373
              pushBack(accept_length);
 
374
              pos = accept_pos;
 
375
              line = accept_line;
 
376
              return token;
 
377
            }
 
378
          case 15:
 
379
            {
 
380
              Token token = new15(
 
381
                              start_line + 1,
 
382
                              start_pos + 1);
 
383
              pushBack(accept_length);
 
384
              pos = accept_pos;
 
385
              line = accept_line;
 
386
              return token;
 
387
            }
 
388
          case 16:
 
389
            {
 
390
              Token token = new16(
 
391
                              start_line + 1,
 
392
                              start_pos + 1);
 
393
              pushBack(accept_length);
 
394
              pos = accept_pos;
 
395
              line = accept_line;
 
396
              return token;
 
397
            }
 
398
          case 17:
 
399
            {
 
400
              Token token = new17(
 
401
                              start_line + 1,
 
402
                              start_pos + 1);
 
403
              pushBack(accept_length);
 
404
              pos = accept_pos;
 
405
              line = accept_line;
 
406
              return token;
 
407
            }
 
408
          case 18:
 
409
            {
 
410
              Token token = new18(
 
411
                              start_line + 1,
 
412
                              start_pos + 1);
 
413
              pushBack(accept_length);
 
414
              pos = accept_pos;
 
415
              line = accept_line;
 
416
              return token;
 
417
            }
 
418
          case 19:
 
419
            {
 
420
              Token token = new19(
 
421
                              start_line + 1,
 
422
                              start_pos + 1);
 
423
              pushBack(accept_length);
 
424
              pos = accept_pos;
 
425
              line = accept_line;
 
426
              return token;
 
427
            }
 
428
          case 20:
 
429
            {
 
430
              Token token = new20(
 
431
                              start_line + 1,
 
432
                              start_pos + 1);
 
433
              pushBack(accept_length);
 
434
              pos = accept_pos;
 
435
              line = accept_line;
 
436
              return token;
 
437
            }
 
438
          case 21:
 
439
            {
 
440
              Token token = new21(
 
441
                              start_line + 1,
 
442
                              start_pos + 1);
 
443
              pushBack(accept_length);
 
444
              pos = accept_pos;
 
445
              line = accept_line;
 
446
              return token;
 
447
            }
 
448
          case 22:
 
449
            {
 
450
              Token token = new22(
 
451
                              start_line + 1,
 
452
                              start_pos + 1);
 
453
              pushBack(accept_length);
 
454
              pos = accept_pos;
 
455
              line = accept_line;
 
456
              return token;
 
457
            }
 
458
          case 23:
 
459
            {
 
460
              Token token = new23(
 
461
                              start_line + 1,
 
462
                              start_pos + 1);
 
463
              pushBack(accept_length);
 
464
              pos = accept_pos;
 
465
              line = accept_line;
 
466
              return token;
 
467
            }
 
468
          case 24:
 
469
            {
 
470
              Token token = new24(
 
471
                              start_line + 1,
 
472
                              start_pos + 1);
 
473
              pushBack(accept_length);
 
474
              pos = accept_pos;
 
475
              line = accept_line;
 
476
              return token;
 
477
            }
 
478
          case 25:
 
479
            {
 
480
              Token token = new25(
 
481
                              start_line + 1,
 
482
                              start_pos + 1);
 
483
              pushBack(accept_length);
 
484
              pos = accept_pos;
 
485
              line = accept_line;
 
486
              return token;
 
487
            }
 
488
          case 26:
 
489
            {
 
490
              Token token = new26(
 
491
                              start_line + 1,
 
492
                              start_pos + 1);
 
493
              pushBack(accept_length);
 
494
              pos = accept_pos;
 
495
              line = accept_line;
 
496
              return token;
 
497
            }
 
498
          case 27:
 
499
            {
 
500
              Token token = new27(
 
501
                              start_line + 1,
 
502
                              start_pos + 1);
 
503
              pushBack(accept_length);
 
504
              pos = accept_pos;
 
505
              line = accept_line;
 
506
              return token;
 
507
            }
 
508
          case 28:
 
509
            {
 
510
              Token token = new28(
 
511
                              getText(accept_length),
 
512
                              start_line + 1,
 
513
                              start_pos + 1);
 
514
              pushBack(accept_length);
 
515
              pos = accept_pos;
 
516
              line = accept_line;
 
517
              return token;
 
518
            }
 
519
          case 29:
 
520
            {
 
521
              Token token = new29(
 
522
                              getText(accept_length),
 
523
                              start_line + 1,
 
524
                              start_pos + 1);
 
525
              pushBack(accept_length);
 
526
              pos = accept_pos;
 
527
              line = accept_line;
 
528
              return token;
 
529
            }
 
530
          case 30:
 
531
            {
 
532
              Token token = new30(
 
533
                              getText(accept_length),
 
534
                              start_line + 1,
 
535
                              start_pos + 1);
 
536
              pushBack(accept_length);
 
537
              pos = accept_pos;
 
538
              line = accept_line;
 
539
              return token;
 
540
            }
 
541
          case 31:
 
542
            {
 
543
              Token token = new31(
 
544
                              getText(accept_length),
 
545
                              start_line + 1,
 
546
                              start_pos + 1);
 
547
              pushBack(accept_length);
 
548
              pos = accept_pos;
 
549
              line = accept_line;
 
550
              return token;
 
551
            }
 
552
          case 32:
 
553
            {
 
554
              Token token = new32(
 
555
                              getText(accept_length),
 
556
                              start_line + 1,
 
557
                              start_pos + 1);
 
558
              pushBack(accept_length);
 
559
              pos = accept_pos;
 
560
              line = accept_line;
 
561
              return token;
 
562
            }
 
563
          case 33:
 
564
            {
 
565
              Token token = new33(
 
566
                              getText(accept_length),
 
567
                              start_line + 1,
 
568
                              start_pos + 1);
 
569
              pushBack(accept_length);
 
570
              pos = accept_pos;
 
571
              line = accept_line;
 
572
              return token;
 
573
            }
 
574
          case 34:
 
575
            {
 
576
              Token token = new34(
 
577
                              getText(accept_length),
 
578
                              start_line + 1,
 
579
                              start_pos + 1);
 
580
              pushBack(accept_length);
 
581
              pos = accept_pos;
 
582
              line = accept_line;
 
583
              return token;
 
584
            }
 
585
          }
 
586
        }
 
587
        else
 
588
        {
 
589
          if(text.length() > 0)
 
590
          {
 
591
            throw new LexerException(
 
592
              "[" + (start_line + 1) + "," + (start_pos + 1) + "]" +
 
593
              " Unknown token: " + text);
 
594
          }
 
595
          else
 
596
          {
 
597
            EOF token = new EOF(
 
598
                          start_line + 1,
 
599
                          start_pos + 1);
 
600
            return token;
 
601
          }
 
602
        }
 
603
      }
 
604
    }
 
605
  }
 
606
 
 
607
  Token new0(String text, int line, int pos)
 
608
  {
 
609
    return new TPkgId(text, line, pos);
 
610
  }
 
611
  Token new1(int line, int pos)
 
612
  {
 
613
    return new TPackage(line, pos);
 
614
  }
 
615
  Token new2(int line, int pos)
 
616
  {
 
617
    return new TStates(line, pos);
 
618
  }
 
619
  Token new3(int line, int pos)
 
620
  {
 
621
    return new THelpers(line, pos);
 
622
  }
 
623
  Token new4(int line, int pos)
 
624
  {
 
625
    return new TTokens(line, pos);
 
626
  }
 
627
  Token new5(int line, int pos)
 
628
  {
 
629
    return new TIgnored(line, pos);
 
630
  }
 
631
  Token new6(int line, int pos)
 
632
  {
 
633
    return new TProductions(line, pos);
 
634
  }
 
635
  Token new7(int line, int pos)
 
636
  {
 
637
    return new TTokenSpecifier(line, pos);
 
638
  }
 
639
  Token new8(int line, int pos)
 
640
  {
 
641
    return new TProductionSpecifier(line, pos);
 
642
  }
 
643
  Token new9(int line, int pos)
 
644
  {
 
645
    return new TDot(line, pos);
 
646
  }
 
647
  Token new10(int line, int pos)
 
648
  {
 
649
    return new TDDot(line, pos);
 
650
  }
 
651
  Token new11(int line, int pos)
 
652
  {
 
653
    return new TSemicolon(line, pos);
 
654
  }
 
655
  Token new12(int line, int pos)
 
656
  {
 
657
    return new TEqual(line, pos);
 
658
  }
 
659
  Token new13(int line, int pos)
 
660
  {
 
661
    return new TLBkt(line, pos);
 
662
  }
 
663
  Token new14(int line, int pos)
 
664
  {
 
665
    return new TRBkt(line, pos);
 
666
  }
 
667
  Token new15(int line, int pos)
 
668
  {
 
669
    return new TLPar(line, pos);
 
670
  }
 
671
  Token new16(int line, int pos)
 
672
  {
 
673
    return new TRPar(line, pos);
 
674
  }
 
675
  Token new17(int line, int pos)
 
676
  {
 
677
    return new TLBrace(line, pos);
 
678
  }
 
679
  Token new18(int line, int pos)
 
680
  {
 
681
    return new TRBrace(line, pos);
 
682
  }
 
683
  Token new19(int line, int pos)
 
684
  {
 
685
    return new TPlus(line, pos);
 
686
  }
 
687
  Token new20(int line, int pos)
 
688
  {
 
689
    return new TMinus(line, pos);
 
690
  }
 
691
  Token new21(int line, int pos)
 
692
  {
 
693
    return new TQMark(line, pos);
 
694
  }
 
695
  Token new22(int line, int pos)
 
696
  {
 
697
    return new TStar(line, pos);
 
698
  }
 
699
  Token new23(int line, int pos)
 
700
  {
 
701
    return new TBar(line, pos);
 
702
  }
 
703
  Token new24(int line, int pos)
 
704
  {
 
705
    return new TComma(line, pos);
 
706
  }
 
707
  Token new25(int line, int pos)
 
708
  {
 
709
    return new TSlash(line, pos);
 
710
  }
 
711
  Token new26(int line, int pos)
 
712
  {
 
713
    return new TArrow(line, pos);
 
714
  }
 
715
  Token new27(int line, int pos)
 
716
  {
 
717
    return new TColon(line, pos);
 
718
  }
 
719
  Token new28(String text, int line, int pos)
 
720
  {
 
721
    return new TId(text, line, pos);
 
722
  }
 
723
  Token new29(String text, int line, int pos)
 
724
  {
 
725
    return new TChar(text, line, pos);
 
726
  }
 
727
  Token new30(String text, int line, int pos)
 
728
  {
 
729
    return new TDecChar(text, line, pos);
 
730
  }
 
731
  Token new31(String text, int line, int pos)
 
732
  {
 
733
    return new THexChar(text, line, pos);
 
734
  }
 
735
  Token new32(String text, int line, int pos)
 
736
  {
 
737
    return new TString(text, line, pos);
 
738
  }
 
739
  Token new33(String text, int line, int pos)
 
740
  {
 
741
    return new TBlank(text, line, pos);
 
742
  }
 
743
  Token new34(String text, int line, int pos)
 
744
  {
 
745
    return new TComment(text, line, pos);
 
746
  }
 
747
 
 
748
  private int getChar() throws IOException
 
749
  {
 
750
    if(eof)
 
751
    {
 
752
      return -1;
 
753
    }
 
754
 
 
755
    int result = in.read();
 
756
 
 
757
    if(result == -1)
 
758
    {
 
759
      eof = true;
 
760
    }
 
761
 
 
762
    return result;
 
763
  }
 
764
 
 
765
  private void pushBack(int acceptLength) throws IOException
 
766
  {
 
767
    int length = text.length();
 
768
    for(int i = length - 1; i >= acceptLength; i--)
 
769
    {
 
770
      eof = false;
 
771
 
 
772
      in.unread(text.charAt(i));
 
773
    }
 
774
  }
 
775
 
 
776
  protected void unread(Token token) throws IOException
 
777
  {
 
778
    String text = token.getText();
 
779
    int length = text.length();
 
780
 
 
781
    for(int i = length - 1; i >= 0; i--)
 
782
    {
 
783
      eof = false;
 
784
 
 
785
      in.unread(text.charAt(i));
 
786
    }
 
787
 
 
788
    pos = token.getPos() - 1;
 
789
    line = token.getLine() - 1;
 
790
  }
 
791
 
 
792
  private String getText(int acceptLength)
 
793
  {
 
794
    StringBuffer s = new StringBuffer(acceptLength);
 
795
    for(int i = 0; i < acceptLength; i++)
 
796
    {
 
797
      s.append(text.charAt(i));
 
798
    }
 
799
 
 
800
    return s.toString();
 
801
  }
 
802
 
 
803
  private static int[][][][] gotoTable;
 
804
  /*  {
 
805
          { // NORMAL
 
806
              {{4, 4, 1}, {9, 9, 2}, {10, 10, 3}, {13, 13, 4}, {32, 32, 5}, {39, 39, 6}, {40, 40, 7}, {41, 41, 8}, {42, 42, 9}, {43, 43, 10}, {44, 44, 11}, {45, 45, 12}, {46, 46, 13}, {47, 47, 14}, {48, 48, 15}, {49, 57, 16}, {58, 58, 17}, {59, 59, 18}, {61, 61, 19}, {63, 63, 20}, {72, 72, 21}, {73, 73, 22}, {80, 80, 23}, {83, 83, 24}, {84, 84, 25}, {91, 91, 26}, {93, 93, 27}, {97, 122, 28}, {123, 123, 29}, {124, 124, 30}, {125, 125, 31}, },
 
807
              {{4, 32, -2}, },
 
808
              {{4, 32, -2}, },
 
809
              {{4, 32, -2}, },
 
810
              {{4, 9, -2}, {10, 10, 32}, {13, 32, -2}, },
 
811
              {{4, 32, -2}, },
 
812
              {{0, 9, 33}, {11, 12, 33}, {14, 38, 33}, {39, 39, 34}, {40, 65535, 33}, },
 
813
              {},
 
814
              {},
 
815
              {},
 
816
              {},
 
817
              {},
 
818
              {{62, 62, 35}, },
 
819
              {{46, 46, 36}, },
 
820
              {{42, 42, 37}, {47, 47, 38}, },
 
821
              {{48, 57, 16}, {88, 88, 39}, {120, 120, 40}, },
 
822
              {{48, 57, 16}, },
 
823
              {},
 
824
              {},
 
825
              {},
 
826
              {},
 
827
              {{101, 101, 41}, },
 
828
              {{103, 103, 42}, },
 
829
              {{97, 97, 43}, {114, 114, 44}, },
 
830
              {{116, 116, 45}, },
 
831
              {{111, 111, 46}, },
 
832
              {},
 
833
              {},
 
834
              {{48, 57, 47}, {95, 95, 48}, {97, 122, 49}, },
 
835
              {},
 
836
              {},
 
837
              {},
 
838
              {{4, 32, -2}, },
 
839
              {{0, 9, 50}, {11, 12, 50}, {14, 38, 50}, {39, 39, 51}, {40, 65535, 50}, },
 
840
              {{39, 39, 52}, },
 
841
              {},
 
842
              {},
 
843
              {{0, 41, 53}, {42, 42, 54}, {43, 65535, 53}, },
 
844
              {{0, 9, 55}, {10, 10, 56}, {11, 12, 55}, {13, 13, 57}, {14, 65535, 55}, },
 
845
              {{48, 57, 58}, {65, 70, 58}, {97, 102, 58}, },
 
846
              {{48, 102, -41}, },
 
847
              {{108, 108, 59}, },
 
848
              {{110, 110, 60}, },
 
849
              {{99, 99, 61}, },
 
850
              {{111, 111, 62}, },
 
851
              {{97, 97, 63}, },
 
852
              {{107, 107, 64}, },
 
853
              {{48, 122, -30}, },
 
854
              {{97, 122, 65}, },
 
855
              {{48, 122, -30}, },
 
856
              {{0, 38, -35}, {39, 39, 66}, {40, 65535, 50}, },
 
857
              {},
 
858
              {},
 
859
              {{0, 65535, -39}, },
 
860
              {{0, 41, 67}, {42, 42, 54}, {43, 46, 67}, {47, 47, 68}, {48, 65535, 67}, },
 
861
              {{0, 65535, -40}, },
 
862
              {},
 
863
              {{10, 10, 69}, },
 
864
              {{48, 102, -41}, },
 
865
              {{112, 112, 70}, },
 
866
              {{111, 111, 71}, },
 
867
              {{107, 107, 72}, },
 
868
              {{100, 100, 73}, },
 
869
              {{116, 116, 74}, },
 
870
              {{101, 101, 75}, },
 
871
              {{48, 57, 76}, {95, 95, 48}, {97, 122, 77}, },
 
872
              {},
 
873
              {{0, 41, 78}, {42, 42, 79}, {43, 65535, 78}, },
 
874
              {},
 
875
              {},
 
876
              {{101, 101, 80}, },
 
877
              {{114, 114, 81}, },
 
878
              {{97, 97, 82}, },
 
879
              {{117, 117, 83}, },
 
880
              {{101, 101, 84}, },
 
881
              {{110, 110, 85}, },
 
882
              {{48, 122, -67}, },
 
883
              {{48, 122, -67}, },
 
884
              {{0, 65535, -69}, },
 
885
              {{0, 41, 67}, {42, 42, 79}, {43, 65535, -56}, },
 
886
              {{114, 114, 86}, },
 
887
              {{101, 101, 87}, },
 
888
              {{103, 103, 88}, },
 
889
              {{99, 99, 89}, },
 
890
              {{115, 115, 90}, },
 
891
              {{115, 115, 91}, },
 
892
              {{115, 115, 92}, },
 
893
              {{100, 100, 93}, },
 
894
              {{101, 101, 94}, },
 
895
              {{116, 116, 95}, },
 
896
              {},
 
897
              {},
 
898
              {},
 
899
              {},
 
900
              {},
 
901
              {{105, 105, 96}, },
 
902
              {{111, 111, 97}, },
 
903
              {{110, 110, 98}, },
 
904
              {{115, 115, 99}, },
 
905
              {},
 
906
          }
 
907
          { // PACKAGE
 
908
              {{4, 4, 1}, {9, 9, 2}, {10, 10, 3}, {13, 13, 4}, {32, 32, 5}, {36, 36, 6}, {39, 39, 7}, {40, 40, 8}, {41, 41, 9}, {42, 42, 10}, {43, 43, 11}, {44, 44, 12}, {45, 45, 13}, {46, 46, 14}, {47, 47, 15}, {48, 48, 16}, {49, 57, 17}, {58, 58, 18}, {59, 59, 19}, {61, 61, 20}, {63, 63, 21}, {65, 71, 22}, {72, 72, 23}, {73, 73, 24}, {74, 79, 22}, {80, 80, 25}, {81, 82, 22}, {83, 83, 26}, {84, 84, 27}, {85, 90, 22}, {91, 91, 28}, {93, 93, 29}, {95, 95, 30}, {97, 122, 31}, {123, 123, 32}, {124, 124, 33}, {125, 125, 34}, },
 
909
              {{4, 32, -2}, },
 
910
              {{4, 32, -2}, },
 
911
              {{4, 32, -2}, },
 
912
              {{4, 9, -2}, {10, 10, 35}, {13, 32, -2}, },
 
913
              {{4, 32, -2}, },
 
914
              {{36, 36, 36}, {48, 57, 37}, {65, 90, 38}, {95, 95, 39}, {97, 122, 40}, },
 
915
              {{0, 9, 41}, {11, 12, 41}, {14, 38, 41}, {39, 39, 42}, {40, 65535, 41}, },
 
916
              {},
 
917
              {},
 
918
              {},
 
919
              {},
 
920
              {},
 
921
              {{62, 62, 43}, },
 
922
              {{46, 46, 44}, },
 
923
              {{42, 42, 45}, {47, 47, 46}, },
 
924
              {{48, 57, 17}, {88, 88, 47}, {120, 120, 48}, },
 
925
              {{48, 57, 17}, },
 
926
              {},
 
927
              {},
 
928
              {},
 
929
              {},
 
930
              {{36, 122, -8}, },
 
931
              {{36, 95, -8}, {97, 100, 40}, {101, 101, 49}, {102, 122, 40}, },
 
932
              {{36, 95, -8}, {97, 102, 40}, {103, 103, 50}, {104, 122, 40}, },
 
933
              {{36, 95, -8}, {97, 113, 40}, {114, 114, 51}, {115, 122, 40}, },
 
934
              {{36, 95, -8}, {97, 115, 40}, {116, 116, 52}, {117, 122, 40}, },
 
935
              {{36, 95, -8}, {97, 110, 40}, {111, 111, 53}, {112, 122, 40}, },
 
936
              {},
 
937
              {},
 
938
              {{36, 122, -8}, },
 
939
              {{36, 36, 36}, {48, 57, 54}, {65, 90, 38}, {95, 95, 55}, {97, 122, 56}, },
 
940
              {},
 
941
              {},
 
942
              {},
 
943
              {{4, 32, -2}, },
 
944
              {{36, 122, -8}, },
 
945
              {{36, 122, -8}, },
 
946
              {{36, 122, -8}, },
 
947
              {{36, 122, -8}, },
 
948
              {{36, 122, -8}, },
 
949
              {{0, 9, 57}, {11, 12, 57}, {14, 38, 57}, {39, 39, 58}, {40, 65535, 57}, },
 
950
              {{39, 39, 59}, },
 
951
              {},
 
952
              {},
 
953
              {{0, 41, 60}, {42, 42, 61}, {43, 65535, 60}, },
 
954
              {{0, 9, 62}, {10, 10, 63}, {11, 12, 62}, {13, 13, 64}, {14, 65535, 62}, },
 
955
              {{48, 57, 65}, {65, 70, 65}, {97, 102, 65}, },
 
956
              {{48, 102, -49}, },
 
957
              {{36, 95, -8}, {97, 107, 40}, {108, 108, 66}, {109, 122, 40}, },
 
958
              {{36, 95, -8}, {97, 109, 40}, {110, 110, 67}, {111, 122, 40}, },
 
959
              {{36, 110, -29}, {111, 111, 68}, {112, 122, 40}, },
 
960
              {{36, 95, -8}, {97, 97, 69}, {98, 122, 40}, },
 
961
              {{36, 95, -8}, {97, 106, 40}, {107, 107, 70}, {108, 122, 40}, },
 
962
              {{36, 122, -33}, },
 
963
              {{36, 95, -8}, {97, 122, 71}, },
 
964
              {{36, 122, -33}, },
 
965
              {{0, 38, -43}, {39, 39, 72}, {40, 65535, 57}, },
 
966
              {},
 
967
              {},
 
968
              {{0, 65535, -47}, },
 
969
              {{0, 41, 73}, {42, 42, 61}, {43, 46, 73}, {47, 47, 74}, {48, 65535, 73}, },
 
970
              {{0, 65535, -48}, },
 
971
              {},
 
972
              {{10, 10, 75}, },
 
973
              {{48, 102, -49}, },
 
974
              {{36, 95, -8}, {97, 111, 40}, {112, 112, 76}, {113, 122, 40}, },
 
975
              {{36, 110, -29}, {111, 111, 77}, {112, 122, 40}, },
 
976
              {{36, 95, -8}, {97, 99, 40}, {100, 100, 78}, {101, 122, 40}, },
 
977
              {{36, 115, -28}, {116, 116, 79}, {117, 122, 40}, },
 
978
              {{36, 100, -25}, {101, 101, 80}, {102, 122, 40}, },
 
979
              {{36, 36, 36}, {48, 57, 81}, {65, 95, -33}, {97, 122, 82}, },
 
980
              {},
 
981
              {{0, 41, 83}, {42, 42, 84}, {43, 65535, 83}, },
 
982
              {},
 
983
              {},
 
984
              {{36, 100, -25}, {101, 101, 85}, {102, 122, 40}, },
 
985
              {{36, 113, -27}, {114, 114, 86}, {115, 122, 40}, },
 
986
              {{36, 95, -8}, {97, 116, 40}, {117, 117, 87}, {118, 122, 40}, },
 
987
              {{36, 100, -25}, {101, 101, 88}, {102, 122, 40}, },
 
988
              {{36, 109, -52}, {110, 110, 89}, {111, 122, 40}, },
 
989
              {{36, 122, -73}, },
 
990
              {{36, 122, -73}, },
 
991
              {{0, 65535, -75}, },
 
992
              {{0, 41, 73}, {42, 42, 84}, {43, 65535, -63}, },
 
993
              {{36, 113, -27}, {114, 114, 90}, {115, 122, 40}, },
 
994
              {{36, 100, -25}, {101, 101, 91}, {102, 122, 40}, },
 
995
              {{36, 95, -8}, {97, 98, 40}, {99, 99, 92}, {100, 122, 40}, },
 
996
              {{36, 95, -8}, {97, 114, 40}, {115, 115, 93}, {116, 122, 40}, },
 
997
              {{36, 114, -90}, {115, 115, 94}, {116, 122, 40}, },
 
998
              {{36, 114, -90}, {115, 115, 95}, {116, 122, 40}, },
 
999
              {{36, 99, -70}, {100, 100, 96}, {101, 122, 40}, },
 
1000
              {{36, 115, -28}, {116, 116, 97}, {117, 122, 40}, },
 
1001
              {{36, 122, -8}, },
 
1002
              {{36, 122, -8}, },
 
1003
              {{36, 122, -8}, },
 
1004
              {{36, 122, -8}, },
 
1005
              {{36, 95, -8}, {97, 104, 40}, {105, 105, 98}, {106, 122, 40}, },
 
1006
              {{36, 110, -29}, {111, 111, 99}, {112, 122, 40}, },
 
1007
              {{36, 109, -52}, {110, 110, 100}, {111, 122, 40}, },
 
1008
              {{36, 114, -90}, {115, 115, 101}, {116, 122, 40}, },
 
1009
              {{36, 122, -8}, },
 
1010
          }
 
1011
      };*/
 
1012
 
 
1013
  private static int[][] accept;
 
1014
  /*  {
 
1015
          // NORMAL
 
1016
          {-1, 33, 33, 33, 33, 33, -1, 15, 16, 22, 19, 24, 20, 9, 25, 30, 30, 27, 11, 12, 21, -1, -1, 8, -1, 7, 13, 14, 28, 17, 23, 18, 33, -1, -1, 26, 10, -1, 34, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, 28, -1, 29, 29, -1, -1, 34, 34, 34, 31, -1, -1, -1, -1, -1, -1, 28, 32, -1, 34, 34, -1, -1, -1, -1, -1, -1, 28, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 4, 3, 5, 1, -1, -1, -1, -1, 6, },
 
1017
          // PACKAGE
 
1018
          {-1, 33, 33, 33, 33, 33, 0, -1, 15, 16, 22, 19, 24, 20, 9, 25, 30, 30, 27, 11, 12, 21, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 17, 23, 18, 33, 0, 0, 0, 0, 0, -1, -1, 26, 10, -1, 34, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 29, 29, -1, -1, 34, 34, 34, 31, 0, 0, 0, 0, 0, 0, 32, -1, 34, 34, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
 
1019
   
 
1020
      };*/
 
1021
 
 
1022
  public static class State
 
1023
  {
 
1024
    public final static State NORMAL = new State(0);
 
1025
    public final static State PACKAGE = new State(1);
 
1026
 
 
1027
    private int id;
 
1028
 
 
1029
    private State(int id)
 
1030
    {
 
1031
      this.id = id;
 
1032
    }
 
1033
 
 
1034
    public int id()
 
1035
    {
 
1036
      return id;
 
1037
    }
 
1038
  }
704
1039
}