2 ===================================================================
3 --- a/src/java/net/sf/jabref/bst/BstParser.java (revision 2214)
4 +++ b/src/java/net/sf/jabref/bst/BstParser.java (working copy)
6 package net.sf.jabref.bst;
8 -// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
9 +// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:10
11 +import org.antlr.runtime.*;
12 +import java.util.Stack;
13 +import java.util.List;
14 import java.util.ArrayList;
15 -import java.util.List;
17 -import org.antlr.runtime.BitSet;
18 -import org.antlr.runtime.EarlyExitException;
19 -import org.antlr.runtime.NoViableAltException;
20 -import org.antlr.runtime.Parser;
21 -import org.antlr.runtime.ParserRuleReturnScope;
22 -import org.antlr.runtime.RecognitionException;
23 -import org.antlr.runtime.Token;
24 -import org.antlr.runtime.TokenStream;
25 -import org.antlr.runtime.tree.CommonTreeAdaptor;
26 -import org.antlr.runtime.tree.TreeAdaptor;
28 -@SuppressWarnings({"unused", "unchecked"})
29 +import org.antlr.runtime.tree.*;
31 public class BstParser extends Parser {
32 public static final String[] tokenNames = new String[] {
33 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "IDLIST", "STACK", "ENTRY", "COMMANDS", "STRINGS", "INTEGERS", "FUNCTION", "MACRO", "STRING", "READ", "EXECUTE", "ITERATE", "REVERSE", "SORT", "IDENTIFIER", "INTEGER", "QUOTED", "LETTER", "NUMERAL", "WS", "LINE_COMMENT", "'{'", "'}'", "'<'", "'>'", "'='", "'+'", "'-'", "':='", "'*'"
35 + public static final int INTEGER=19;
36 + public static final int FUNCTION=10;
37 + public static final int T__29=29;
38 + public static final int T__28=28;
39 + public static final int T__27=27;
40 + public static final int T__26=26;
41 + public static final int LINE_COMMENT=24;
42 + public static final int QUOTED=20;
43 + public static final int T__25=25;
44 public static final int LETTER=21;
45 + public static final int EXECUTE=14;
46 + public static final int STRINGS=8;
47 + public static final int SORT=17;
48 public static final int ENTRY=6;
49 + public static final int EOF=-1;
50 public static final int INTEGERS=9;
51 + public static final int T__30=30;
52 + public static final int ITERATE=15;
53 + public static final int T__31=31;
54 + public static final int T__32=32;
55 public static final int WS=23;
56 + public static final int T__33=33;
57 public static final int COMMANDS=7;
58 - public static final int STRING=12;
59 - public static final int EXECUTE=14;
60 - public static final int LINE_COMMENT=24;
61 - public static final int SORT=17;
62 + public static final int READ=13;
63 + public static final int IDENTIFIER=18;
64 + public static final int IDLIST=4;
65 + public static final int NUMERAL=22;
66 public static final int STACK=5;
67 public static final int REVERSE=16;
68 - public static final int QUOTED=20;
69 - public static final int INTEGER=19;
70 - public static final int ITERATE=15;
71 - public static final int FUNCTION=10;
72 - public static final int EOF=-1;
73 - public static final int STRINGS=8;
74 - public static final int IDENTIFIER=18;
75 public static final int MACRO=11;
76 - public static final int IDLIST=4;
77 - public static final int NUMERAL=22;
78 - public static final int READ=13;
79 + public static final int STRING=12;
85 public BstParser(TokenStream input) {
87 + this(input, new RecognizerSharedState());
89 + public BstParser(TokenStream input, RecognizerSharedState state) {
90 + super(input, state);
94 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
100 - public String[] getTokenNames() { return tokenNames; }
101 + public String[] getTokenNames() { return BstParser.tokenNames; }
102 public String getGrammarFileName() { return "Bst.g"; }
105 public static class program_return extends ParserRuleReturnScope {
107 public Object getTree() { return tree; }
111 - // $ANTLR start program
112 + // $ANTLR start "program"
113 // Bst.g:14:1: program : ( commands )+ -> ^( COMMANDS ( commands )+ ) ;
114 - public program_return program() throws RecognitionException {
115 - program_return retval = new program_return();
116 + public final BstParser.program_return program() throws RecognitionException {
117 + BstParser.program_return retval = new BstParser.program_return();
118 retval.start = input.LT(1);
120 Object root_0 = null;
122 - commands_return commands1 = null;
123 + BstParser.commands_return commands1 = null;
125 - List list_commands=new ArrayList();
127 + RewriteRuleSubtreeStream stream_commands=new RewriteRuleSubtreeStream(adaptor,"rule commands");
129 - // Bst.g:14:11: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
130 + // Bst.g:14:9: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
131 // Bst.g:14:11: ( commands )+
133 // Bst.g:14:11: ( commands )+
137 int LA1_0 = input.LA(1);
139 if ( (LA1_0==ENTRY||(LA1_0>=STRINGS && LA1_0<=MACRO)||(LA1_0>=READ && LA1_0<=SORT)) ) {
144 pushFollow(FOLLOW_commands_in_program45);
145 commands1=commands();
148 - list_commands.add(commands1.tree);
151 + stream_commands.add(commands1.getTree());
156 @@ -116,65 +128,69 @@
164 + // elements: commands
166 + // rule labels: retval
167 + // token list labels:
168 + // rule list labels:
169 + // wildcard labels:
170 retval.tree = root_0;
171 - root_0 = adaptor.nil();
172 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
174 + root_0 = (Object)adaptor.nil();
175 // 14:21: -> ^( COMMANDS ( commands )+ )
177 // Bst.g:14:24: ^( COMMANDS ( commands )+ )
179 - Object root_1 = adaptor.nil();
180 - root_1 = adaptor.becomeRoot(adaptor.create(COMMANDS, "COMMANDS"), root_1);
181 + Object root_1 = (Object)adaptor.nil();
182 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(COMMANDS, "COMMANDS"), root_1);
184 - // Bst.g:14:35: ( commands )+
186 - int n_1 = list_commands == null ? 0 : list_commands.size();
188 + if ( !(stream_commands.hasNext()) ) {
189 + throw new RewriteEarlyExitException();
191 + while ( stream_commands.hasNext() ) {
192 + adaptor.addChild(root_1, stream_commands.nextTree());
195 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
196 - for (int i_1=0; i_1<n_1; i_1++) {
197 - adaptor.addChild(root_1, list_commands.get(i_1));
201 + stream_commands.reset();
203 adaptor.addChild(root_0, root_1);
208 + retval.tree = root_0;
211 + retval.stop = input.LT(-1);
214 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
215 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
218 catch (RecognitionException re) {
221 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
225 - retval.stop = input.LT(-1);
227 - retval.tree = adaptor.rulePostProcessing(root_0);
228 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
234 - // $ANTLR end program
235 + // $ANTLR end "program"
237 public static class commands_return extends ParserRuleReturnScope {
239 public Object getTree() { return tree; }
243 - // $ANTLR start commands
244 - // Bst.g:16:1: commands : ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ );
245 - public commands_return commands() throws RecognitionException {
246 - commands_return retval = new commands_return();
247 + // $ANTLR start "commands"
248 + // Bst.g:16:1: commands : ( STRINGS idList | INTEGERS idList | FUNCTION id stack | MACRO id '{' STRING '}' | READ | EXECUTE '{' function '}' | ITERATE '{' function '}' | REVERSE '{' function '}' | ENTRY idList0 idList0 idList0 | SORT );
249 + public final BstParser.commands_return commands() throws RecognitionException {
250 + BstParser.commands_return retval = new BstParser.commands_return();
251 retval.start = input.LT(1);
253 Object root_0 = null;
254 @@ -198,27 +214,27 @@
255 Token char_literal26=null;
258 - idList_return idList3 = null;
259 + BstParser.idList_return idList3 = null;
261 - idList_return idList5 = null;
262 + BstParser.idList_return idList5 = null;
264 - id_return id7 = null;
265 + BstParser.id_return id7 = null;
267 - stack_return stack8 = null;
268 + BstParser.stack_return stack8 = null;
270 - id_return id10 = null;
271 + BstParser.id_return id10 = null;
273 - function_return function17 = null;
274 + BstParser.function_return function17 = null;
276 - function_return function21 = null;
277 + BstParser.function_return function21 = null;
279 - function_return function25 = null;
280 + BstParser.function_return function25 = null;
282 - idList0_return idList028 = null;
283 + BstParser.idList0_return idList028 = null;
285 - idList0_return idList029 = null;
286 + BstParser.idList0_return idList029 = null;
288 - idList0_return idList030 = null;
289 + BstParser.idList0_return idList030 = null;
292 Object STRINGS2_tree=null;
293 @@ -242,280 +258,294 @@
294 Object SORT31_tree=null;
297 - // Bst.g:17:4: ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ )
298 + // Bst.g:17:2: ( STRINGS idList | INTEGERS idList | FUNCTION id stack | MACRO id '{' STRING '}' | READ | EXECUTE '{' function '}' | ITERATE '{' function '}' | REVERSE '{' function '}' | ENTRY idList0 idList0 idList0 | SORT )
300 switch ( input.LA(1) ) {
352 NoViableAltException nvae =
353 - new NoViableAltException("16:1: commands : ( STRINGS^^ idList | INTEGERS^^ idList | FUNCTION^^ id stack | MACRO^^ id '{'! STRING '}'! | READ^^ | EXECUTE^^ '{'! function '}'! | ITERATE^^ '{'! function '}'! | REVERSE^^ '{'! function '}'! | ENTRY^^ idList0 idList0 idList0 | SORT^^ );", 2, 0, input);
354 + new NoViableAltException("", 2, 0, input);
361 - // Bst.g:17:4: STRINGS^^ idList
362 + // Bst.g:17:4: STRINGS idList
364 - root_0 = adaptor.nil();
365 + root_0 = (Object)adaptor.nil();
367 - STRINGS2=input.LT(1);
368 - match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
369 - STRINGS2_tree = adaptor.create(STRINGS2);
370 - root_0 = adaptor.becomeRoot(STRINGS2_tree, root_0);
371 + STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
372 + STRINGS2_tree = (Object)adaptor.create(STRINGS2);
373 + root_0 = (Object)adaptor.becomeRoot(STRINGS2_tree, root_0);
375 pushFollow(FOLLOW_idList_in_commands68);
379 - adaptor.addChild(root_0, idList3.tree);
382 + adaptor.addChild(root_0, idList3.getTree());
387 - // Bst.g:18:4: INTEGERS^^ idList
388 + // Bst.g:18:4: INTEGERS idList
390 - root_0 = adaptor.nil();
391 + root_0 = (Object)adaptor.nil();
393 - INTEGERS4=input.LT(1);
394 - match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
395 - INTEGERS4_tree = adaptor.create(INTEGERS4);
396 - root_0 = adaptor.becomeRoot(INTEGERS4_tree, root_0);
397 + INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
398 + INTEGERS4_tree = (Object)adaptor.create(INTEGERS4);
399 + root_0 = (Object)adaptor.becomeRoot(INTEGERS4_tree, root_0);
401 pushFollow(FOLLOW_idList_in_commands76);
405 - adaptor.addChild(root_0, idList5.tree);
408 + adaptor.addChild(root_0, idList5.getTree());
413 - // Bst.g:19:4: FUNCTION^^ id stack
414 + // Bst.g:19:4: FUNCTION id stack
416 - root_0 = adaptor.nil();
417 + root_0 = (Object)adaptor.nil();
419 - FUNCTION6=input.LT(1);
420 - match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
421 - FUNCTION6_tree = adaptor.create(FUNCTION6);
422 - root_0 = adaptor.becomeRoot(FUNCTION6_tree, root_0);
423 + FUNCTION6=(Token)match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
424 + FUNCTION6_tree = (Object)adaptor.create(FUNCTION6);
425 + root_0 = (Object)adaptor.becomeRoot(FUNCTION6_tree, root_0);
427 pushFollow(FOLLOW_id_in_commands84);
431 - adaptor.addChild(root_0, id7.tree);
434 + adaptor.addChild(root_0, id7.getTree());
435 pushFollow(FOLLOW_stack_in_commands86);
439 - adaptor.addChild(root_0, stack8.tree);
442 + adaptor.addChild(root_0, stack8.getTree());
447 - // Bst.g:20:4: MACRO^^ id '{'! STRING '}'!
448 + // Bst.g:20:4: MACRO id '{' STRING '}'
450 - root_0 = adaptor.nil();
451 + root_0 = (Object)adaptor.nil();
453 - MACRO9=input.LT(1);
454 - match(input,MACRO,FOLLOW_MACRO_in_commands91);
455 - MACRO9_tree = adaptor.create(MACRO9);
456 - root_0 = adaptor.becomeRoot(MACRO9_tree, root_0);
457 + MACRO9=(Token)match(input,MACRO,FOLLOW_MACRO_in_commands91);
458 + MACRO9_tree = (Object)adaptor.create(MACRO9);
459 + root_0 = (Object)adaptor.becomeRoot(MACRO9_tree, root_0);
461 pushFollow(FOLLOW_id_in_commands94);
465 - adaptor.addChild(root_0, id10.tree);
466 - char_literal11=input.LT(1);
467 - match(input,25,FOLLOW_25_in_commands96);
468 - STRING12=input.LT(1);
469 - match(input,STRING,FOLLOW_STRING_in_commands99);
470 - STRING12_tree = adaptor.create(STRING12);
473 + adaptor.addChild(root_0, id10.getTree());
474 + char_literal11=(Token)match(input,25,FOLLOW_25_in_commands96);
475 + STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands99);
476 + STRING12_tree = (Object)adaptor.create(STRING12);
477 adaptor.addChild(root_0, STRING12_tree);
479 - char_literal13=input.LT(1);
480 - match(input,26,FOLLOW_26_in_commands101);
481 + char_literal13=(Token)match(input,26,FOLLOW_26_in_commands101);
486 - // Bst.g:21:4: READ^^
487 + // Bst.g:21:4: READ
489 - root_0 = adaptor.nil();
490 + root_0 = (Object)adaptor.nil();
492 - READ14=input.LT(1);
493 - match(input,READ,FOLLOW_READ_in_commands107);
494 - READ14_tree = adaptor.create(READ14);
495 - root_0 = adaptor.becomeRoot(READ14_tree, root_0);
496 + READ14=(Token)match(input,READ,FOLLOW_READ_in_commands107);
497 + READ14_tree = (Object)adaptor.create(READ14);
498 + root_0 = (Object)adaptor.becomeRoot(READ14_tree, root_0);
504 - // Bst.g:22:4: EXECUTE^^ '{'! function '}'!
505 + // Bst.g:22:4: EXECUTE '{' function '}'
507 - root_0 = adaptor.nil();
508 + root_0 = (Object)adaptor.nil();
510 - EXECUTE15=input.LT(1);
511 - match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
512 - EXECUTE15_tree = adaptor.create(EXECUTE15);
513 - root_0 = adaptor.becomeRoot(EXECUTE15_tree, root_0);
514 + EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
515 + EXECUTE15_tree = (Object)adaptor.create(EXECUTE15);
516 + root_0 = (Object)adaptor.becomeRoot(EXECUTE15_tree, root_0);
518 - char_literal16=input.LT(1);
519 - match(input,25,FOLLOW_25_in_commands116);
520 + char_literal16=(Token)match(input,25,FOLLOW_25_in_commands116);
521 pushFollow(FOLLOW_function_in_commands119);
522 function17=function();
525 - adaptor.addChild(root_0, function17.tree);
526 - char_literal18=input.LT(1);
527 - match(input,26,FOLLOW_26_in_commands121);
530 + adaptor.addChild(root_0, function17.getTree());
531 + char_literal18=(Token)match(input,26,FOLLOW_26_in_commands121);
536 - // Bst.g:23:4: ITERATE^^ '{'! function '}'!
537 + // Bst.g:23:4: ITERATE '{' function '}'
539 - root_0 = adaptor.nil();
540 + root_0 = (Object)adaptor.nil();
542 - ITERATE19=input.LT(1);
543 - match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
544 - ITERATE19_tree = adaptor.create(ITERATE19);
545 - root_0 = adaptor.becomeRoot(ITERATE19_tree, root_0);
546 + ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
547 + ITERATE19_tree = (Object)adaptor.create(ITERATE19);
548 + root_0 = (Object)adaptor.becomeRoot(ITERATE19_tree, root_0);
550 - char_literal20=input.LT(1);
551 - match(input,25,FOLLOW_25_in_commands130);
552 + char_literal20=(Token)match(input,25,FOLLOW_25_in_commands130);
553 pushFollow(FOLLOW_function_in_commands133);
554 function21=function();
557 - adaptor.addChild(root_0, function21.tree);
558 - char_literal22=input.LT(1);
559 - match(input,26,FOLLOW_26_in_commands135);
562 + adaptor.addChild(root_0, function21.getTree());
563 + char_literal22=(Token)match(input,26,FOLLOW_26_in_commands135);
568 - // Bst.g:24:4: REVERSE^^ '{'! function '}'!
569 + // Bst.g:24:4: REVERSE '{' function '}'
571 - root_0 = adaptor.nil();
572 + root_0 = (Object)adaptor.nil();
574 - REVERSE23=input.LT(1);
575 - match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
576 - REVERSE23_tree = adaptor.create(REVERSE23);
577 - root_0 = adaptor.becomeRoot(REVERSE23_tree, root_0);
578 + REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
579 + REVERSE23_tree = (Object)adaptor.create(REVERSE23);
580 + root_0 = (Object)adaptor.becomeRoot(REVERSE23_tree, root_0);
582 - char_literal24=input.LT(1);
583 - match(input,25,FOLLOW_25_in_commands144);
584 + char_literal24=(Token)match(input,25,FOLLOW_25_in_commands144);
585 pushFollow(FOLLOW_function_in_commands147);
586 function25=function();
589 - adaptor.addChild(root_0, function25.tree);
590 - char_literal26=input.LT(1);
591 - match(input,26,FOLLOW_26_in_commands149);
594 + adaptor.addChild(root_0, function25.getTree());
595 + char_literal26=(Token)match(input,26,FOLLOW_26_in_commands149);
600 - // Bst.g:25:4: ENTRY^^ idList0 idList0 idList0
601 + // Bst.g:25:4: ENTRY idList0 idList0 idList0
603 - root_0 = adaptor.nil();
604 + root_0 = (Object)adaptor.nil();
606 - ENTRY27=input.LT(1);
607 - match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
608 - ENTRY27_tree = adaptor.create(ENTRY27);
609 - root_0 = adaptor.becomeRoot(ENTRY27_tree, root_0);
610 + ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
611 + ENTRY27_tree = (Object)adaptor.create(ENTRY27);
612 + root_0 = (Object)adaptor.becomeRoot(ENTRY27_tree, root_0);
614 pushFollow(FOLLOW_idList0_in_commands158);
618 - adaptor.addChild(root_0, idList028.tree);
621 + adaptor.addChild(root_0, idList028.getTree());
622 pushFollow(FOLLOW_idList0_in_commands160);
626 - adaptor.addChild(root_0, idList029.tree);
629 + adaptor.addChild(root_0, idList029.getTree());
630 pushFollow(FOLLOW_idList0_in_commands162);
634 - adaptor.addChild(root_0, idList030.tree);
637 + adaptor.addChild(root_0, idList030.getTree());
642 - // Bst.g:26:4: SORT^^
643 + // Bst.g:26:4: SORT
645 - root_0 = adaptor.nil();
646 + root_0 = (Object)adaptor.nil();
648 - SORT31=input.LT(1);
649 - match(input,SORT,FOLLOW_SORT_in_commands167);
650 - SORT31_tree = adaptor.create(SORT31);
651 - root_0 = adaptor.becomeRoot(SORT31_tree, root_0);
652 + SORT31=(Token)match(input,SORT,FOLLOW_SORT_in_commands167);
653 + SORT31_tree = (Object)adaptor.create(SORT31);
654 + root_0 = (Object)adaptor.becomeRoot(SORT31_tree, root_0);
661 + retval.stop = input.LT(-1);
663 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
664 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
667 catch (RecognitionException re) {
670 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
674 - retval.stop = input.LT(-1);
676 - retval.tree = adaptor.rulePostProcessing(root_0);
677 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
683 - // $ANTLR end commands
684 + // $ANTLR end "commands"
686 public static class identifier_return extends ParserRuleReturnScope {
688 public Object getTree() { return tree; }
692 - // $ANTLR start identifier
693 + // $ANTLR start "identifier"
694 // Bst.g:28:1: identifier : IDENTIFIER ;
695 - public identifier_return identifier() throws RecognitionException {
696 - identifier_return retval = new identifier_return();
697 + public final BstParser.identifier_return identifier() throws RecognitionException {
698 + BstParser.identifier_return retval = new BstParser.identifier_return();
699 retval.start = input.LT(1);
701 Object root_0 = null;
702 @@ -525,121 +555,121 @@
703 Object IDENTIFIER32_tree=null;
706 - // Bst.g:29:4: ( IDENTIFIER )
707 + // Bst.g:29:2: ( IDENTIFIER )
708 // Bst.g:29:4: IDENTIFIER
710 - root_0 = adaptor.nil();
711 + root_0 = (Object)adaptor.nil();
713 - IDENTIFIER32=input.LT(1);
714 - match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
715 - IDENTIFIER32_tree = adaptor.create(IDENTIFIER32);
716 + IDENTIFIER32=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
717 + IDENTIFIER32_tree = (Object)adaptor.create(IDENTIFIER32);
718 adaptor.addChild(root_0, IDENTIFIER32_tree);
723 + retval.stop = input.LT(-1);
725 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
726 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
729 catch (RecognitionException re) {
732 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
736 - retval.stop = input.LT(-1);
738 - retval.tree = adaptor.rulePostProcessing(root_0);
739 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
745 - // $ANTLR end identifier
746 + // $ANTLR end "identifier"
748 public static class id_return extends ParserRuleReturnScope {
750 public Object getTree() { return tree; }
755 - // Bst.g:31:1: id : '{'! identifier '}'! ;
756 - public id_return id() throws RecognitionException {
757 - id_return retval = new id_return();
758 + // $ANTLR start "id"
759 + // Bst.g:31:1: id : '{' identifier '}' ;
760 + public final BstParser.id_return id() throws RecognitionException {
761 + BstParser.id_return retval = new BstParser.id_return();
762 retval.start = input.LT(1);
764 Object root_0 = null;
766 Token char_literal33=null;
767 Token char_literal35=null;
768 - identifier_return identifier34 = null;
769 + BstParser.identifier_return identifier34 = null;
772 Object char_literal33_tree=null;
773 Object char_literal35_tree=null;
776 - // Bst.g:32:4: ( '{'! identifier '}'! )
777 - // Bst.g:32:4: '{'! identifier '}'!
778 + // Bst.g:32:2: ( '{' identifier '}' )
779 + // Bst.g:32:4: '{' identifier '}'
781 - root_0 = adaptor.nil();
782 + root_0 = (Object)adaptor.nil();
784 - char_literal33=input.LT(1);
785 - match(input,25,FOLLOW_25_in_id188);
786 + char_literal33=(Token)match(input,25,FOLLOW_25_in_id188);
787 pushFollow(FOLLOW_identifier_in_id191);
788 identifier34=identifier();
791 - adaptor.addChild(root_0, identifier34.tree);
792 - char_literal35=input.LT(1);
793 - match(input,26,FOLLOW_26_in_id193);
796 + adaptor.addChild(root_0, identifier34.getTree());
797 + char_literal35=(Token)match(input,26,FOLLOW_26_in_id193);
801 + retval.stop = input.LT(-1);
803 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
804 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
807 catch (RecognitionException re) {
810 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
814 - retval.stop = input.LT(-1);
816 - retval.tree = adaptor.rulePostProcessing(root_0);
817 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
826 public static class idList_return extends ParserRuleReturnScope {
828 public Object getTree() { return tree; }
832 - // $ANTLR start idList
833 + // $ANTLR start "idList"
834 // Bst.g:34:1: idList : '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) ;
836 - public idList_return idList() throws RecognitionException {
837 - idList_return retval = new idList_return();
838 + public final BstParser.idList_return idList() throws RecognitionException {
839 + BstParser.idList_return retval = new BstParser.idList_return();
840 retval.start = input.LT(1);
842 Object root_0 = null;
844 Token char_literal36=null;
845 Token char_literal38=null;
846 - identifier_return identifier37 = null;
847 + BstParser.identifier_return identifier37 = null;
849 - List list_identifier=new ArrayList();
850 - List list_26=new ArrayList();
851 - List list_25=new ArrayList();
853 Object char_literal36_tree=null;
854 Object char_literal38_tree=null;
856 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
857 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
858 + RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
860 - // Bst.g:35:4: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
861 + // Bst.g:35:2: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
862 // Bst.g:35:4: '{' ( identifier )+ '}'
864 - char_literal36=input.LT(1);
865 - match(input,25,FOLLOW_25_in_idList205);
866 - list_25.add(char_literal36);
867 + char_literal36=(Token)match(input,25,FOLLOW_25_in_idList205);
868 + stream_25.add(char_literal36);
870 // Bst.g:35:8: ( identifier )+
875 int LA3_0 = input.LA(1);
877 if ( (LA3_0==IDENTIFIER) ) {
880 @@ -658,10 +689,11 @@
882 pushFollow(FOLLOW_identifier_in_idList207);
883 identifier37=identifier();
886 - list_identifier.add(identifier37.tree);
889 + stream_identifier.add(identifier37.getTree());
894 @@ -674,96 +706,100 @@
898 - char_literal38=input.LT(1);
899 - match(input,26,FOLLOW_26_in_idList210);
900 - list_26.add(char_literal38);
901 + char_literal38=(Token)match(input,26,FOLLOW_26_in_idList210);
902 + stream_26.add(char_literal38);
908 + // elements: identifier
910 + // rule labels: retval
911 + // token list labels:
912 + // rule list labels:
913 + // wildcard labels:
914 retval.tree = root_0;
915 - root_0 = adaptor.nil();
916 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
918 + root_0 = (Object)adaptor.nil();
919 // 35:24: -> ^( IDLIST ( identifier )+ )
921 // Bst.g:35:27: ^( IDLIST ( identifier )+ )
923 - Object root_1 = adaptor.nil();
924 - root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
925 + Object root_1 = (Object)adaptor.nil();
926 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
928 - // Bst.g:35:36: ( identifier )+
930 - int n_1 = list_identifier == null ? 0 : list_identifier.size();
932 + if ( !(stream_identifier.hasNext()) ) {
933 + throw new RewriteEarlyExitException();
935 + while ( stream_identifier.hasNext() ) {
936 + adaptor.addChild(root_1, stream_identifier.nextTree());
939 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
940 - for (int i_1=0; i_1<n_1; i_1++) {
941 - adaptor.addChild(root_1, list_identifier.get(i_1));
945 + stream_identifier.reset();
947 adaptor.addChild(root_0, root_1);
952 + retval.tree = root_0;
955 + retval.stop = input.LT(-1);
958 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
959 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
962 catch (RecognitionException re) {
965 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
969 - retval.stop = input.LT(-1);
971 - retval.tree = adaptor.rulePostProcessing(root_0);
972 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
978 - // $ANTLR end idList
979 + // $ANTLR end "idList"
981 public static class idList0_return extends ParserRuleReturnScope {
983 public Object getTree() { return tree; }
987 - // $ANTLR start idList0
988 + // $ANTLR start "idList0"
989 // Bst.g:37:1: idList0 : '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) ;
990 - public idList0_return idList0() throws RecognitionException {
991 - idList0_return retval = new idList0_return();
992 + public final BstParser.idList0_return idList0() throws RecognitionException {
993 + BstParser.idList0_return retval = new BstParser.idList0_return();
994 retval.start = input.LT(1);
996 Object root_0 = null;
998 Token char_literal39=null;
999 Token char_literal41=null;
1000 - identifier_return identifier40 = null;
1001 + BstParser.identifier_return identifier40 = null;
1003 - List list_identifier=new ArrayList();
1004 - List list_26=new ArrayList();
1005 - List list_25=new ArrayList();
1007 Object char_literal39_tree=null;
1008 Object char_literal41_tree=null;
1010 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
1011 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
1012 + RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
1014 - // Bst.g:38:4: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
1015 + // Bst.g:38:2: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
1016 // Bst.g:38:4: '{' ( identifier )* '}'
1018 - char_literal39=input.LT(1);
1019 - match(input,25,FOLLOW_25_in_idList0230);
1020 - list_25.add(char_literal39);
1021 + char_literal39=(Token)match(input,25,FOLLOW_25_in_idList0230);
1022 + stream_25.add(char_literal39);
1024 // Bst.g:38:8: ( identifier )*
1028 int LA4_0 = input.LA(1);
1030 if ( (LA4_0==IDENTIFIER) ) {
1033 @@ -775,10 +811,11 @@
1035 pushFollow(FOLLOW_identifier_in_idList0232);
1036 identifier40=identifier();
1039 - list_identifier.add(identifier40.tree);
1042 + stream_identifier.add(identifier40.getTree());
1047 @@ -787,68 +824,71 @@
1051 - char_literal41=input.LT(1);
1052 - match(input,26,FOLLOW_26_in_idList0235);
1053 - list_26.add(char_literal41);
1054 + char_literal41=(Token)match(input,26,FOLLOW_26_in_idList0235);
1055 + stream_26.add(char_literal41);
1061 + // elements: identifier
1063 + // rule labels: retval
1064 + // token list labels:
1065 + // rule list labels:
1066 + // wildcard labels:
1067 retval.tree = root_0;
1068 - root_0 = adaptor.nil();
1069 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1071 + root_0 = (Object)adaptor.nil();
1072 // 38:24: -> ^( IDLIST ( identifier )* )
1074 // Bst.g:38:27: ^( IDLIST ( identifier )* )
1076 - Object root_1 = adaptor.nil();
1077 - root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
1078 + Object root_1 = (Object)adaptor.nil();
1079 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
1081 // Bst.g:38:36: ( identifier )*
1083 - int n_1 = list_identifier == null ? 0 : list_identifier.size();
1085 + while ( stream_identifier.hasNext() ) {
1086 + adaptor.addChild(root_1, stream_identifier.nextTree());
1089 - for (int i_1=0; i_1<n_1; i_1++) {
1090 - adaptor.addChild(root_1, list_identifier.get(i_1));
1094 + stream_identifier.reset();
1096 adaptor.addChild(root_0, root_1);
1101 + retval.tree = root_0;
1104 + retval.stop = input.LT(-1);
1107 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1108 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1111 catch (RecognitionException re) {
1114 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1118 - retval.stop = input.LT(-1);
1120 - retval.tree = adaptor.rulePostProcessing(root_0);
1121 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1127 - // $ANTLR end idList0
1128 + // $ANTLR end "idList0"
1130 public static class function_return extends ParserRuleReturnScope {
1132 public Object getTree() { return tree; }
1136 - // $ANTLR start function
1137 + // $ANTLR start "function"
1138 // Bst.g:40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );
1139 - public function_return function() throws RecognitionException {
1140 - function_return retval = new function_return();
1141 + public final BstParser.function_return function() throws RecognitionException {
1142 + BstParser.function_return retval = new BstParser.function_return();
1143 retval.start = input.LT(1);
1145 Object root_0 = null;
1147 Token char_literal46=null;
1148 Token string_literal47=null;
1149 Token char_literal48=null;
1150 - identifier_return identifier49 = null;
1151 + BstParser.identifier_return identifier49 = null;
1154 Object char_literal42_tree=null;
1155 @@ -872,36 +912,52 @@
1156 Object char_literal48_tree=null;
1159 - // Bst.g:41:4: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
1160 + // Bst.g:41:2: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
1162 switch ( input.LA(1) ) {
1204 NoViableAltException nvae =
1205 - new NoViableAltException("40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );", 5, 0, input);
1206 + new NoViableAltException("", 5, 0, input);
1210 @@ -910,11 +966,10 @@
1214 - root_0 = adaptor.nil();
1215 + root_0 = (Object)adaptor.nil();
1217 - char_literal42=input.LT(1);
1218 - match(input,27,FOLLOW_27_in_function254);
1219 - char_literal42_tree = adaptor.create(char_literal42);
1220 + char_literal42=(Token)match(input,27,FOLLOW_27_in_function254);
1221 + char_literal42_tree = (Object)adaptor.create(char_literal42);
1222 adaptor.addChild(root_0, char_literal42_tree);
1225 @@ -923,11 +978,10 @@
1229 - root_0 = adaptor.nil();
1230 + root_0 = (Object)adaptor.nil();
1232 - char_literal43=input.LT(1);
1233 - match(input,28,FOLLOW_28_in_function258);
1234 - char_literal43_tree = adaptor.create(char_literal43);
1235 + char_literal43=(Token)match(input,28,FOLLOW_28_in_function258);
1236 + char_literal43_tree = (Object)adaptor.create(char_literal43);
1237 adaptor.addChild(root_0, char_literal43_tree);
1240 @@ -936,11 +990,10 @@
1244 - root_0 = adaptor.nil();
1245 + root_0 = (Object)adaptor.nil();
1247 - char_literal44=input.LT(1);
1248 - match(input,29,FOLLOW_29_in_function262);
1249 - char_literal44_tree = adaptor.create(char_literal44);
1250 + char_literal44=(Token)match(input,29,FOLLOW_29_in_function262);
1251 + char_literal44_tree = (Object)adaptor.create(char_literal44);
1252 adaptor.addChild(root_0, char_literal44_tree);
1255 @@ -949,11 +1002,10 @@
1259 - root_0 = adaptor.nil();
1260 + root_0 = (Object)adaptor.nil();
1262 - char_literal45=input.LT(1);
1263 - match(input,30,FOLLOW_30_in_function266);
1264 - char_literal45_tree = adaptor.create(char_literal45);
1265 + char_literal45=(Token)match(input,30,FOLLOW_30_in_function266);
1266 + char_literal45_tree = (Object)adaptor.create(char_literal45);
1267 adaptor.addChild(root_0, char_literal45_tree);
1270 @@ -962,11 +1014,10 @@
1274 - root_0 = adaptor.nil();
1275 + root_0 = (Object)adaptor.nil();
1277 - char_literal46=input.LT(1);
1278 - match(input,31,FOLLOW_31_in_function270);
1279 - char_literal46_tree = adaptor.create(char_literal46);
1280 + char_literal46=(Token)match(input,31,FOLLOW_31_in_function270);
1281 + char_literal46_tree = (Object)adaptor.create(char_literal46);
1282 adaptor.addChild(root_0, char_literal46_tree);
1285 @@ -975,11 +1026,10 @@
1287 // Bst.g:41:34: ':='
1289 - root_0 = adaptor.nil();
1290 + root_0 = (Object)adaptor.nil();
1292 - string_literal47=input.LT(1);
1293 - match(input,32,FOLLOW_32_in_function274);
1294 - string_literal47_tree = adaptor.create(string_literal47);
1295 + string_literal47=(Token)match(input,32,FOLLOW_32_in_function274);
1296 + string_literal47_tree = (Object)adaptor.create(string_literal47);
1297 adaptor.addChild(root_0, string_literal47_tree);
1300 @@ -988,11 +1038,10 @@
1304 - root_0 = adaptor.nil();
1305 + root_0 = (Object)adaptor.nil();
1307 - char_literal48=input.LT(1);
1308 - match(input,33,FOLLOW_33_in_function278);
1309 - char_literal48_tree = adaptor.create(char_literal48);
1310 + char_literal48=(Token)match(input,33,FOLLOW_33_in_function278);
1311 + char_literal48_tree = (Object)adaptor.create(char_literal48);
1312 adaptor.addChild(root_0, char_literal48_tree);
1315 @@ -1001,64 +1050,66 @@
1317 // Bst.g:41:47: identifier
1319 - root_0 = adaptor.nil();
1320 + root_0 = (Object)adaptor.nil();
1322 pushFollow(FOLLOW_identifier_in_function282);
1323 identifier49=identifier();
1326 - adaptor.addChild(root_0, identifier49.tree);
1329 + adaptor.addChild(root_0, identifier49.getTree());
1335 + retval.stop = input.LT(-1);
1337 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1338 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1341 catch (RecognitionException re) {
1344 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1348 - retval.stop = input.LT(-1);
1350 - retval.tree = adaptor.rulePostProcessing(root_0);
1351 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1357 - // $ANTLR end function
1358 + // $ANTLR end "function"
1360 public static class stack_return extends ParserRuleReturnScope {
1362 public Object getTree() { return tree; }
1366 - // $ANTLR start stack
1367 + // $ANTLR start "stack"
1368 // Bst.g:43:1: stack : '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) ;
1369 - public stack_return stack() throws RecognitionException {
1370 - stack_return retval = new stack_return();
1371 + public final BstParser.stack_return stack() throws RecognitionException {
1372 + BstParser.stack_return retval = new BstParser.stack_return();
1373 retval.start = input.LT(1);
1375 Object root_0 = null;
1377 Token char_literal50=null;
1378 Token char_literal52=null;
1379 - stackitem_return stackitem51 = null;
1380 + BstParser.stackitem_return stackitem51 = null;
1382 - List list_stackitem=new ArrayList();
1383 - List list_26=new ArrayList();
1384 - List list_25=new ArrayList();
1386 Object char_literal50_tree=null;
1387 Object char_literal52_tree=null;
1389 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
1390 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
1391 + RewriteRuleSubtreeStream stream_stackitem=new RewriteRuleSubtreeStream(adaptor,"rule stackitem");
1393 - // Bst.g:44:4: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
1394 + // Bst.g:44:2: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
1395 // Bst.g:44:4: '{' ( stackitem )+ '}'
1397 - char_literal50=input.LT(1);
1398 - match(input,25,FOLLOW_25_in_stack293);
1399 - list_25.add(char_literal50);
1400 + char_literal50=(Token)match(input,25,FOLLOW_25_in_stack293);
1401 + stream_25.add(char_literal50);
1403 // Bst.g:44:8: ( stackitem )+
1405 @@ -1066,6 +1117,7 @@
1408 int LA6_0 = input.LA(1);
1410 if ( (LA6_0==STRING||(LA6_0>=IDENTIFIER && LA6_0<=QUOTED)||LA6_0==25||(LA6_0>=27 && LA6_0<=33)) ) {
1413 @@ -1077,10 +1129,11 @@
1415 pushFollow(FOLLOW_stackitem_in_stack295);
1416 stackitem51=stackitem();
1419 - list_stackitem.add(stackitem51.tree);
1422 + stream_stackitem.add(stackitem51.getTree());
1427 @@ -1093,69 +1146,73 @@
1431 - char_literal52=input.LT(1);
1432 - match(input,26,FOLLOW_26_in_stack298);
1433 - list_26.add(char_literal52);
1434 + char_literal52=(Token)match(input,26,FOLLOW_26_in_stack298);
1435 + stream_26.add(char_literal52);
1441 + // elements: stackitem
1443 + // rule labels: retval
1444 + // token list labels:
1445 + // rule list labels:
1446 + // wildcard labels:
1447 retval.tree = root_0;
1448 - root_0 = adaptor.nil();
1449 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1451 + root_0 = (Object)adaptor.nil();
1452 // 44:23: -> ^( STACK ( stackitem )+ )
1454 // Bst.g:44:26: ^( STACK ( stackitem )+ )
1456 - Object root_1 = adaptor.nil();
1457 - root_1 = adaptor.becomeRoot(adaptor.create(STACK, "STACK"), root_1);
1458 + Object root_1 = (Object)adaptor.nil();
1459 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(STACK, "STACK"), root_1);
1461 - // Bst.g:44:34: ( stackitem )+
1463 - int n_1 = list_stackitem == null ? 0 : list_stackitem.size();
1465 + if ( !(stream_stackitem.hasNext()) ) {
1466 + throw new RewriteEarlyExitException();
1468 + while ( stream_stackitem.hasNext() ) {
1469 + adaptor.addChild(root_1, stream_stackitem.nextTree());
1472 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
1473 - for (int i_1=0; i_1<n_1; i_1++) {
1474 - adaptor.addChild(root_1, list_stackitem.get(i_1));
1478 + stream_stackitem.reset();
1480 adaptor.addChild(root_0, root_1);
1485 + retval.tree = root_0;
1488 + retval.stop = input.LT(-1);
1491 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1492 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1495 catch (RecognitionException re) {
1498 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1502 - retval.stop = input.LT(-1);
1504 - retval.tree = adaptor.rulePostProcessing(root_0);
1505 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1511 - // $ANTLR end stack
1512 + // $ANTLR end "stack"
1514 public static class stackitem_return extends ParserRuleReturnScope {
1516 public Object getTree() { return tree; }
1520 - // $ANTLR start stackitem
1521 + // $ANTLR start "stackitem"
1522 // Bst.g:46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );
1523 - public stackitem_return stackitem() throws RecognitionException {
1524 - stackitem_return retval = new stackitem_return();
1525 + public final BstParser.stackitem_return stackitem() throws RecognitionException {
1526 + BstParser.stackitem_return retval = new BstParser.stackitem_return();
1527 retval.start = input.LT(1);
1529 Object root_0 = null;
1530 @@ -1163,9 +1220,9 @@
1531 Token STRING54=null;
1532 Token INTEGER55=null;
1533 Token QUOTED56=null;
1534 - function_return function53 = null;
1535 + BstParser.function_return function53 = null;
1537 - stack_return stack57 = null;
1538 + BstParser.stack_return stack57 = null;
1541 Object STRING54_tree=null;
1542 @@ -1173,7 +1230,7 @@
1543 Object QUOTED56_tree=null;
1546 - // Bst.g:47:4: ( function | STRING | INTEGER | QUOTED | stack )
1547 + // Bst.g:47:2: ( function | STRING | INTEGER | QUOTED | stack )
1549 switch ( input.LA(1) ) {
1551 @@ -1184,23 +1241,33 @@
1580 NoViableAltException nvae =
1581 - new NoViableAltException("46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );", 7, 0, input);
1582 + new NoViableAltException("", 7, 0, input);
1586 @@ -1209,24 +1276,24 @@
1588 // Bst.g:47:4: function
1590 - root_0 = adaptor.nil();
1591 + root_0 = (Object)adaptor.nil();
1593 pushFollow(FOLLOW_function_in_stackitem317);
1594 function53=function();
1597 - adaptor.addChild(root_0, function53.tree);
1600 + adaptor.addChild(root_0, function53.getTree());
1605 // Bst.g:48:4: STRING
1607 - root_0 = adaptor.nil();
1608 + root_0 = (Object)adaptor.nil();
1610 - STRING54=input.LT(1);
1611 - match(input,STRING,FOLLOW_STRING_in_stackitem322);
1612 - STRING54_tree = adaptor.create(STRING54);
1613 + STRING54=(Token)match(input,STRING,FOLLOW_STRING_in_stackitem322);
1614 + STRING54_tree = (Object)adaptor.create(STRING54);
1615 adaptor.addChild(root_0, STRING54_tree);
1618 @@ -1235,11 +1302,10 @@
1620 // Bst.g:49:4: INTEGER
1622 - root_0 = adaptor.nil();
1623 + root_0 = (Object)adaptor.nil();
1625 - INTEGER55=input.LT(1);
1626 - match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
1627 - INTEGER55_tree = adaptor.create(INTEGER55);
1628 + INTEGER55=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
1629 + INTEGER55_tree = (Object)adaptor.create(INTEGER55);
1630 adaptor.addChild(root_0, INTEGER55_tree);
1633 @@ -1248,11 +1314,10 @@
1635 // Bst.g:50:4: QUOTED
1637 - root_0 = adaptor.nil();
1638 + root_0 = (Object)adaptor.nil();
1640 - QUOTED56=input.LT(1);
1641 - match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
1642 - QUOTED56_tree = adaptor.create(QUOTED56);
1643 + QUOTED56=(Token)match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
1644 + QUOTED56_tree = (Object)adaptor.create(QUOTED56);
1645 adaptor.addChild(root_0, QUOTED56_tree);
1648 @@ -1261,35 +1326,40 @@
1650 // Bst.g:51:4: stack
1652 - root_0 = adaptor.nil();
1653 + root_0 = (Object)adaptor.nil();
1655 pushFollow(FOLLOW_stack_in_stackitem339);
1659 - adaptor.addChild(root_0, stack57.tree);
1662 + adaptor.addChild(root_0, stack57.getTree());
1668 + retval.stop = input.LT(-1);
1670 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1671 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1674 catch (RecognitionException re) {
1677 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1681 - retval.stop = input.LT(-1);
1683 - retval.tree = adaptor.rulePostProcessing(root_0);
1684 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1690 - // $ANTLR end stackitem
1691 + // $ANTLR end "stackitem"
1693 + // Delegated rules
1698 public static final BitSet FOLLOW_commands_in_program45 = new BitSet(new long[]{0x000000000003EF42L});
1699 @@ -1324,14 +1394,14 @@
1700 public static final BitSet FOLLOW_idList0_in_commands162 = new BitSet(new long[]{0x0000000000000002L});
1701 public static final BitSet FOLLOW_SORT_in_commands167 = new BitSet(new long[]{0x0000000000000002L});
1702 public static final BitSet FOLLOW_IDENTIFIER_in_identifier178 = new BitSet(new long[]{0x0000000000000002L});
1703 - public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x0000000000040000L});
1704 + public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x00000003F8040000L});
1705 public static final BitSet FOLLOW_identifier_in_id191 = new BitSet(new long[]{0x0000000004000000L});
1706 public static final BitSet FOLLOW_26_in_id193 = new BitSet(new long[]{0x0000000000000002L});
1707 - public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x0000000000040000L});
1708 - public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x0000000004040000L});
1709 + public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x00000003F8040000L});
1710 + public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x00000003FC040000L});
1711 public static final BitSet FOLLOW_26_in_idList210 = new BitSet(new long[]{0x0000000000000002L});
1712 - public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x0000000004040000L});
1713 - public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x0000000004040000L});
1714 + public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x00000003FC040000L});
1715 + public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x00000003FC040000L});
1716 public static final BitSet FOLLOW_26_in_idList0235 = new BitSet(new long[]{0x0000000000000002L});
1717 public static final BitSet FOLLOW_27_in_function254 = new BitSet(new long[]{0x0000000000000002L});
1718 public static final BitSet FOLLOW_28_in_function258 = new BitSet(new long[]{0x0000000000000002L});
1719 @@ -1350,4 +1420,4 @@
1720 public static final BitSet FOLLOW_QUOTED_in_stackitem334 = new BitSet(new long[]{0x0000000000000002L});
1721 public static final BitSet FOLLOW_stack_in_stackitem339 = new BitSet(new long[]{0x0000000000000002L});
1724 \ No newline at end of file
1726 Index: BstLexer.java
1727 ===================================================================
1728 --- a/src/java/net/sf/jabref/bst/BstLexer.java (revision 2214)
1729 +++ b/src/java/net/sf/jabref/bst/BstLexer.java (working copy)
1731 package net.sf.jabref.bst;
1733 -// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
1734 +// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:11
1736 -import org.antlr.runtime.CharStream;
1737 -import org.antlr.runtime.EarlyExitException;
1738 -import org.antlr.runtime.Lexer;
1739 -import org.antlr.runtime.MismatchedSetException;
1740 -import org.antlr.runtime.NoViableAltException;
1741 -import org.antlr.runtime.RecognitionException;
1742 -import org.antlr.runtime.Token;
1743 +import org.antlr.runtime.*;
1744 +import java.util.Stack;
1745 +import java.util.List;
1746 +import java.util.ArrayList;
1748 public class BstLexer extends Lexer {
1749 + public static final int FUNCTION=10;
1750 + public static final int INTEGER=19;
1751 + public static final int T__29=29;
1752 + public static final int T__28=28;
1753 + public static final int T__27=27;
1754 + public static final int T__26=26;
1755 + public static final int LINE_COMMENT=24;
1756 + public static final int QUOTED=20;
1757 + public static final int T__25=25;
1758 public static final int LETTER=21;
1759 - public static final int T29=29;
1760 - public static final int T33=33;
1761 - public static final int INTEGERS=9;
1762 - public static final int ENTRY=6;
1763 - public static final int WS=23;
1764 - public static final int COMMANDS=7;
1765 - public static final int STRING=12;
1766 - public static final int T28=28;
1767 public static final int EXECUTE=14;
1768 - public static final int LINE_COMMENT=24;
1769 + public static final int STRINGS=8;
1770 public static final int SORT=17;
1771 - public static final int STACK=5;
1772 - public static final int REVERSE=16;
1773 - public static final int QUOTED=20;
1774 - public static final int T25=25;
1775 - public static final int INTEGER=19;
1776 - public static final int ITERATE=15;
1777 - public static final int FUNCTION=10;
1778 - public static final int T26=26;
1779 + public static final int ENTRY=6;
1780 public static final int EOF=-1;
1781 - public static final int T32=32;
1782 - public static final int Tokens=34;
1783 - public static final int STRINGS=8;
1784 - public static final int T31=31;
1785 - public static final int T27=27;
1786 + public static final int INTEGERS=9;
1787 + public static final int T__30=30;
1788 + public static final int T__31=31;
1789 + public static final int ITERATE=15;
1790 + public static final int T__32=32;
1791 + public static final int T__33=33;
1792 + public static final int WS=23;
1793 + public static final int COMMANDS=7;
1794 + public static final int READ=13;
1795 public static final int IDENTIFIER=18;
1796 - public static final int MACRO=11;
1797 - public static final int T30=30;
1798 public static final int IDLIST=4;
1799 public static final int NUMERAL=22;
1800 - public static final int READ=13;
1801 - public BstLexer() {
1804 + public static final int STACK=5;
1805 + public static final int REVERSE=16;
1806 + public static final int MACRO=11;
1807 + public static final int STRING=12;
1812 + public BstLexer() {;}
1813 public BstLexer(CharStream input) {
1815 + this(input, new RecognizerSharedState());
1817 + public BstLexer(CharStream input, RecognizerSharedState state) {
1818 + super(input,state);
1821 public String getGrammarFileName() { return "Bst.g"; }
1823 - // $ANTLR start T25
1824 - public void mT25() throws RecognitionException {
1825 + // $ANTLR start "T__25"
1826 + public final void mT__25() throws RecognitionException {
1828 - ruleNestingLevel++;
1830 - int _start = getCharIndex();
1831 - int _line = getLine();
1832 - int _charPosition = getCharPositionInLine();
1833 - int _channel = Token.DEFAULT_CHANNEL;
1834 + int _type = T__25;
1835 + int _channel = DEFAULT_TOKEN_CHANNEL;
1836 // Bst.g:3:7: ( '{' )
1846 - if ( token==null && ruleNestingLevel==1 ) {
1847 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1851 + state.type = _type;
1852 + state.channel = _channel;
1855 - ruleNestingLevel--;
1859 + // $ANTLR end "T__25"
1861 - // $ANTLR start T26
1862 - public void mT26() throws RecognitionException {
1863 + // $ANTLR start "T__26"
1864 + public final void mT__26() throws RecognitionException {
1866 - ruleNestingLevel++;
1868 - int _start = getCharIndex();
1869 - int _line = getLine();
1870 - int _charPosition = getCharPositionInLine();
1871 - int _channel = Token.DEFAULT_CHANNEL;
1872 + int _type = T__26;
1873 + int _channel = DEFAULT_TOKEN_CHANNEL;
1874 // Bst.g:4:7: ( '}' )
1884 - if ( token==null && ruleNestingLevel==1 ) {
1885 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1889 + state.type = _type;
1890 + state.channel = _channel;
1893 - ruleNestingLevel--;
1897 + // $ANTLR end "T__26"
1899 - // $ANTLR start T27
1900 - public void mT27() throws RecognitionException {
1901 + // $ANTLR start "T__27"
1902 + public final void mT__27() throws RecognitionException {
1904 - ruleNestingLevel++;
1906 - int _start = getCharIndex();
1907 - int _line = getLine();
1908 - int _charPosition = getCharPositionInLine();
1909 - int _channel = Token.DEFAULT_CHANNEL;
1910 + int _type = T__27;
1911 + int _channel = DEFAULT_TOKEN_CHANNEL;
1912 // Bst.g:5:7: ( '<' )
1922 - if ( token==null && ruleNestingLevel==1 ) {
1923 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1927 + state.type = _type;
1928 + state.channel = _channel;
1931 - ruleNestingLevel--;
1935 + // $ANTLR end "T__27"
1937 - // $ANTLR start T28
1938 - public void mT28() throws RecognitionException {
1939 + // $ANTLR start "T__28"
1940 + public final void mT__28() throws RecognitionException {
1942 - ruleNestingLevel++;
1944 - int _start = getCharIndex();
1945 - int _line = getLine();
1946 - int _charPosition = getCharPositionInLine();
1947 - int _channel = Token.DEFAULT_CHANNEL;
1948 + int _type = T__28;
1949 + int _channel = DEFAULT_TOKEN_CHANNEL;
1950 // Bst.g:6:7: ( '>' )
1960 - if ( token==null && ruleNestingLevel==1 ) {
1961 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1965 + state.type = _type;
1966 + state.channel = _channel;
1969 - ruleNestingLevel--;
1973 + // $ANTLR end "T__28"
1975 - // $ANTLR start T29
1976 - public void mT29() throws RecognitionException {
1977 + // $ANTLR start "T__29"
1978 + public final void mT__29() throws RecognitionException {
1980 - ruleNestingLevel++;
1982 - int _start = getCharIndex();
1983 - int _line = getLine();
1984 - int _charPosition = getCharPositionInLine();
1985 - int _channel = Token.DEFAULT_CHANNEL;
1986 + int _type = T__29;
1987 + int _channel = DEFAULT_TOKEN_CHANNEL;
1988 // Bst.g:7:7: ( '=' )
1998 - if ( token==null && ruleNestingLevel==1 ) {
1999 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2003 + state.type = _type;
2004 + state.channel = _channel;
2007 - ruleNestingLevel--;
2011 + // $ANTLR end "T__29"
2013 - // $ANTLR start T30
2014 - public void mT30() throws RecognitionException {
2015 + // $ANTLR start "T__30"
2016 + public final void mT__30() throws RecognitionException {
2018 - ruleNestingLevel++;
2020 - int _start = getCharIndex();
2021 - int _line = getLine();
2022 - int _charPosition = getCharPositionInLine();
2023 - int _channel = Token.DEFAULT_CHANNEL;
2024 + int _type = T__30;
2025 + int _channel = DEFAULT_TOKEN_CHANNEL;
2026 // Bst.g:8:7: ( '+' )
2036 - if ( token==null && ruleNestingLevel==1 ) {
2037 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2041 + state.type = _type;
2042 + state.channel = _channel;
2045 - ruleNestingLevel--;
2049 + // $ANTLR end "T__30"
2051 - // $ANTLR start T31
2052 - public void mT31() throws RecognitionException {
2053 + // $ANTLR start "T__31"
2054 + public final void mT__31() throws RecognitionException {
2056 - ruleNestingLevel++;
2058 - int _start = getCharIndex();
2059 - int _line = getLine();
2060 - int _charPosition = getCharPositionInLine();
2061 - int _channel = Token.DEFAULT_CHANNEL;
2062 + int _type = T__31;
2063 + int _channel = DEFAULT_TOKEN_CHANNEL;
2064 // Bst.g:9:7: ( '-' )
2074 - if ( token==null && ruleNestingLevel==1 ) {
2075 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2079 + state.type = _type;
2080 + state.channel = _channel;
2083 - ruleNestingLevel--;
2087 + // $ANTLR end "T__31"
2089 - // $ANTLR start T32
2090 - public void mT32() throws RecognitionException {
2091 + // $ANTLR start "T__32"
2092 + public final void mT__32() throws RecognitionException {
2094 - ruleNestingLevel++;
2096 - int _start = getCharIndex();
2097 - int _line = getLine();
2098 - int _charPosition = getCharPositionInLine();
2099 - int _channel = Token.DEFAULT_CHANNEL;
2100 + int _type = T__32;
2101 + int _channel = DEFAULT_TOKEN_CHANNEL;
2102 // Bst.g:10:7: ( ':=' )
2103 - // Bst.g:10:7: ':='
2104 + // Bst.g:10:9: ':='
2113 - if ( token==null && ruleNestingLevel==1 ) {
2114 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2118 + state.type = _type;
2119 + state.channel = _channel;
2122 - ruleNestingLevel--;
2126 + // $ANTLR end "T__32"
2128 - // $ANTLR start T33
2129 - public void mT33() throws RecognitionException {
2130 + // $ANTLR start "T__33"
2131 + public final void mT__33() throws RecognitionException {
2133 - ruleNestingLevel++;
2135 - int _start = getCharIndex();
2136 - int _line = getLine();
2137 - int _charPosition = getCharPositionInLine();
2138 - int _channel = Token.DEFAULT_CHANNEL;
2139 + int _type = T__33;
2140 + int _channel = DEFAULT_TOKEN_CHANNEL;
2141 // Bst.g:11:7: ( '*' )
2142 - // Bst.g:11:7: '*'
2143 + // Bst.g:11:9: '*'
2151 - if ( token==null && ruleNestingLevel==1 ) {
2152 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2156 + state.type = _type;
2157 + state.channel = _channel;
2160 - ruleNestingLevel--;
2164 + // $ANTLR end "T__33"
2166 - // $ANTLR start STRINGS
2167 - public void mSTRINGS() throws RecognitionException {
2168 + // $ANTLR start "STRINGS"
2169 + public final void mSTRINGS() throws RecognitionException {
2171 - ruleNestingLevel++;
2172 int _type = STRINGS;
2173 - int _start = getCharIndex();
2174 - int _line = getLine();
2175 - int _charPosition = getCharPositionInLine();
2176 - int _channel = Token.DEFAULT_CHANNEL;
2177 - // Bst.g:53:11: ( 'STRINGS' )
2178 + int _channel = DEFAULT_TOKEN_CHANNEL;
2179 + // Bst.g:53:9: ( 'STRINGS' )
2180 // Bst.g:53:11: 'STRINGS'
2183 @@ -330,29 +247,20 @@
2189 - if ( token==null && ruleNestingLevel==1 ) {
2190 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2194 + state.type = _type;
2195 + state.channel = _channel;
2198 - ruleNestingLevel--;
2201 - // $ANTLR end STRINGS
2202 + // $ANTLR end "STRINGS"
2204 - // $ANTLR start INTEGERS
2205 - public void mINTEGERS() throws RecognitionException {
2206 + // $ANTLR start "INTEGERS"
2207 + public final void mINTEGERS() throws RecognitionException {
2209 - ruleNestingLevel++;
2210 int _type = INTEGERS;
2211 - int _start = getCharIndex();
2212 - int _line = getLine();
2213 - int _charPosition = getCharPositionInLine();
2214 - int _channel = Token.DEFAULT_CHANNEL;
2215 - // Bst.g:54:12: ( 'INTEGERS' )
2216 + int _channel = DEFAULT_TOKEN_CHANNEL;
2217 + // Bst.g:54:10: ( 'INTEGERS' )
2218 // Bst.g:54:12: 'INTEGERS'
2221 @@ -360,29 +268,20 @@
2227 - if ( token==null && ruleNestingLevel==1 ) {
2228 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2232 + state.type = _type;
2233 + state.channel = _channel;
2236 - ruleNestingLevel--;
2239 - // $ANTLR end INTEGERS
2240 + // $ANTLR end "INTEGERS"
2242 - // $ANTLR start FUNCTION
2243 - public void mFUNCTION() throws RecognitionException {
2244 + // $ANTLR start "FUNCTION"
2245 + public final void mFUNCTION() throws RecognitionException {
2247 - ruleNestingLevel++;
2248 int _type = FUNCTION;
2249 - int _start = getCharIndex();
2250 - int _line = getLine();
2251 - int _charPosition = getCharPositionInLine();
2252 - int _channel = Token.DEFAULT_CHANNEL;
2253 - // Bst.g:55:12: ( 'FUNCTION' )
2254 + int _channel = DEFAULT_TOKEN_CHANNEL;
2255 + // Bst.g:55:10: ( 'FUNCTION' )
2256 // Bst.g:55:12: 'FUNCTION'
2259 @@ -390,29 +289,20 @@
2265 - if ( token==null && ruleNestingLevel==1 ) {
2266 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2270 + state.type = _type;
2271 + state.channel = _channel;
2274 - ruleNestingLevel--;
2277 - // $ANTLR end FUNCTION
2278 + // $ANTLR end "FUNCTION"
2280 - // $ANTLR start EXECUTE
2281 - public void mEXECUTE() throws RecognitionException {
2282 + // $ANTLR start "EXECUTE"
2283 + public final void mEXECUTE() throws RecognitionException {
2285 - ruleNestingLevel++;
2286 int _type = EXECUTE;
2287 - int _start = getCharIndex();
2288 - int _line = getLine();
2289 - int _charPosition = getCharPositionInLine();
2290 - int _channel = Token.DEFAULT_CHANNEL;
2291 - // Bst.g:56:11: ( 'EXECUTE' )
2292 + int _channel = DEFAULT_TOKEN_CHANNEL;
2293 + // Bst.g:56:9: ( 'EXECUTE' )
2294 // Bst.g:56:11: 'EXECUTE'
2297 @@ -420,29 +310,20 @@
2303 - if ( token==null && ruleNestingLevel==1 ) {
2304 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2308 + state.type = _type;
2309 + state.channel = _channel;
2312 - ruleNestingLevel--;
2315 - // $ANTLR end EXECUTE
2316 + // $ANTLR end "EXECUTE"
2318 - // $ANTLR start SORT
2319 - public void mSORT() throws RecognitionException {
2320 + // $ANTLR start "SORT"
2321 + public final void mSORT() throws RecognitionException {
2323 - ruleNestingLevel++;
2325 - int _start = getCharIndex();
2326 - int _line = getLine();
2327 - int _charPosition = getCharPositionInLine();
2328 - int _channel = Token.DEFAULT_CHANNEL;
2329 - // Bst.g:57:8: ( 'SORT' )
2330 + int _channel = DEFAULT_TOKEN_CHANNEL;
2331 + // Bst.g:57:6: ( 'SORT' )
2332 // Bst.g:57:8: 'SORT'
2335 @@ -450,29 +331,20 @@
2341 - if ( token==null && ruleNestingLevel==1 ) {
2342 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2346 + state.type = _type;
2347 + state.channel = _channel;
2350 - ruleNestingLevel--;
2353 - // $ANTLR end SORT
2354 + // $ANTLR end "SORT"
2356 - // $ANTLR start ITERATE
2357 - public void mITERATE() throws RecognitionException {
2358 + // $ANTLR start "ITERATE"
2359 + public final void mITERATE() throws RecognitionException {
2361 - ruleNestingLevel++;
2362 int _type = ITERATE;
2363 - int _start = getCharIndex();
2364 - int _line = getLine();
2365 - int _charPosition = getCharPositionInLine();
2366 - int _channel = Token.DEFAULT_CHANNEL;
2367 - // Bst.g:58:11: ( 'ITERATE' )
2368 + int _channel = DEFAULT_TOKEN_CHANNEL;
2369 + // Bst.g:58:9: ( 'ITERATE' )
2370 // Bst.g:58:11: 'ITERATE'
2373 @@ -480,29 +352,20 @@
2379 - if ( token==null && ruleNestingLevel==1 ) {
2380 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2384 + state.type = _type;
2385 + state.channel = _channel;
2388 - ruleNestingLevel--;
2391 - // $ANTLR end ITERATE
2392 + // $ANTLR end "ITERATE"
2394 - // $ANTLR start REVERSE
2395 - public void mREVERSE() throws RecognitionException {
2396 + // $ANTLR start "REVERSE"
2397 + public final void mREVERSE() throws RecognitionException {
2399 - ruleNestingLevel++;
2400 int _type = REVERSE;
2401 - int _start = getCharIndex();
2402 - int _line = getLine();
2403 - int _charPosition = getCharPositionInLine();
2404 - int _channel = Token.DEFAULT_CHANNEL;
2405 - // Bst.g:59:11: ( 'REVERSE' )
2406 + int _channel = DEFAULT_TOKEN_CHANNEL;
2407 + // Bst.g:59:9: ( 'REVERSE' )
2408 // Bst.g:59:11: 'REVERSE'
2411 @@ -510,29 +373,20 @@
2417 - if ( token==null && ruleNestingLevel==1 ) {
2418 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2422 + state.type = _type;
2423 + state.channel = _channel;
2426 - ruleNestingLevel--;
2429 - // $ANTLR end REVERSE
2430 + // $ANTLR end "REVERSE"
2432 - // $ANTLR start ENTRY
2433 - public void mENTRY() throws RecognitionException {
2434 + // $ANTLR start "ENTRY"
2435 + public final void mENTRY() throws RecognitionException {
2437 - ruleNestingLevel++;
2439 - int _start = getCharIndex();
2440 - int _line = getLine();
2441 - int _charPosition = getCharPositionInLine();
2442 - int _channel = Token.DEFAULT_CHANNEL;
2443 - // Bst.g:60:9: ( 'ENTRY' )
2444 + int _channel = DEFAULT_TOKEN_CHANNEL;
2445 + // Bst.g:60:7: ( 'ENTRY' )
2446 // Bst.g:60:9: 'ENTRY'
2449 @@ -540,29 +394,20 @@
2455 - if ( token==null && ruleNestingLevel==1 ) {
2456 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2460 + state.type = _type;
2461 + state.channel = _channel;
2464 - ruleNestingLevel--;
2467 - // $ANTLR end ENTRY
2468 + // $ANTLR end "ENTRY"
2470 - // $ANTLR start READ
2471 - public void mREAD() throws RecognitionException {
2472 + // $ANTLR start "READ"
2473 + public final void mREAD() throws RecognitionException {
2475 - ruleNestingLevel++;
2477 - int _start = getCharIndex();
2478 - int _line = getLine();
2479 - int _charPosition = getCharPositionInLine();
2480 - int _channel = Token.DEFAULT_CHANNEL;
2481 - // Bst.g:61:8: ( 'READ' )
2482 + int _channel = DEFAULT_TOKEN_CHANNEL;
2483 + // Bst.g:61:6: ( 'READ' )
2484 // Bst.g:61:8: 'READ'
2487 @@ -570,29 +415,20 @@
2493 - if ( token==null && ruleNestingLevel==1 ) {
2494 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2498 + state.type = _type;
2499 + state.channel = _channel;
2502 - ruleNestingLevel--;
2505 - // $ANTLR end READ
2506 + // $ANTLR end "READ"
2508 - // $ANTLR start MACRO
2509 - public void mMACRO() throws RecognitionException {
2510 + // $ANTLR start "MACRO"
2511 + public final void mMACRO() throws RecognitionException {
2513 - ruleNestingLevel++;
2515 - int _start = getCharIndex();
2516 - int _line = getLine();
2517 - int _charPosition = getCharPositionInLine();
2518 - int _channel = Token.DEFAULT_CHANNEL;
2519 - // Bst.g:62:9: ( 'MACRO' )
2520 + int _channel = DEFAULT_TOKEN_CHANNEL;
2521 + // Bst.g:62:7: ( 'MACRO' )
2522 // Bst.g:62:9: 'MACRO'
2525 @@ -600,29 +436,20 @@
2531 - if ( token==null && ruleNestingLevel==1 ) {
2532 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2536 + state.type = _type;
2537 + state.channel = _channel;
2540 - ruleNestingLevel--;
2543 - // $ANTLR end MACRO
2544 + // $ANTLR end "MACRO"
2546 - // $ANTLR start QUOTED
2547 - public void mQUOTED() throws RecognitionException {
2548 + // $ANTLR start "QUOTED"
2549 + public final void mQUOTED() throws RecognitionException {
2551 - ruleNestingLevel++;
2553 - int _start = getCharIndex();
2554 - int _line = getLine();
2555 - int _charPosition = getCharPositionInLine();
2556 - int _channel = Token.DEFAULT_CHANNEL;
2557 - // Bst.g:65:4: ( '\\'' IDENTIFIER )
2558 + int _channel = DEFAULT_TOKEN_CHANNEL;
2559 + // Bst.g:65:2: ( '\\'' IDENTIFIER )
2560 // Bst.g:65:4: '\\'' IDENTIFIER
2563 @@ -630,29 +457,20 @@
2569 - if ( token==null && ruleNestingLevel==1 ) {
2570 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2574 + state.type = _type;
2575 + state.channel = _channel;
2578 - ruleNestingLevel--;
2581 - // $ANTLR end QUOTED
2582 + // $ANTLR end "QUOTED"
2584 - // $ANTLR start IDENTIFIER
2585 - public void mIDENTIFIER() throws RecognitionException {
2586 + // $ANTLR start "IDENTIFIER"
2587 + public final void mIDENTIFIER() throws RecognitionException {
2589 - ruleNestingLevel++;
2590 int _type = IDENTIFIER;
2591 - int _start = getCharIndex();
2592 - int _line = getLine();
2593 - int _charPosition = getCharPositionInLine();
2594 - int _channel = Token.DEFAULT_CHANNEL;
2595 - // Bst.g:68:4: ( LETTER ( LETTER | NUMERAL )* )
2596 + int _channel = DEFAULT_TOKEN_CHANNEL;
2597 + // Bst.g:68:2: ( LETTER ( LETTER | NUMERAL )* )
2598 // Bst.g:68:4: LETTER ( LETTER | NUMERAL )*
2604 int LA1_0 = input.LA(1);
2606 if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='a' && LA1_0<='z')) ) {
2609 @@ -693,82 +512,70 @@
2615 - if ( token==null && ruleNestingLevel==1 ) {
2616 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2620 + state.type = _type;
2621 + state.channel = _channel;
2624 - ruleNestingLevel--;
2627 - // $ANTLR end IDENTIFIER
2628 + // $ANTLR end "IDENTIFIER"
2630 - // $ANTLR start LETTER
2631 - public void mLETTER() throws RecognitionException {
2632 + // $ANTLR start "LETTER"
2633 + public final void mLETTER() throws RecognitionException {
2635 - ruleNestingLevel++;
2636 - // Bst.g:71:4: ( ('a'..'z'|'A'..'Z'|'.'|'$'))
2637 - // Bst.g:71:4: ('a'..'z'|'A'..'Z'|'.'|'$')
2638 + // Bst.g:71:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' ) )
2639 + // Bst.g:71:4: ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' )
2641 if ( input.LA(1)=='$'||input.LA(1)=='.'||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
2646 - MismatchedSetException mse =
2647 - new MismatchedSetException(null,input);
2648 - recover(mse); throw mse;
2650 + MismatchedSetException mse = new MismatchedSetException(null,input);
2659 - ruleNestingLevel--;
2662 - // $ANTLR end LETTER
2663 + // $ANTLR end "LETTER"
2665 - // $ANTLR start STRING
2666 - public void mSTRING() throws RecognitionException {
2667 + // $ANTLR start "STRING"
2668 + public final void mSTRING() throws RecognitionException {
2670 - ruleNestingLevel++;
2672 - int _start = getCharIndex();
2673 - int _line = getLine();
2674 - int _charPosition = getCharPositionInLine();
2675 - int _channel = Token.DEFAULT_CHANNEL;
2676 - // Bst.g:74:4: ( '\"' (~ '\"' )* '\"' )
2677 - // Bst.g:74:4: '\"' (~ '\"' )* '\"'
2678 + int _channel = DEFAULT_TOKEN_CHANNEL;
2679 + // Bst.g:74:2: ( '\"' (~ ( '\"' ) )* '\"' )
2680 + // Bst.g:74:4: '\"' (~ ( '\"' ) )* '\"'
2683 - // Bst.g:74:8: (~ '\"' )*
2684 + // Bst.g:74:8: (~ ( '\"' ) )*
2688 int LA2_0 = input.LA(1);
2689 - if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFE')) ) {
2691 + if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFF')) ) {
2698 - // Bst.g:74:9: ~ '\"'
2699 + // Bst.g:74:9: ~ ( '\"' )
2701 - if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFE') ) {
2702 + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFF') ) {
2707 - MismatchedSetException mse =
2708 - new MismatchedSetException(null,input);
2709 - recover(mse); throw mse;
2711 + MismatchedSetException mse = new MismatchedSetException(null,input);
2717 @@ -783,51 +590,42 @@
2723 - if ( token==null && ruleNestingLevel==1 ) {
2724 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2728 + state.type = _type;
2729 + state.channel = _channel;
2732 - ruleNestingLevel--;
2735 - // $ANTLR end STRING
2736 + // $ANTLR end "STRING"
2738 - // $ANTLR start INTEGER
2739 - public void mINTEGER() throws RecognitionException {
2740 + // $ANTLR start "INTEGER"
2741 + public final void mINTEGER() throws RecognitionException {
2743 - ruleNestingLevel++;
2744 int _type = INTEGER;
2745 - int _start = getCharIndex();
2746 - int _line = getLine();
2747 - int _charPosition = getCharPositionInLine();
2748 - int _channel = Token.DEFAULT_CHANNEL;
2749 - // Bst.g:77:4: ( '#' ( ('+'|'-'))? ( NUMERAL )+ )
2750 - // Bst.g:77:4: '#' ( ('+'|'-'))? ( NUMERAL )+
2751 + int _channel = DEFAULT_TOKEN_CHANNEL;
2752 + // Bst.g:77:2: ( '#' ( '+' | '-' )? ( NUMERAL )+ )
2753 + // Bst.g:77:4: '#' ( '+' | '-' )? ( NUMERAL )+
2756 - // Bst.g:77:8: ( ('+'|'-'))?
2757 + // Bst.g:77:8: ( '+' | '-' )?
2759 int LA3_0 = input.LA(1);
2761 if ( (LA3_0=='+'||LA3_0=='-') ) {
2766 - // Bst.g:77:9: ('+'|'-')
2769 if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
2774 - MismatchedSetException mse =
2775 - new MismatchedSetException(null,input);
2776 - recover(mse); throw mse;
2778 + MismatchedSetException mse = new MismatchedSetException(null,input);
2787 int LA4_0 = input.LA(1);
2789 if ( ((LA4_0>='0' && LA4_0<='9')) ) {
2792 @@ -867,24 +666,18 @@
2798 - if ( token==null && ruleNestingLevel==1 ) {
2799 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2803 + state.type = _type;
2804 + state.channel = _channel;
2807 - ruleNestingLevel--;
2810 - // $ANTLR end INTEGER
2811 + // $ANTLR end "INTEGER"
2813 - // $ANTLR start NUMERAL
2814 - public void mNUMERAL() throws RecognitionException {
2815 + // $ANTLR start "NUMERAL"
2816 + public final void mNUMERAL() throws RecognitionException {
2818 - ruleNestingLevel++;
2819 - // Bst.g:80:4: ( ( '0' .. '9' ) )
2820 + // Bst.g:80:2: ( ( '0' .. '9' ) )
2821 // Bst.g:80:4: ( '0' .. '9' )
2823 // Bst.g:80:4: ( '0' .. '9' )
2824 @@ -899,47 +692,42 @@
2828 - ruleNestingLevel--;
2831 - // $ANTLR end NUMERAL
2832 + // $ANTLR end "NUMERAL"
2834 - // $ANTLR start WS
2835 - public void mWS() throws RecognitionException {
2836 + // $ANTLR start "WS"
2837 + public final void mWS() throws RecognitionException {
2839 - ruleNestingLevel++;
2841 - int _start = getCharIndex();
2842 - int _line = getLine();
2843 - int _charPosition = getCharPositionInLine();
2844 - int _channel = Token.DEFAULT_CHANNEL;
2845 - // Bst.g:82:9: ( ( (' '|'\\t'|'\\r'|'\\n'))+ )
2846 - // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
2847 + int _channel = DEFAULT_TOKEN_CHANNEL;
2848 + // Bst.g:83:2: ( ( ' ' | '\\t' | '\\n' )+ )
2849 + // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
2851 - // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
2852 + // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
2857 int LA5_0 = input.LA(1);
2858 - if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0=='\r'||LA5_0==' ') ) {
2860 + if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0==' ') ) {
2867 - // Bst.g:82:13: (' '|'\\t'|'\\r'|'\\n')
2870 - if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
2871 + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)==' ' ) {
2876 - MismatchedSetException mse =
2877 - new MismatchedSetException(null,input);
2878 - recover(mse); throw mse;
2880 + MismatchedSetException mse = new MismatchedSetException(null,input);
2886 @@ -954,59 +742,50 @@
2897 - if ( token==null && ruleNestingLevel==1 ) {
2898 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2902 + state.type = _type;
2903 + state.channel = _channel;
2906 - ruleNestingLevel--;
2910 + // $ANTLR end "WS"
2912 - // $ANTLR start LINE_COMMENT
2913 - public void mLINE_COMMENT() throws RecognitionException {
2914 + // $ANTLR start "LINE_COMMENT"
2915 + public final void mLINE_COMMENT() throws RecognitionException {
2917 - ruleNestingLevel++;
2918 int _type = LINE_COMMENT;
2919 - int _start = getCharIndex();
2920 - int _line = getLine();
2921 - int _charPosition = getCharPositionInLine();
2922 - int _channel = Token.DEFAULT_CHANNEL;
2923 - // Bst.g:90:7: ( '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n' )
2924 - // Bst.g:90:7: '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n'
2925 + int _channel = DEFAULT_TOKEN_CHANNEL;
2926 + // Bst.g:86:5: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
2927 + // Bst.g:86:7: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
2930 - // Bst.g:90:11: (~ ('\\n'|'\\r'))*
2931 + // Bst.g:86:11: (~ ( '\\n' | '\\r' ) )*
2935 int LA6_0 = input.LA(1);
2936 - if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFE')) ) {
2938 + if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFF')) ) {
2945 - // Bst.g:90:11: ~ ('\\n'|'\\r')
2946 + // Bst.g:86:11: ~ ( '\\n' | '\\r' )
2948 - if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
2949 + if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
2954 - MismatchedSetException mse =
2955 - new MismatchedSetException(null,input);
2956 - recover(mse); throw mse;
2958 + MismatchedSetException mse = new MismatchedSetException(null,input);
2964 @@ -1017,15 +796,16 @@
2968 - // Bst.g:90:25: ( '\\r' )?
2969 + // Bst.g:86:25: ( '\\r' )?
2971 int LA7_0 = input.LA(1);
2973 if ( (LA7_0=='\r') ) {
2978 - // Bst.g:90:25: '\\r'
2979 + // Bst.g:86:25: '\\r'
2983 @@ -1035,619 +815,193 @@
2994 - if ( token==null && ruleNestingLevel==1 ) {
2995 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2999 + state.type = _type;
3000 + state.channel = _channel;
3003 - ruleNestingLevel--;
3006 - // $ANTLR end LINE_COMMENT
3007 + // $ANTLR end "LINE_COMMENT"
3009 public void mTokens() throws RecognitionException {
3010 - // Bst.g:1:10: ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT )
3011 + // Bst.g:1:8: ( T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT )
3013 - switch ( input.LA(1) ) {
3042 - switch ( input.LA(2) ) {
3044 - int LA8_22 = input.LA(3);
3045 - if ( (LA8_22=='R') ) {
3046 - int LA8_31 = input.LA(4);
3047 - if ( (LA8_31=='I') ) {
3048 - int LA8_41 = input.LA(5);
3049 - if ( (LA8_41=='N') ) {
3050 - int LA8_51 = input.LA(6);
3051 - if ( (LA8_51=='G') ) {
3052 - int LA8_61 = input.LA(7);
3053 - if ( (LA8_61=='S') ) {
3054 - int LA8_69 = input.LA(8);
3055 - if ( (LA8_69=='$'||LA8_69=='.'||(LA8_69>='0' && LA8_69<='9')||(LA8_69>='A' && LA8_69<='Z')||(LA8_69>='a' && LA8_69<='z')) ) {
3077 - int LA8_23 = input.LA(3);
3078 - if ( (LA8_23=='R') ) {
3079 - int LA8_32 = input.LA(4);
3080 - if ( (LA8_32=='T') ) {
3081 - int LA8_42 = input.LA(5);
3082 - if ( (LA8_42=='$'||LA8_42=='.'||(LA8_42>='0' && LA8_42<='9')||(LA8_42>='A' && LA8_42<='Z')||(LA8_42>='a' && LA8_42<='z')) ) {
3099 - switch ( input.LA(2) ) {
3101 - int LA8_24 = input.LA(3);
3102 - if ( (LA8_24=='E') ) {
3103 - int LA8_33 = input.LA(4);
3104 - if ( (LA8_33=='R') ) {
3105 - int LA8_43 = input.LA(5);
3106 - if ( (LA8_43=='A') ) {
3107 - int LA8_53 = input.LA(6);
3108 - if ( (LA8_53=='T') ) {
3109 - int LA8_62 = input.LA(7);
3110 - if ( (LA8_62=='E') ) {
3111 - int LA8_70 = input.LA(8);
3112 - if ( (LA8_70=='$'||LA8_70=='.'||(LA8_70>='0' && LA8_70<='9')||(LA8_70>='A' && LA8_70<='Z')||(LA8_70>='a' && LA8_70<='z')) ) {
3134 - int LA8_25 = input.LA(3);
3135 - if ( (LA8_25=='T') ) {
3136 - int LA8_34 = input.LA(4);
3137 - if ( (LA8_34=='E') ) {
3138 - int LA8_44 = input.LA(5);
3139 - if ( (LA8_44=='G') ) {
3140 - int LA8_54 = input.LA(6);
3141 - if ( (LA8_54=='E') ) {
3142 - int LA8_63 = input.LA(7);
3143 - if ( (LA8_63=='R') ) {
3144 - int LA8_71 = input.LA(8);
3145 - if ( (LA8_71=='S') ) {
3146 - int LA8_77 = input.LA(9);
3147 - if ( (LA8_77=='$'||LA8_77=='.'||(LA8_77>='0' && LA8_77<='9')||(LA8_77>='A' && LA8_77<='Z')||(LA8_77>='a' && LA8_77<='z')) ) {
3176 - int LA8_12 = input.LA(2);
3177 - if ( (LA8_12=='U') ) {
3178 - int LA8_26 = input.LA(3);
3179 - if ( (LA8_26=='N') ) {
3180 - int LA8_35 = input.LA(4);
3181 - if ( (LA8_35=='C') ) {
3182 - int LA8_45 = input.LA(5);
3183 - if ( (LA8_45=='T') ) {
3184 - int LA8_55 = input.LA(6);
3185 - if ( (LA8_55=='I') ) {
3186 - int LA8_64 = input.LA(7);
3187 - if ( (LA8_64=='O') ) {
3188 - int LA8_72 = input.LA(8);
3189 - if ( (LA8_72=='N') ) {
3190 - int LA8_78 = input.LA(9);
3191 - if ( (LA8_78=='$'||LA8_78=='.'||(LA8_78>='0' && LA8_78<='9')||(LA8_78>='A' && LA8_78<='Z')||(LA8_78>='a' && LA8_78<='z')) ) {
3219 - switch ( input.LA(2) ) {
3221 - int LA8_27 = input.LA(3);
3222 - if ( (LA8_27=='T') ) {
3223 - int LA8_36 = input.LA(4);
3224 - if ( (LA8_36=='R') ) {
3225 - int LA8_46 = input.LA(5);
3226 - if ( (LA8_46=='Y') ) {
3227 - int LA8_56 = input.LA(6);
3228 - if ( (LA8_56=='$'||LA8_56=='.'||(LA8_56>='0' && LA8_56<='9')||(LA8_56>='A' && LA8_56<='Z')||(LA8_56>='a' && LA8_56<='z')) ) {
3244 - int LA8_28 = input.LA(3);
3245 - if ( (LA8_28=='E') ) {
3246 - int LA8_37 = input.LA(4);
3247 - if ( (LA8_37=='C') ) {
3248 - int LA8_47 = input.LA(5);
3249 - if ( (LA8_47=='U') ) {
3250 - int LA8_57 = input.LA(6);
3251 - if ( (LA8_57=='T') ) {
3252 - int LA8_66 = input.LA(7);
3253 - if ( (LA8_66=='E') ) {
3254 - int LA8_73 = input.LA(8);
3255 - if ( (LA8_73=='$'||LA8_73=='.'||(LA8_73>='0' && LA8_73<='9')||(LA8_73>='A' && LA8_73<='Z')||(LA8_73>='a' && LA8_73<='z')) ) {
3281 - int LA8_14 = input.LA(2);
3282 - if ( (LA8_14=='E') ) {
3283 - switch ( input.LA(3) ) {
3285 - int LA8_38 = input.LA(4);
3286 - if ( (LA8_38=='D') ) {
3287 - int LA8_48 = input.LA(5);
3288 - if ( (LA8_48=='$'||LA8_48=='.'||(LA8_48>='0' && LA8_48<='9')||(LA8_48>='A' && LA8_48<='Z')||(LA8_48>='a' && LA8_48<='z')) ) {
3298 - int LA8_39 = input.LA(4);
3299 - if ( (LA8_39=='E') ) {
3300 - int LA8_49 = input.LA(5);
3301 - if ( (LA8_49=='R') ) {
3302 - int LA8_59 = input.LA(6);
3303 - if ( (LA8_59=='S') ) {
3304 - int LA8_67 = input.LA(7);
3305 - if ( (LA8_67=='E') ) {
3306 - int LA8_74 = input.LA(8);
3307 - if ( (LA8_74=='$'||LA8_74=='.'||(LA8_74>='0' && LA8_74<='9')||(LA8_74>='A' && LA8_74<='Z')||(LA8_74>='a' && LA8_74<='z')) ) {
3333 - int LA8_15 = input.LA(2);
3334 - if ( (LA8_15=='A') ) {
3335 - int LA8_30 = input.LA(3);
3336 - if ( (LA8_30=='C') ) {
3337 - int LA8_40 = input.LA(4);
3338 - if ( (LA8_40=='R') ) {
3339 - int LA8_50 = input.LA(5);
3340 - if ( (LA8_50=='O') ) {
3341 - int LA8_60 = input.LA(6);
3342 - if ( (LA8_60=='$'||LA8_60=='.'||(LA8_60>='0' && LA8_60<='9')||(LA8_60>='A' && LA8_60<='Z')||(LA8_60>='a' && LA8_60<='z')) ) {
3429 - NoViableAltException nvae =
3430 - new NoViableAltException("1:1: Tokens : ( T25 | T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | STRINGS | INTEGERS | FUNCTION | EXECUTE | SORT | ITERATE | REVERSE | ENTRY | READ | MACRO | QUOTED | IDENTIFIER | STRING | INTEGER | WS | LINE_COMMENT );", 8, 0, input);
3435 + alt8 = dfa8.predict(input);
3438 - // Bst.g:1:10: T25
3439 + // Bst.g:1:10: T__25
3447 - // Bst.g:1:14: T26
3448 + // Bst.g:1:16: T__26
3456 - // Bst.g:1:18: T27
3457 + // Bst.g:1:22: T__27
3465 - // Bst.g:1:22: T28
3466 + // Bst.g:1:28: T__28
3474 - // Bst.g:1:26: T29
3475 + // Bst.g:1:34: T__29
3483 - // Bst.g:1:30: T30
3484 + // Bst.g:1:40: T__30
3492 - // Bst.g:1:34: T31
3493 + // Bst.g:1:46: T__31
3501 - // Bst.g:1:38: T32
3502 + // Bst.g:1:52: T__32
3510 - // Bst.g:1:42: T33
3511 + // Bst.g:1:58: T__33
3519 - // Bst.g:1:46: STRINGS
3520 + // Bst.g:1:64: STRINGS
3527 - // Bst.g:1:54: INTEGERS
3528 + // Bst.g:1:72: INTEGERS
3535 - // Bst.g:1:63: FUNCTION
3536 + // Bst.g:1:81: FUNCTION
3543 - // Bst.g:1:72: EXECUTE
3544 + // Bst.g:1:90: EXECUTE
3551 - // Bst.g:1:80: SORT
3552 + // Bst.g:1:98: SORT
3559 - // Bst.g:1:85: ITERATE
3560 + // Bst.g:1:103: ITERATE
3567 - // Bst.g:1:93: REVERSE
3568 + // Bst.g:1:111: REVERSE
3575 - // Bst.g:1:101: ENTRY
3576 + // Bst.g:1:119: ENTRY
3583 - // Bst.g:1:107: READ
3584 + // Bst.g:1:125: READ
3591 - // Bst.g:1:112: MACRO
3592 + // Bst.g:1:130: MACRO
3599 - // Bst.g:1:118: QUOTED
3600 + // Bst.g:1:136: QUOTED
3607 - // Bst.g:1:125: IDENTIFIER
3608 + // Bst.g:1:143: IDENTIFIER
3615 - // Bst.g:1:136: STRING
3616 + // Bst.g:1:154: STRING
3623 - // Bst.g:1:143: INTEGER
3624 + // Bst.g:1:161: INTEGER
3631 - // Bst.g:1:151: WS
3632 + // Bst.g:1:169: WS
3639 - // Bst.g:1:154: LINE_COMMENT
3640 + // Bst.g:1:172: LINE_COMMENT
3644 @@ -1659,6 +1013,167 @@
3648 + protected DFA8 dfa8 = new DFA8(this);
3649 + static final String DFA8_eotS =
3650 + "\12\uffff\6\21\6\uffff\24\21\1\64\6\21\1\73\2\21\1\uffff\4\21\1"+
3651 + "\102\1\21\1\uffff\1\104\5\21\1\uffff\1\21\1\uffff\1\113\1\21\1\115"+
3652 + "\1\21\1\117\1\120\1\uffff\1\121\1\uffff\1\122\4\uffff";
3653 + static final String DFA8_eofS =
3655 + static final String DFA8_minS =
3656 + "\1\11\11\uffff\1\117\1\116\1\125\1\116\1\105\1\101\6\uffff\2\122"+
3657 + "\1\124\1\105\1\116\1\105\1\124\1\101\1\103\1\111\1\124\1\105\1\122"+
3658 + "\2\103\1\122\1\105\1\104\1\122\1\116\1\44\1\107\1\101\1\124\1\125"+
3659 + "\1\131\1\122\1\44\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1"+
3660 + "\44\1\123\1\uffff\1\44\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105"+
3661 + "\1\uffff\1\44\1\123\1\44\1\116\2\44\1\uffff\1\44\1\uffff\1\44\4"+
3663 + static final String DFA8_maxS =
3664 + "\1\175\11\uffff\2\124\1\125\1\130\1\105\1\101\6\uffff\2\122\1\124"+
3665 + "\1\105\1\116\1\105\1\124\1\126\1\103\1\111\1\124\1\105\1\122\2\103"+
3666 + "\1\122\1\105\1\104\1\122\1\116\1\172\1\107\1\101\1\124\1\125\1\131"+
3667 + "\1\122\1\172\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1\172\1"+
3668 + "\123\1\uffff\1\172\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105\1"+
3669 + "\uffff\1\172\1\123\1\172\1\116\2\172\1\uffff\1\172\1\uffff\1\172"+
3671 + static final String DFA8_acceptS =
3672 + "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\6\uffff\1\24\1\25"+
3673 + "\1\26\1\27\1\30\1\31\36\uffff\1\16\6\uffff\1\22\6\uffff\1\21\1\uffff"+
3674 + "\1\23\6\uffff\1\12\1\uffff\1\17\1\uffff\1\15\1\20\1\13\1\14";
3675 + static final String DFA8_specialS =
3677 + static final String[] DFA8_transitionS = {
3678 + "\2\24\25\uffff\1\24\1\uffff\1\22\1\23\1\21\1\25\1\uffff\1\20"+
3679 + "\2\uffff\1\11\1\6\1\uffff\1\7\1\21\13\uffff\1\10\1\uffff\1\3"+
3680 + "\1\5\1\4\2\uffff\4\21\1\15\1\14\2\21\1\13\3\21\1\17\4\21\1\16"+
3681 + "\1\12\7\21\6\uffff\32\21\1\1\1\uffff\1\2",
3691 + "\1\27\4\uffff\1\26",
3692 + "\1\30\5\uffff\1\31",
3694 + "\1\34\11\uffff\1\33",
3710 + "\1\47\24\uffff\1\46",
3723 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3731 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3740 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3744 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3754 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3757 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3760 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3762 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3765 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3768 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3776 + static final short[] DFA8_eot = DFA.unpackEncodedString(DFA8_eotS);
3777 + static final short[] DFA8_eof = DFA.unpackEncoded