Source code: org/media/datastore/sepengine/parser/sepLexer.java
1 // $ANTLR 2.7.1: "sep.g" -> "sepLexer.java"$
2
3 package org.media.datastore.sepengine.parser;
4
5 import org.media.datastore.sepengine.SepInterpreter;
6 import org.media.datastore.sepengine.util.*;
7 import org.media.datastore.sepengine.RDBInfo;
8 import org.media.datastore.sepengine.LogManager;
9 import org.apache.log.*;
10
11 import java.io.InputStream;
12 import antlr.TokenStreamException;
13 import antlr.TokenStreamIOException;
14 import antlr.TokenStreamRecognitionException;
15 import antlr.CharStreamException;
16 import antlr.CharStreamIOException;
17 import antlr.ANTLRException;
18 import java.io.Reader;
19 import java.util.Hashtable;
20 import antlr.CharScanner;
21 import antlr.InputBuffer;
22 import antlr.ByteBuffer;
23 import antlr.CharBuffer;
24 import antlr.Token;
25 import antlr.CommonToken;
26 import antlr.RecognitionException;
27 import antlr.NoViableAltForCharException;
28 import antlr.MismatchedCharException;
29 import antlr.TokenStream;
30 import antlr.ANTLRHashString;
31 import antlr.LexerSharedInputState;
32 import antlr.collections.impl.BitSet;
33 import antlr.SemanticException;
34
35 /**
36 * The lexer for sep.
37 * This class is automaticaly generated by
38 * <a href="http://www.antlr.org">ANTLR</a>.
39 * @author <a href="mailto:atech@nolimits.ro">Antal Attila</a>
40 * @version $Revision: 1.21 $ $Date: 2002/07/05 19:33:19 $
41 */
42 public class sepLexer extends antlr.CharScanner implements sepTokenTypes, TokenStream
43 {
44
45
46 /* If true, will print debugg information to screen */
47 public static boolean debug = false;
48
49 private String eLine( int lineNo) {
50 int l = lineNo - 1;
51 return sepParser.errorLine + l + "\n";
52 }
53
54 private String eWord( String wrd) {
55 return sepParser.errorWord + "'" + wrd + "' " ;
56 }
57
58 public sepLexer(InputStream in) {
59 this(new ByteBuffer(in));
60 }
61 public sepLexer(Reader in) {
62 this(new CharBuffer(in));
63 }
64 public sepLexer(InputBuffer ib) {
65 this(new LexerSharedInputState(ib));
66 }
67 public sepLexer(LexerSharedInputState state) {
68 super(state);
69 literals = new Hashtable();
70 caseSensitiveLiterals = true;
71 setCaseSensitive(false);
72 }
73
74 public Token nextToken() throws TokenStreamException {
75 Token theRetToken=null;
76 tryAgain:
77 for (;;) {
78 Token _token = null;
79 int _ttype = Token.INVALID_TYPE;
80 setCommitToPath(false);
81 int _m;
82 _m = mark();
83 resetText();
84 try { // for char stream error handling
85 try { // for lexical error handling
86 switch ( LA(1)) {
87 case '>':
88 {
89 mGT(true);
90 theRetToken=_returnToken;
91 break;
92 }
93 case 'f':
94 {
95 mFETCH(true);
96 theRetToken=_returnToken;
97 break;
98 }
99 case 'u':
100 {
101 mUNION(true);
102 theRetToken=_returnToken;
103 break;
104 }
105 case 'i':
106 {
107 mINTERSECT(true);
108 theRetToken=_returnToken;
109 break;
110 }
111 case 'e':
112 {
113 mELEMENT(true);
114 theRetToken=_returnToken;
115 break;
116 }
117 case 'm':
118 {
119 mMAXNUM(true);
120 theRetToken=_returnToken;
121 break;
122 }
123 case 'n':
124 {
125 mNOTIFICATION(true);
126 theRetToken=_returnToken;
127 break;
128 }
129 case '/':
130 {
131 mSL(true);
132 theRetToken=_returnToken;
133 break;
134 }
135 case '=':
136 {
137 mEQ(true);
138 theRetToken=_returnToken;
139 break;
140 }
141 case '"': case '\'':
142 {
143 mSTRING(true);
144 theRetToken=_returnToken;
145 break;
146 }
147 default:
148 if ((LA(1)=='v') && (LA(2)=='a') && (LA(3)=='l') && (LA(4)=='u') && (LA(5)=='e') && (_tokenSet_0.member(LA(6)))) {
149 mXVALUE(true);
150 theRetToken=_returnToken;
151 }
152 else if ((LA(1)=='o') && (LA(2)=='r') && (LA(3)=='d') && (LA(4)=='e') && (LA(5)=='r') && (LA(6)=='i')) {
153 mORDERING(true);
154 theRetToken=_returnToken;
155 }
156 else if ((LA(1)=='v') && (LA(2)=='a') && (LA(3)=='l') && (LA(4)=='u') && (LA(5)=='e') && (true)) {
157 mVALUE(true);
158 theRetToken=_returnToken;
159 }
160 else if ((LA(1)=='o') && (LA(2)=='r') && (LA(3)=='d') && (LA(4)=='e') && (LA(5)=='r') && (true)) {
161 mORDER(true);
162 theRetToken=_returnToken;
163 }
164 else if ((LA(1)=='r') && (LA(2)=='e') && (LA(3)=='q') && (LA(4)=='u')) {
165 mREQUEST(true);
166 theRetToken=_returnToken;
167 }
168 else if ((LA(1)=='r') && (LA(2)=='e') && (LA(3)=='q') && (LA(4)=='n')) {
169 mREQNO(true);
170 theRetToken=_returnToken;
171 }
172 else if ((LA(1)=='r') && (LA(2)=='e') && (LA(3)=='l')) {
173 mRELATED(true);
174 theRetToken=_returnToken;
175 }
176 else if ((LA(1)=='p') && (LA(2)=='r') && (LA(3)=='e')) {
177 mPREVSTAMP(true);
178 theRetToken=_returnToken;
179 }
180 else if ((LA(1)=='p') && (LA(2)=='r') && (LA(3)=='o')) {
181 mPROPERTY(true);
182 theRetToken=_returnToken;
183 }
184 else if ((LA(1)=='<') && (LA(2)=='/')) {
185 mET(true);
186 theRetToken=_returnToken;
187 }
188 else if ((LA(1)=='c') && (LA(2)=='o')) {
189 mCOMPARE(true);
190 theRetToken=_returnToken;
191 }
192 else if ((LA(1)=='p') && (LA(2)=='a')) {
193 mPATH(true);
194 theRetToken=_returnToken;
195 }
196 else if ((LA(1)=='s') && (LA(2)=='t')) {
197 mSTORE(true);
198 theRetToken=_returnToken;
199 }
200 else if ((LA(1)=='o') && (LA(2)=='f')) {
201 mOFFSET(true);
202 theRetToken=_returnToken;
203 }
204 else if ((LA(1)=='s') && (LA(2)=='u')) {
205 mSUBTREE(true);
206 theRetToken=_returnToken;
207 }
208 else if ((LA(1)=='o') && (LA(2)=='p')) {
209 mOPERATOR(true);
210 theRetToken=_returnToken;
211 }
212 else if ((LA(1)=='c') && (LA(2)=='a')) {
213 mCASESENSITIVE(true);
214 theRetToken=_returnToken;
215 }
216 else if ((LA(1)=='a') && (LA(2)=='p')) {
217 mAPPROXIMATE(true);
218 theRetToken=_returnToken;
219 }
220 else if ((LA(1)=='a') && (LA(2)=='t')) {
221 mATTRIBUTE(true);
222 theRetToken=_returnToken;
223 }
224 else if ((LA(1)=='a') && (LA(2)=='c')) {
225 mACTION(true);
226 theRetToken=_returnToken;
227 }
228 else if ((LA(1)=='<') && (true)) {
229 mLT(true);
230 theRetToken=_returnToken;
231 }
232 else {
233 if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
234 else {
235 commit();
236 try {mWS(false);}
237 catch(RecognitionException e) {
238 // catastrophic failure
239 reportError(e);
240 consume();
241 }
242 continue tryAgain;
243 }
244 }
245 }
246 commit();
247 if ( _returnToken==null ) continue tryAgain; // found SKIP token
248 _ttype = _returnToken.getType();
249 _ttype = testLiteralsTable(_ttype);
250 _returnToken.setType(_ttype);
251 return _returnToken;
252 }
253 catch (RecognitionException e) {
254 if ( !getCommitToPath() ) {
255 rewind(_m);
256 resetText();
257 try {mWS(false);}
258 catch(RecognitionException ee) {
259 // horrendous failure: error in filter rule
260 reportError(ee);
261 consume();
262 }
263 continue tryAgain;
264 }
265 throw new TokenStreamRecognitionException(e);
266 }
267 }
268 catch (CharStreamException cse) {
269 if ( cse instanceof CharStreamIOException ) {
270 throw new TokenStreamIOException(((CharStreamIOException)cse).io);
271 }
272 else {
273 throw new TokenStreamException(cse.getMessage());
274 }
275 }
276 }
277 }
278
279 public final void mXVALUE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
280 int _ttype; Token _token=null; int _begin=text.length();
281 _ttype = XVALUE;
282 int _saveIndex;
283
284 try { // for error handling
285 mVALUE(false);
286 {
287 switch ( LA(1)) {
288 case '\t': case '\n': case '\r': case ' ':
289 {
290 mWS(false);
291 break;
292 }
293 case '>':
294 {
295 break;
296 }
297 default:
298 {
299 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
300 }
301 }
302 }
303 mGT(false);
304 {
305 _loop70:
306 do {
307 // nongreedy exit test
308 if ((LA(1)=='<') && (LA(2)=='/') && (LA(3)=='v') && (LA(4)=='a') && (LA(5)=='l') && (LA(6)=='u')) break _loop70;
309 if (((LA(1) >= '\u0003' && LA(1) <= '\u00ff')) && ((LA(2) >= '\u0003' && LA(2) <= '\u00ff')) && ((LA(3) >= '\u0003' && LA(3) <= '\u00ff')) && ((LA(4) >= '\u0003' && LA(4) <= '\u00ff')) && ((LA(5) >= '\u0003' && LA(5) <= '\u00ff')) && ((LA(6) >= '\u0003' && LA(6) <= '\u00ff'))) {
310 matchNot(EOF_CHAR);
311 }
312 else {
313 break _loop70;
314 }
315
316 } while (true);
317 }
318
319 String gtx = new String(text.getBuffer(),_begin,text.length()-_begin);
320 String val = gtx.substring( gtx.indexOf(">")+1 );
321 if (debug) System.out.print(val);
322 CommonToken t = new CommonToken(XVALUE,val);
323 _token = t;
324
325 mET(false);
326 mVALUE(false);
327 {
328 if ((_tokenSet_1.member(LA(1)))) {
329 mWS(false);
330 }
331 else {
332 }
333
334 }
335 }
336 catch (RecognitionException e) {
337 throw new TokenStreamException( eLine(e.getLine())+ "ERROR in value element: " + e.getMessage() );
338 }
339 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
340 _token = makeToken(_ttype);
341 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
342 }
343 _returnToken = _token;
344 }
345
346 public final void mVALUE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
347 int _ttype; Token _token=null; int _begin=text.length();
348 _ttype = VALUE;
349 int _saveIndex;
350
351 try { // for error handling
352 match("value");
353 if (debug) System.out.print( "value");
354 }
355 catch (RecognitionException e) {
356 throw new TokenStreamException( eLine(e.getLine()) + eWord("value") + e.getMessage() );
357 }
358 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
359 _token = makeToken(_ttype);
360 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
361 }
362 _returnToken = _token;
363 }
364
365 protected final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
366 int _ttype; Token _token=null; int _begin=text.length();
367 _ttype = WS;
368 int _saveIndex;
369
370 try { // for error handling
371 {
372 int _cnt110=0;
373 _loop110:
374 do {
375 switch ( LA(1)) {
376 case ' ':
377 {
378 match(' ');
379 break;
380 }
381 case '\t':
382 {
383 match('\t');
384 break;
385 }
386 case '\n':
387 {
388 match('\n');
389 newline();
390 break;
391 }
392 default:
393 if ((LA(1)=='\r') && (LA(2)=='\n') && (true) && (true) && (true) && (true)) {
394 match("\r\n");
395 newline();
396 }
397 else if ((LA(1)=='\r') && (true) && (true) && (true) && (true) && (true)) {
398 match('\r');
399 newline();
400 }
401 else {
402 if ( _cnt110>=1 ) { break _loop110; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());}
403 }
404 }
405 _cnt110++;
406 } while (true);
407 }
408 _ttype = Token.SKIP;
409 }
410 catch (RecognitionException e) {
411 throw new TokenStreamException( eLine(e.getLine()) + e.getMessage() );
412 }
413 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
414 _token = makeToken(_ttype);
415 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
416 }
417 _returnToken = _token;
418 }
419
420 public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
421 int _ttype; Token _token=null; int _begin=text.length();
422 _ttype = GT;
423 int _saveIndex;
424
425 match('>');
426 if (debug) System.out.print(">");
427 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
428 _token = makeToken(_ttype);
429 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
430 }
431 _returnToken = _token;
432 }
433
434 public final void mET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
435 int _ttype; Token _token=null; int _begin=text.length();
436 _ttype = ET;
437 int _saveIndex;
438
439 mLT(false);
440 mSL(false);
441 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
442 _token = makeToken(_ttype);
443 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
444 }
445 _returnToken = _token;
446 }
447
448 public final void mREQUEST(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
449 int _ttype; Token _token=null; int _begin=text.length();
450 _ttype = REQUEST;
451 int _saveIndex;
452
453 try { // for error handling
454 match("request");
455 if (debug) System.out.print( "request");
456 }
457 catch (RecognitionException e) {
458 throw new TokenStreamException( eLine(e.getLine()) + eWord("request") + e.getMessage() );
459 }
460 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
461 _token = makeToken(_ttype);
462 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
463 }
464 _returnToken = _token;
465 }
466
467 public final void mFETCH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
468 int _ttype; Token _token=null; int _begin=text.length();
469 _ttype = FETCH;
470 int _saveIndex;
471
472 try { // for error handling
473 match("fetch");
474 if (debug) System.out.print( "fetch");
475 }
476 catch (RecognitionException e) {
477 throw new TokenStreamException( eLine(e.getLine()) + eWord("fetch") + e.getMessage() );
478 }
479 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
480 _token = makeToken(_ttype);
481 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
482 }
483 _returnToken = _token;
484 }
485
486 public final void mORDERING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
487 int _ttype; Token _token=null; int _begin=text.length();
488 _ttype = ORDERING;
489 int _saveIndex;
490
491 try { // for error handling
492 match("ordering");
493 if (debug) System.out.print( "ordering");
494 }
495 catch (RecognitionException e) {
496 throw new TokenStreamException( eLine(e.getLine()) + eWord("ordering") + e.getMessage() );
497 }
498 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
499 _token = makeToken(_ttype);
500 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
501 }
502 _returnToken = _token;
503 }
504
505 public final void mUNION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
506 int _ttype; Token _token=null; int _begin=text.length();
507 _ttype = UNION;
508 int _saveIndex;
509
510 try { // for error handling
511 match("union");
512 if (debug) System.out.print( "union");
513 }
514 catch (RecognitionException e) {
515 throw new TokenStreamException( eLine(e.getLine()) + eWord("union") + e.getMessage() );
516 }
517 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
518 _token = makeToken(_ttype);
519 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
520 }
521 _returnToken = _token;
522 }
523
524 public final void mINTERSECT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
525 int _ttype; Token _token=null; int _begin=text.length();
526 _ttype = INTERSECT;
527 int _saveIndex;
528
529 try { // for error handling
530 match("intersect");
531 if (debug) System.out.print( "intersect");
532 }
533 catch (RecognitionException e) {
534 throw new TokenStreamException( eLine(e.getLine()) + eWord("intersect") + e.getMessage() );
535 }
536 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
537 _token = makeToken(_ttype);
538 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
539 }
540 _returnToken = _token;
541 }
542
543 public final void mCOMPARE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
544 int _ttype; Token _token=null; int _begin=text.length();
545 _ttype = COMPARE;
546 int _saveIndex;
547
548 try { // for error handling
549 match("compare");
550 if (debug) System.out.print( "compare");
551 }
552 catch (RecognitionException e) {
553 throw new TokenStreamException( eLine(e.getLine()) + eWord("compare") + e.getMessage() );
554 }
555 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
556 _token = makeToken(_ttype);
557 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
558 }
559 _returnToken = _token;
560 }
561
562 public final void mPATH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
563 int _ttype; Token _token=null; int _begin=text.length();
564 _ttype = PATH;
565 int _saveIndex;
566
567 try { // for error handling
568 match("path");
569 if (debug) System.out.print( "path");
570 }
571 catch (RecognitionException e) {
572 throw new TokenStreamException( eLine(e.getLine()) + eWord("path") + e.getMessage() );
573 }
574 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
575 _token = makeToken(_ttype);
576 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
577 }
578 _returnToken = _token;
579 }
580
581 public final void mELEMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
582 int _ttype; Token _token=null; int _begin=text.length();
583 _ttype = ELEMENT;
584 int _saveIndex;
585
586 try { // for error handling
587 match("element");
588 if (debug) System.out.print( "element");
589 }
590 catch (RecognitionException e) {
591 throw new TokenStreamException( eLine(e.getLine()) + eWord("element") + e.getMessage() );
592 }
593 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
594 _token = makeToken(_ttype);
595 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
596 }
597 _returnToken = _token;
598 }
599
600 public final void mSTORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
601 int _ttype; Token _token=null; int _begin=text.length();
602 _ttype = STORE;
603 int _saveIndex;
604
605 try { // for error handling
606 match("store");
607 if (debug) System.out.print( "store");
608 }
609 catch (RecognitionException e) {
610 throw new TokenStreamException( eLine(e.getLine()) + eWord("store") + e.getMessage() );
611 }
612 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
613 _token = makeToken(_ttype);
614 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
615 }
616 _returnToken = _token;
617 }
618
619 public final void mREQNO(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
620 int _ttype; Token _token=null; int _begin=text.length();
621 _ttype = REQNO;
622 int _saveIndex;
623
624 try { // for error handling
625 match("reqno");
626 if (debug) System.out.print( " reqno");
627 }
628 catch (RecognitionException e) {
629 throw new TokenStreamException( eLine(e.getLine()) + eWord("reqno") + e.getMessage() );
630 }
631 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
632 _token = makeToken(_ttype);
633 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
634 }
635 _returnToken = _token;
636 }
637
638 public final void mRELATED(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
639 int _ttype; Token _token=null; int _begin=text.length();
640 _ttype = RELATED;
641 int _saveIndex;
642
643 try { // for error handling
644 match("related");
645 if (debug) System.out.print( " related");
646 }
647 catch (RecognitionException e) {
648 throw new TokenStreamException( eLine(e.getLine()) + eWord("related") + e.getMessage() );
649 }
650 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
651 _token = makeToken(_ttype);
652 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
653 }
654 _returnToken = _token;
655 }
656
657 public final void mOFFSET(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
658 int _ttype; Token _token=null; int _begin=text.length();
659 _ttype = OFFSET;
660 int _saveIndex;
661
662 try { // for error handling
663 match("offset");
664 if (debug) System.out.print( " offset");
665 }
666 catch (RecognitionException e) {
667 throw new TokenStreamException( eLine(e.getLine()) + eWord("offset") + e.getMessage() );
668 }
669 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
670 _token = makeToken(_ttype);
671 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
672 }
673 _returnToken = _token;
674 }
675
676 public final void mMAXNUM(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
677 int _ttype; Token _token=null; int _begin=text.length();
678 _ttype = MAXNUM;
679 int _saveIndex;
680
681 try { // for error handling
682 match("maxnum");
683 if (debug) System.out.print( " maxnum");
684 }
685 catch (RecognitionException e) {
686 throw new TokenStreamException( eLine(e.getLine()) + eWord("maxnum") + e.getMessage() );
687 }
688 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
689 _token = makeToken(_ttype);
690 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
691 }
692 _returnToken = _token;
693 }
694
695 public final void mNOTIFICATION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
696 int _ttype; Token _token=null; int _begin=text.length();
697 _ttype = NOTIFICATION;
698 int _saveIndex;
699
700 try { // for error handling
701 match("notification");
702 if (debug) System.out.print(" notificaton");
703 }
704 catch (RecognitionException e) {
705 throw new TokenStreamException( eLine(e.getLine()) + eWord("notification") + e.getMessage() );
706 }
707 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
708 _token = makeToken(_ttype);
709 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
710 }
711 _returnToken = _token;
712 }
713
714 public final void mPREVSTAMP(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
715 int _ttype; Token _token=null; int _begin=text.length();
716 _ttype = PREVSTAMP;
717 int _saveIndex;
718
719 try { // for error handling
720 match("prevstamp");
721 if (debug) System.out.print( " prevstamp");
722 }
723 catch (RecognitionException e) {
724 throw new TokenStreamException( eLine(e.getLine()) + eWord("prevstamp") + e.getMessage() );
725 }
726 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
727 _token = makeToken(_ttype);
728 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
729 }
730 _returnToken = _token;
731 }
732
733 public final void mSUBTREE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
734 int _ttype; Token _token=null; int _begin=text.length();
735 _ttype = SUBTREE;
736 int _saveIndex;
737
738 try { // for error handling
739 match("subtree");
740 if (debug) System.out.print( " subtree");
741 }
742 catch (RecognitionException e) {
743 throw new TokenStreamException( eLine(e.getLine()) + eWord("subtree") + e.getMessage() );
744 }
745 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
746 _token = makeToken(_ttype);
747 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
748 }
749 _returnToken = _token;
750 }
751
752 public final void mOPERATOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
753 int _ttype; Token _token=null; int _begin=text.length();
754 _ttype = OPERATOR;
755 int _saveIndex;
756
757 try { // for error handling
758 match("operator");
759 if (debug) System.out.print( " operator");
760 }
761 catch (RecognitionException e) {
762 throw new TokenStreamException( eLine(e.getLine()) + eWord("operator") + e.getMessage() );
763 }
764 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
765 _token = makeToken(_ttype);
766 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
767 }
768 _returnToken = _token;
769 }
770
771 public final void mCASESENSITIVE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
772 int _ttype; Token _token=null; int _begin=text.length();
773 _ttype = CASESENSITIVE;
774 int _saveIndex;
775
776 try { // for error handling
777 match("casesensitive");
778 if (debug) System.out.print( " casesensitive");
779 }
780 catch (RecognitionException e) {
781 throw new TokenStreamException( eLine(e.getLine()) + eWord("casesensitive") + e.getMessage() );
782 }
783 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
784 _token = makeToken(_ttype);
785 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
786 }
787 _returnToken = _token;
788 }
789
790 public final void mAPPROXIMATE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
791 int _ttype; Token _token=null; int _begin=text.length();
792 _ttype = APPROXIMATE;
793 int _saveIndex;
794
795 try { // for error handling
796 match("approximate");
797 if (debug) System.out.print( " approximate");
798 }
799 catch (RecognitionException e) {
800 throw new TokenStreamException( eLine(e.getLine()) + eWord("approximate") + e.getMessage() );
801 }
802 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
803 _token = makeToken(_ttype);
804 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
805 }
806 _returnToken = _token;
807 }
808
809 public final void mATTRIBUTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
810 int _ttype; Token _token=null; int _begin=text.length();
811 _ttype = ATTRIBUTE;
812 int _saveIndex;
813
814 try { // for error handling
815 match("attribute");
816 if (debug) System.out.print( " attribute");
817 }
818 catch (RecognitionException e) {
819 throw new TokenStreamException( eLine(e.getLine()) + eWord("attribute") + e.getMessage() );
820 }
821 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
822 _token = makeToken(_ttype);
823 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
824 }
825 _returnToken = _token;
826 }
827
828 public final void mORDER(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
829 int _ttype; Token _token=null; int _begin=text.length();
830 _ttype = ORDER;
831 int _saveIndex;
832
833 try { // for error handling
834 match("order");
835 if (debug) System.out.print( " order");
836 }
837 catch (RecognitionException e) {
838 throw new TokenStreamException( eLine(e.getLine()) + eWord("order") + e.getMessage() );
839 }
840 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
841 _token = makeToken(_ttype);
842 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
843 }
844 _returnToken = _token;
845 }
846
847 public final void mPROPERTY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
848 int _ttype; Token _token=null; int _begin=text.length();
849 _ttype = PROPERTY;
850 int _saveIndex;
851
852 try { // for error handling
853 match("property");
854 if (debug) System.out.print( " property");
855 }
856 catch (RecognitionException e) {
857 throw new TokenStreamException( eLine(e.getLine()) + eWord("property") + e.getMessage() );
858 }
859 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
860 _token = makeToken(_ttype);
861 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
862 }
863 _returnToken = _token;
864 }
865
866 public final void mACTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
867 int _ttype; Token _token=null; int _begin=text.length();
868 _ttype = ACTION;
869 int _saveIndex;
870
871 try { // for error handling
872 match("action");
873 if (debug) System.out.print( " action");
874 }
875 catch (RecognitionException e) {
876 throw new TokenStreamException( eLine(e.getLine()) + eWord("action") + e.getMessage() );
877 }
878 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
879 _token = makeToken(_ttype);
880 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
881 }
882 _returnToken = _token;
883 }
884
885 public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
886 int _ttype; Token _token=null; int _begin=text.length();
887 _ttype = LT;
888 int _saveIndex;
889
890 match('<');
891 if (debug) System.out.print("<");
892 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
893 _token = makeToken(_ttype);
894 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
895 }
896 _returnToken = _token;
897 }
898
899 public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
900 int _ttype; Token _token=null; int _begin=text.length();
901 _ttype = SL;
902 int _saveIndex;
903
904 match("/");
905 if (debug) System.out.print("/");
906 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
907 _token = makeToken(_ttype);
908 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
909 }
910 _returnToken = _token;
911 }
912
913 public final void mEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
914 int _ttype; Token _token=null; int _begin=text.length();
915 _ttype = EQ;
916 int _saveIndex;
917
918 match("=");
919 if (debug) System.out.print("=");
920 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
921 _token = makeToken(_ttype);
922 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
923 }
924 _returnToken = _token;
925 }
926
927 public final void mSTRING(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
928 int _ttype; Token _token=null; int _begin=text.length();
929 _ttype = STRING;
930 int _saveIndex;
931 char a = '\0';
932 char b = '\0';
933
934 try { // for error handling
935 switch ( LA(1)) {
936 case '\'':
937 {
938 match('\'');
939 if (debug) System.out.print("'" );
940 {
941 _loop104:
942 do {
943 if ((_tokenSet_2.member(LA(1)))) {
944 {
945 a = LA(1);
946 match(_tokenSet_2);
947 }
948 if (debug) System.out.print( a );
949 }
950 else {
951 break _loop104;
952 }
953
954 } while (true);
955 }
956 match('\'');
957 if (debug) System.out.print("'" );
958 break;
959 }
960 case '"':
961 {
962 match('"');
963 if (debug) System.out.print("\"");
964 {
965 _loop107:
966 do {
967 if ((_tokenSet_3.member(LA(1)))) {
968 {
969 b = LA(1);
970 match(_tokenSet_3);
971 }
972 if (debug) System.out.print( b );
973 }
974 else {
975 break _loop107;
976 }
977
978 } while (true);
979 }
980 match('"');
981 if (debug) System.out.print("\"");
982 break;
983 }
984 default:
985 {
986 throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine());
987 }
988 }
989 }
990 catch (RecognitionException e) {
991 throw new TokenStreamException( eLine(e.getLine()) + sepParser.missingAp );
992 }
993 if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
994 _token = makeToken(_ttype);
995 _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
996 }
997 _returnToken = _token;
998 }
999
1000
1001 private static final long _tokenSet_0_data_[] = { 4611686022722364928L, 0L, 0L, 0L, 0L };
1002 public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
1003 private static final long _tokenSet_1_data_[] = { 4294977024L, 0L, 0L, 0L, 0L };
1004 public static final BitSet _tokenSet_1 = new BitSet(_tokenSet_1_data_);
1005 private static final long _tokenSet_2_data_[] = { -5764608072790048776L, -1L, -1L, -1L, 0L, 0L, 0L, 0L };
1006 public static final BitSet _tokenSet_2 = new BitSet(_tokenSet_2_data_);
1007 private static final long _tokenSet_3_data_[] = { -5764607540214104072L, -1L, -1L, -1L, 0L, 0L, 0L, 0L };
1008 public static final BitSet _tokenSet_3 = new BitSet(_tokenSet_3_data_);
1009
1010 }