1 Description: include new BstParser/Lexer classes generated by antlr 3.2
3 Bug: http://bugs.debian.org/591124
5 Author: tony mancill <tmancill@debian.org>
6 Last-Update: 2010-08-03
8 ===================================================================
9 --- a/src/java/net/sf/jabref/bst/BstParser.java
10 +++ b/src/java/net/sf/jabref/bst/BstParser.java
12 package net.sf.jabref.bst;
14 -// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
15 +// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:10
17 -import java.util.ArrayList;
18 +import org.antlr.runtime.*;
19 +import java.util.Stack;
20 import java.util.List;
21 +import java.util.ArrayList;
23 -import org.antlr.runtime.BitSet;
24 -import org.antlr.runtime.EarlyExitException;
25 -import org.antlr.runtime.NoViableAltException;
26 -import org.antlr.runtime.Parser;
27 -import org.antlr.runtime.ParserRuleReturnScope;
28 -import org.antlr.runtime.RecognitionException;
29 -import org.antlr.runtime.Token;
30 -import org.antlr.runtime.TokenStream;
31 -import org.antlr.runtime.tree.CommonTreeAdaptor;
32 -import org.antlr.runtime.tree.TreeAdaptor;
34 -@SuppressWarnings({"unused", "unchecked"})
35 +import org.antlr.runtime.tree.*;
37 public class BstParser extends Parser {
38 public static final String[] tokenNames = new String[] {
39 "<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", "'{'", "'}'", "'<'", "'>'", "'='", "'+'", "'-'", "':='", "'*'"
41 + public static final int INTEGER=19;
42 + public static final int FUNCTION=10;
43 + public static final int T__29=29;
44 + public static final int T__28=28;
45 + public static final int T__27=27;
46 + public static final int T__26=26;
47 + public static final int LINE_COMMENT=24;
48 + public static final int QUOTED=20;
49 + public static final int T__25=25;
50 public static final int LETTER=21;
51 + public static final int EXECUTE=14;
52 + public static final int STRINGS=8;
53 + public static final int SORT=17;
54 public static final int ENTRY=6;
55 + public static final int EOF=-1;
56 public static final int INTEGERS=9;
57 + public static final int T__30=30;
58 + public static final int ITERATE=15;
59 + public static final int T__31=31;
60 + public static final int T__32=32;
61 public static final int WS=23;
62 + public static final int T__33=33;
63 public static final int COMMANDS=7;
64 - public static final int STRING=12;
65 - public static final int EXECUTE=14;
66 - public static final int LINE_COMMENT=24;
67 - public static final int SORT=17;
68 - public static final int STACK=5;
69 - public static final int REVERSE=16;
70 - public static final int QUOTED=20;
71 - public static final int INTEGER=19;
72 - public static final int ITERATE=15;
73 - public static final int FUNCTION=10;
74 - public static final int EOF=-1;
75 - public static final int STRINGS=8;
76 + public static final int READ=13;
77 public static final int IDENTIFIER=18;
78 - public static final int MACRO=11;
79 public static final int IDLIST=4;
80 public static final int NUMERAL=22;
81 - public static final int READ=13;
82 + public static final int STACK=5;
83 + public static final int REVERSE=16;
84 + public static final int MACRO=11;
85 + public static final int STRING=12;
91 public BstParser(TokenStream input) {
93 + this(input, new RecognizerSharedState());
95 + public BstParser(TokenStream input, RecognizerSharedState state) {
96 + super(input, state);
100 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
101 @@ -57,29 +67,29 @@ public class BstParser extends Parser {
105 - public String[] getTokenNames() { return tokenNames; }
106 + public String[] getTokenNames() { return BstParser.tokenNames; }
107 public String getGrammarFileName() { return "Bst.g"; }
110 public static class program_return extends ParserRuleReturnScope {
112 public Object getTree() { return tree; }
116 - // $ANTLR start program
117 + // $ANTLR start "program"
118 // Bst.g:14:1: program : ( commands )+ -> ^( COMMANDS ( commands )+ ) ;
119 - public program_return program() throws RecognitionException {
120 - program_return retval = new program_return();
121 + public final BstParser.program_return program() throws RecognitionException {
122 + BstParser.program_return retval = new BstParser.program_return();
123 retval.start = input.LT(1);
125 Object root_0 = null;
127 - commands_return commands1 = null;
128 + BstParser.commands_return commands1 = null;
130 - List list_commands=new ArrayList();
132 + RewriteRuleSubtreeStream stream_commands=new RewriteRuleSubtreeStream(adaptor,"rule commands");
134 - // Bst.g:14:11: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
135 + // Bst.g:14:9: ( ( commands )+ -> ^( COMMANDS ( commands )+ ) )
136 // Bst.g:14:11: ( commands )+
138 // Bst.g:14:11: ( commands )+
139 @@ -88,6 +98,7 @@ public class BstParser extends Parser {
142 int LA1_0 = input.LA(1);
144 if ( (LA1_0==ENTRY||(LA1_0>=STRINGS && LA1_0<=MACRO)||(LA1_0>=READ && LA1_0<=SORT)) ) {
147 @@ -99,9 +110,10 @@ public class BstParser extends Parser {
149 pushFollow(FOLLOW_commands_in_program45);
150 commands1=commands();
153 - list_commands.add(commands1.tree);
156 + stream_commands.add(commands1.getTree());
160 @@ -116,65 +128,69 @@ public class BstParser extends Parser {
168 + // elements: commands
170 + // rule labels: retval
171 + // token list labels:
172 + // rule list labels:
173 + // wildcard labels:
174 retval.tree = root_0;
175 - root_0 = adaptor.nil();
176 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
178 + root_0 = (Object)adaptor.nil();
179 // 14:21: -> ^( COMMANDS ( commands )+ )
181 // Bst.g:14:24: ^( COMMANDS ( commands )+ )
183 - Object root_1 = adaptor.nil();
184 - root_1 = adaptor.becomeRoot(adaptor.create(COMMANDS, "COMMANDS"), root_1);
186 - // Bst.g:14:35: ( commands )+
188 - int n_1 = list_commands == null ? 0 : list_commands.size();
192 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
193 - for (int i_1=0; i_1<n_1; i_1++) {
194 - adaptor.addChild(root_1, list_commands.get(i_1));
195 + Object root_1 = (Object)adaptor.nil();
196 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(COMMANDS, "COMMANDS"), root_1);
198 + if ( !(stream_commands.hasNext()) ) {
199 + throw new RewriteEarlyExitException();
201 + while ( stream_commands.hasNext() ) {
202 + adaptor.addChild(root_1, stream_commands.nextTree());
205 + stream_commands.reset();
207 adaptor.addChild(root_0, root_1);
212 + retval.tree = root_0;
215 + retval.stop = input.LT(-1);
218 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
219 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
222 catch (RecognitionException re) {
225 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
229 - retval.stop = input.LT(-1);
231 - retval.tree = adaptor.rulePostProcessing(root_0);
232 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
238 - // $ANTLR end program
239 + // $ANTLR end "program"
241 public static class commands_return extends ParserRuleReturnScope {
243 public Object getTree() { return tree; }
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 commands_return commands() throws RecognitionException {
250 - commands_return retval = new commands_return();
251 + // $ANTLR start "commands"
252 + // 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 );
253 + public final BstParser.commands_return commands() throws RecognitionException {
254 + BstParser.commands_return retval = new BstParser.commands_return();
255 retval.start = input.LT(1);
257 Object root_0 = null;
258 @@ -198,27 +214,27 @@ public class BstParser extends Parser {
259 Token char_literal26=null;
262 - idList_return idList3 = null;
263 + BstParser.idList_return idList3 = null;
265 - idList_return idList5 = null;
266 + BstParser.idList_return idList5 = null;
268 - id_return id7 = null;
269 + BstParser.id_return id7 = null;
271 - stack_return stack8 = null;
272 + BstParser.stack_return stack8 = null;
274 - id_return id10 = null;
275 + BstParser.id_return id10 = null;
277 - function_return function17 = null;
278 + BstParser.function_return function17 = null;
280 - function_return function21 = null;
281 + BstParser.function_return function21 = null;
283 - function_return function25 = null;
284 + BstParser.function_return function25 = null;
286 - idList0_return idList028 = null;
287 + BstParser.idList0_return idList028 = null;
289 - idList0_return idList029 = null;
290 + BstParser.idList0_return idList029 = null;
292 - idList0_return idList030 = null;
293 + BstParser.idList0_return idList030 = null;
296 Object STRINGS2_tree=null;
297 @@ -242,280 +258,294 @@ public class BstParser extends Parser {
298 Object SORT31_tree=null;
301 - // 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^^ )
302 + // 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 )
304 switch ( input.LA(1) ) {
356 NoViableAltException nvae =
357 - 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);
358 + new NoViableAltException("", 2, 0, input);
365 - // Bst.g:17:4: STRINGS^^ idList
366 + // Bst.g:17:4: STRINGS idList
368 - root_0 = adaptor.nil();
369 + root_0 = (Object)adaptor.nil();
371 - STRINGS2=input.LT(1);
372 - match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
373 - STRINGS2_tree = adaptor.create(STRINGS2);
374 - root_0 = adaptor.becomeRoot(STRINGS2_tree, root_0);
375 + STRINGS2=(Token)match(input,STRINGS,FOLLOW_STRINGS_in_commands65);
376 + STRINGS2_tree = (Object)adaptor.create(STRINGS2);
377 + root_0 = (Object)adaptor.becomeRoot(STRINGS2_tree, root_0);
379 pushFollow(FOLLOW_idList_in_commands68);
383 - adaptor.addChild(root_0, idList3.tree);
386 + adaptor.addChild(root_0, idList3.getTree());
391 - // Bst.g:18:4: INTEGERS^^ idList
392 + // Bst.g:18:4: INTEGERS idList
394 - root_0 = adaptor.nil();
395 + root_0 = (Object)adaptor.nil();
397 - INTEGERS4=input.LT(1);
398 - match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
399 - INTEGERS4_tree = adaptor.create(INTEGERS4);
400 - root_0 = adaptor.becomeRoot(INTEGERS4_tree, root_0);
401 + INTEGERS4=(Token)match(input,INTEGERS,FOLLOW_INTEGERS_in_commands73);
402 + INTEGERS4_tree = (Object)adaptor.create(INTEGERS4);
403 + root_0 = (Object)adaptor.becomeRoot(INTEGERS4_tree, root_0);
405 pushFollow(FOLLOW_idList_in_commands76);
409 - adaptor.addChild(root_0, idList5.tree);
412 + adaptor.addChild(root_0, idList5.getTree());
417 - // Bst.g:19:4: FUNCTION^^ id stack
418 + // Bst.g:19:4: FUNCTION id stack
420 - root_0 = adaptor.nil();
421 + root_0 = (Object)adaptor.nil();
423 - FUNCTION6=input.LT(1);
424 - match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
425 - FUNCTION6_tree = adaptor.create(FUNCTION6);
426 - root_0 = adaptor.becomeRoot(FUNCTION6_tree, root_0);
427 + FUNCTION6=(Token)match(input,FUNCTION,FOLLOW_FUNCTION_in_commands81);
428 + FUNCTION6_tree = (Object)adaptor.create(FUNCTION6);
429 + root_0 = (Object)adaptor.becomeRoot(FUNCTION6_tree, root_0);
431 pushFollow(FOLLOW_id_in_commands84);
435 - adaptor.addChild(root_0, id7.tree);
438 + adaptor.addChild(root_0, id7.getTree());
439 pushFollow(FOLLOW_stack_in_commands86);
443 - adaptor.addChild(root_0, stack8.tree);
446 + adaptor.addChild(root_0, stack8.getTree());
451 - // Bst.g:20:4: MACRO^^ id '{'! STRING '}'!
452 + // Bst.g:20:4: MACRO id '{' STRING '}'
454 - root_0 = adaptor.nil();
455 + root_0 = (Object)adaptor.nil();
457 - MACRO9=input.LT(1);
458 - match(input,MACRO,FOLLOW_MACRO_in_commands91);
459 - MACRO9_tree = adaptor.create(MACRO9);
460 - root_0 = adaptor.becomeRoot(MACRO9_tree, root_0);
461 + MACRO9=(Token)match(input,MACRO,FOLLOW_MACRO_in_commands91);
462 + MACRO9_tree = (Object)adaptor.create(MACRO9);
463 + root_0 = (Object)adaptor.becomeRoot(MACRO9_tree, root_0);
465 pushFollow(FOLLOW_id_in_commands94);
469 - adaptor.addChild(root_0, id10.tree);
470 - char_literal11=input.LT(1);
471 - match(input,25,FOLLOW_25_in_commands96);
472 - STRING12=input.LT(1);
473 - match(input,STRING,FOLLOW_STRING_in_commands99);
474 - STRING12_tree = adaptor.create(STRING12);
477 + adaptor.addChild(root_0, id10.getTree());
478 + char_literal11=(Token)match(input,25,FOLLOW_25_in_commands96);
479 + STRING12=(Token)match(input,STRING,FOLLOW_STRING_in_commands99);
480 + STRING12_tree = (Object)adaptor.create(STRING12);
481 adaptor.addChild(root_0, STRING12_tree);
483 - char_literal13=input.LT(1);
484 - match(input,26,FOLLOW_26_in_commands101);
485 + char_literal13=(Token)match(input,26,FOLLOW_26_in_commands101);
490 - // Bst.g:21:4: READ^^
491 + // Bst.g:21:4: READ
493 - root_0 = adaptor.nil();
494 + root_0 = (Object)adaptor.nil();
496 - READ14=input.LT(1);
497 - match(input,READ,FOLLOW_READ_in_commands107);
498 - READ14_tree = adaptor.create(READ14);
499 - root_0 = adaptor.becomeRoot(READ14_tree, root_0);
500 + READ14=(Token)match(input,READ,FOLLOW_READ_in_commands107);
501 + READ14_tree = (Object)adaptor.create(READ14);
502 + root_0 = (Object)adaptor.becomeRoot(READ14_tree, root_0);
508 - // Bst.g:22:4: EXECUTE^^ '{'! function '}'!
509 + // Bst.g:22:4: EXECUTE '{' function '}'
511 - root_0 = adaptor.nil();
512 + root_0 = (Object)adaptor.nil();
514 - EXECUTE15=input.LT(1);
515 - match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
516 - EXECUTE15_tree = adaptor.create(EXECUTE15);
517 - root_0 = adaptor.becomeRoot(EXECUTE15_tree, root_0);
518 + EXECUTE15=(Token)match(input,EXECUTE,FOLLOW_EXECUTE_in_commands113);
519 + EXECUTE15_tree = (Object)adaptor.create(EXECUTE15);
520 + root_0 = (Object)adaptor.becomeRoot(EXECUTE15_tree, root_0);
522 - char_literal16=input.LT(1);
523 - match(input,25,FOLLOW_25_in_commands116);
524 + char_literal16=(Token)match(input,25,FOLLOW_25_in_commands116);
525 pushFollow(FOLLOW_function_in_commands119);
526 function17=function();
529 - adaptor.addChild(root_0, function17.tree);
530 - char_literal18=input.LT(1);
531 - match(input,26,FOLLOW_26_in_commands121);
534 + adaptor.addChild(root_0, function17.getTree());
535 + char_literal18=(Token)match(input,26,FOLLOW_26_in_commands121);
540 - // Bst.g:23:4: ITERATE^^ '{'! function '}'!
541 + // Bst.g:23:4: ITERATE '{' function '}'
543 - root_0 = adaptor.nil();
544 + root_0 = (Object)adaptor.nil();
546 - ITERATE19=input.LT(1);
547 - match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
548 - ITERATE19_tree = adaptor.create(ITERATE19);
549 - root_0 = adaptor.becomeRoot(ITERATE19_tree, root_0);
550 + ITERATE19=(Token)match(input,ITERATE,FOLLOW_ITERATE_in_commands127);
551 + ITERATE19_tree = (Object)adaptor.create(ITERATE19);
552 + root_0 = (Object)adaptor.becomeRoot(ITERATE19_tree, root_0);
554 - char_literal20=input.LT(1);
555 - match(input,25,FOLLOW_25_in_commands130);
556 + char_literal20=(Token)match(input,25,FOLLOW_25_in_commands130);
557 pushFollow(FOLLOW_function_in_commands133);
558 function21=function();
561 - adaptor.addChild(root_0, function21.tree);
562 - char_literal22=input.LT(1);
563 - match(input,26,FOLLOW_26_in_commands135);
566 + adaptor.addChild(root_0, function21.getTree());
567 + char_literal22=(Token)match(input,26,FOLLOW_26_in_commands135);
572 - // Bst.g:24:4: REVERSE^^ '{'! function '}'!
573 + // Bst.g:24:4: REVERSE '{' function '}'
575 - root_0 = adaptor.nil();
576 + root_0 = (Object)adaptor.nil();
578 - REVERSE23=input.LT(1);
579 - match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
580 - REVERSE23_tree = adaptor.create(REVERSE23);
581 - root_0 = adaptor.becomeRoot(REVERSE23_tree, root_0);
582 + REVERSE23=(Token)match(input,REVERSE,FOLLOW_REVERSE_in_commands141);
583 + REVERSE23_tree = (Object)adaptor.create(REVERSE23);
584 + root_0 = (Object)adaptor.becomeRoot(REVERSE23_tree, root_0);
586 - char_literal24=input.LT(1);
587 - match(input,25,FOLLOW_25_in_commands144);
588 + char_literal24=(Token)match(input,25,FOLLOW_25_in_commands144);
589 pushFollow(FOLLOW_function_in_commands147);
590 function25=function();
593 - adaptor.addChild(root_0, function25.tree);
594 - char_literal26=input.LT(1);
595 - match(input,26,FOLLOW_26_in_commands149);
598 + adaptor.addChild(root_0, function25.getTree());
599 + char_literal26=(Token)match(input,26,FOLLOW_26_in_commands149);
604 - // Bst.g:25:4: ENTRY^^ idList0 idList0 idList0
605 + // Bst.g:25:4: ENTRY idList0 idList0 idList0
607 - root_0 = adaptor.nil();
608 + root_0 = (Object)adaptor.nil();
610 - ENTRY27=input.LT(1);
611 - match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
612 - ENTRY27_tree = adaptor.create(ENTRY27);
613 - root_0 = adaptor.becomeRoot(ENTRY27_tree, root_0);
614 + ENTRY27=(Token)match(input,ENTRY,FOLLOW_ENTRY_in_commands155);
615 + ENTRY27_tree = (Object)adaptor.create(ENTRY27);
616 + root_0 = (Object)adaptor.becomeRoot(ENTRY27_tree, root_0);
618 pushFollow(FOLLOW_idList0_in_commands158);
622 - adaptor.addChild(root_0, idList028.tree);
625 + adaptor.addChild(root_0, idList028.getTree());
626 pushFollow(FOLLOW_idList0_in_commands160);
630 - adaptor.addChild(root_0, idList029.tree);
633 + adaptor.addChild(root_0, idList029.getTree());
634 pushFollow(FOLLOW_idList0_in_commands162);
638 - adaptor.addChild(root_0, idList030.tree);
641 + adaptor.addChild(root_0, idList030.getTree());
646 - // Bst.g:26:4: SORT^^
647 + // Bst.g:26:4: SORT
649 - root_0 = adaptor.nil();
650 + root_0 = (Object)adaptor.nil();
652 - SORT31=input.LT(1);
653 - match(input,SORT,FOLLOW_SORT_in_commands167);
654 - SORT31_tree = adaptor.create(SORT31);
655 - root_0 = adaptor.becomeRoot(SORT31_tree, root_0);
656 + SORT31=(Token)match(input,SORT,FOLLOW_SORT_in_commands167);
657 + SORT31_tree = (Object)adaptor.create(SORT31);
658 + root_0 = (Object)adaptor.becomeRoot(SORT31_tree, root_0);
665 + retval.stop = input.LT(-1);
667 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
668 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
671 catch (RecognitionException re) {
674 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
678 - retval.stop = input.LT(-1);
680 - retval.tree = adaptor.rulePostProcessing(root_0);
681 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
687 - // $ANTLR end commands
688 + // $ANTLR end "commands"
690 public static class identifier_return extends ParserRuleReturnScope {
692 public Object getTree() { return tree; }
696 - // $ANTLR start identifier
697 + // $ANTLR start "identifier"
698 // Bst.g:28:1: identifier : IDENTIFIER ;
699 - public identifier_return identifier() throws RecognitionException {
700 - identifier_return retval = new identifier_return();
701 + public final BstParser.identifier_return identifier() throws RecognitionException {
702 + BstParser.identifier_return retval = new BstParser.identifier_return();
703 retval.start = input.LT(1);
705 Object root_0 = null;
706 @@ -525,121 +555,121 @@ public class BstParser extends Parser {
707 Object IDENTIFIER32_tree=null;
710 - // Bst.g:29:4: ( IDENTIFIER )
711 + // Bst.g:29:2: ( IDENTIFIER )
712 // Bst.g:29:4: IDENTIFIER
714 - root_0 = adaptor.nil();
715 + root_0 = (Object)adaptor.nil();
717 - IDENTIFIER32=input.LT(1);
718 - match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
719 - IDENTIFIER32_tree = adaptor.create(IDENTIFIER32);
720 + IDENTIFIER32=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_identifier178);
721 + IDENTIFIER32_tree = (Object)adaptor.create(IDENTIFIER32);
722 adaptor.addChild(root_0, IDENTIFIER32_tree);
727 + retval.stop = input.LT(-1);
729 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
730 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
733 catch (RecognitionException re) {
736 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
740 - retval.stop = input.LT(-1);
742 - retval.tree = adaptor.rulePostProcessing(root_0);
743 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
749 - // $ANTLR end identifier
750 + // $ANTLR end "identifier"
752 public static class id_return extends ParserRuleReturnScope {
754 public Object getTree() { return tree; }
759 - // Bst.g:31:1: id : '{'! identifier '}'! ;
760 - public id_return id() throws RecognitionException {
761 - id_return retval = new id_return();
762 + // $ANTLR start "id"
763 + // Bst.g:31:1: id : '{' identifier '}' ;
764 + public final BstParser.id_return id() throws RecognitionException {
765 + BstParser.id_return retval = new BstParser.id_return();
766 retval.start = input.LT(1);
768 Object root_0 = null;
770 Token char_literal33=null;
771 Token char_literal35=null;
772 - identifier_return identifier34 = null;
773 + BstParser.identifier_return identifier34 = null;
776 Object char_literal33_tree=null;
777 Object char_literal35_tree=null;
780 - // Bst.g:32:4: ( '{'! identifier '}'! )
781 - // Bst.g:32:4: '{'! identifier '}'!
782 + // Bst.g:32:2: ( '{' identifier '}' )
783 + // Bst.g:32:4: '{' identifier '}'
785 - root_0 = adaptor.nil();
786 + root_0 = (Object)adaptor.nil();
788 - char_literal33=input.LT(1);
789 - match(input,25,FOLLOW_25_in_id188);
790 + char_literal33=(Token)match(input,25,FOLLOW_25_in_id188);
791 pushFollow(FOLLOW_identifier_in_id191);
792 identifier34=identifier();
795 - adaptor.addChild(root_0, identifier34.tree);
796 - char_literal35=input.LT(1);
797 - match(input,26,FOLLOW_26_in_id193);
800 + adaptor.addChild(root_0, identifier34.getTree());
801 + char_literal35=(Token)match(input,26,FOLLOW_26_in_id193);
805 + retval.stop = input.LT(-1);
807 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
808 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
811 catch (RecognitionException re) {
814 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
818 - retval.stop = input.LT(-1);
820 - retval.tree = adaptor.rulePostProcessing(root_0);
821 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
830 public static class idList_return extends ParserRuleReturnScope {
832 public Object getTree() { return tree; }
836 - // $ANTLR start idList
837 + // $ANTLR start "idList"
838 // Bst.g:34:1: idList : '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) ;
840 - public idList_return idList() throws RecognitionException {
841 - idList_return retval = new idList_return();
842 + public final BstParser.idList_return idList() throws RecognitionException {
843 + BstParser.idList_return retval = new BstParser.idList_return();
844 retval.start = input.LT(1);
846 Object root_0 = null;
848 Token char_literal36=null;
849 Token char_literal38=null;
850 - identifier_return identifier37 = null;
851 + BstParser.identifier_return identifier37 = null;
854 - List list_identifier=new ArrayList();
855 - List list_26=new ArrayList();
856 - List list_25=new ArrayList();
857 Object char_literal36_tree=null;
858 Object char_literal38_tree=null;
860 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
861 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
862 + RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
864 - // Bst.g:35:4: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
865 + // Bst.g:35:2: ( '{' ( identifier )+ '}' -> ^( IDLIST ( identifier )+ ) )
866 // Bst.g:35:4: '{' ( identifier )+ '}'
868 - char_literal36=input.LT(1);
869 - match(input,25,FOLLOW_25_in_idList205);
870 - list_25.add(char_literal36);
871 + char_literal36=(Token)match(input,25,FOLLOW_25_in_idList205);
872 + stream_25.add(char_literal36);
874 // Bst.g:35:8: ( identifier )+
876 @@ -647,6 +677,7 @@ public class BstParser extends Parser {
879 int LA3_0 = input.LA(1);
881 if ( (LA3_0==IDENTIFIER) ) {
884 @@ -658,9 +689,10 @@ public class BstParser extends Parser {
886 pushFollow(FOLLOW_identifier_in_idList207);
887 identifier37=identifier();
890 - list_identifier.add(identifier37.tree);
893 + stream_identifier.add(identifier37.getTree());
897 @@ -674,96 +706,100 @@ public class BstParser extends Parser {
901 - char_literal38=input.LT(1);
902 - match(input,26,FOLLOW_26_in_idList210);
903 - list_26.add(char_literal38);
904 + char_literal38=(Token)match(input,26,FOLLOW_26_in_idList210);
905 + stream_26.add(char_literal38);
911 + // elements: identifier
913 + // rule labels: retval
914 + // token list labels:
915 + // rule list labels:
916 + // wildcard labels:
917 retval.tree = root_0;
918 - root_0 = adaptor.nil();
919 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
921 + root_0 = (Object)adaptor.nil();
922 // 35:24: -> ^( IDLIST ( identifier )+ )
924 // Bst.g:35:27: ^( IDLIST ( identifier )+ )
926 - Object root_1 = adaptor.nil();
927 - root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
929 - // Bst.g:35:36: ( identifier )+
931 - int n_1 = list_identifier == null ? 0 : list_identifier.size();
935 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
936 - for (int i_1=0; i_1<n_1; i_1++) {
937 - adaptor.addChild(root_1, list_identifier.get(i_1));
938 + Object root_1 = (Object)adaptor.nil();
939 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
941 + if ( !(stream_identifier.hasNext()) ) {
942 + throw new RewriteEarlyExitException();
944 + while ( stream_identifier.hasNext() ) {
945 + adaptor.addChild(root_1, stream_identifier.nextTree());
948 + stream_identifier.reset();
950 adaptor.addChild(root_0, root_1);
955 + retval.tree = root_0;
958 + retval.stop = input.LT(-1);
961 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
962 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
965 catch (RecognitionException re) {
968 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
972 - retval.stop = input.LT(-1);
974 - retval.tree = adaptor.rulePostProcessing(root_0);
975 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
981 - // $ANTLR end idList
982 + // $ANTLR end "idList"
984 public static class idList0_return extends ParserRuleReturnScope {
986 public Object getTree() { return tree; }
990 - // $ANTLR start idList0
991 + // $ANTLR start "idList0"
992 // Bst.g:37:1: idList0 : '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) ;
993 - public idList0_return idList0() throws RecognitionException {
994 - idList0_return retval = new idList0_return();
995 + public final BstParser.idList0_return idList0() throws RecognitionException {
996 + BstParser.idList0_return retval = new BstParser.idList0_return();
997 retval.start = input.LT(1);
999 Object root_0 = null;
1001 Token char_literal39=null;
1002 Token char_literal41=null;
1003 - identifier_return identifier40 = null;
1004 + BstParser.identifier_return identifier40 = null;
1007 - List list_identifier=new ArrayList();
1008 - List list_26=new ArrayList();
1009 - List list_25=new ArrayList();
1010 Object char_literal39_tree=null;
1011 Object char_literal41_tree=null;
1013 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
1014 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
1015 + RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");
1017 - // Bst.g:38:4: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
1018 + // Bst.g:38:2: ( '{' ( identifier )* '}' -> ^( IDLIST ( identifier )* ) )
1019 // Bst.g:38:4: '{' ( identifier )* '}'
1021 - char_literal39=input.LT(1);
1022 - match(input,25,FOLLOW_25_in_idList0230);
1023 - list_25.add(char_literal39);
1024 + char_literal39=(Token)match(input,25,FOLLOW_25_in_idList0230);
1025 + stream_25.add(char_literal39);
1027 // Bst.g:38:8: ( identifier )*
1031 int LA4_0 = input.LA(1);
1033 if ( (LA4_0==IDENTIFIER) ) {
1036 @@ -775,9 +811,10 @@ public class BstParser extends Parser {
1038 pushFollow(FOLLOW_identifier_in_idList0232);
1039 identifier40=identifier();
1042 - list_identifier.add(identifier40.tree);
1045 + stream_identifier.add(identifier40.getTree());
1049 @@ -787,68 +824,71 @@ public class BstParser extends Parser {
1053 - char_literal41=input.LT(1);
1054 - match(input,26,FOLLOW_26_in_idList0235);
1055 - list_26.add(char_literal41);
1056 + char_literal41=(Token)match(input,26,FOLLOW_26_in_idList0235);
1057 + stream_26.add(char_literal41);
1063 + // elements: identifier
1065 + // rule labels: retval
1066 + // token list labels:
1067 + // rule list labels:
1068 + // wildcard labels:
1069 retval.tree = root_0;
1070 - root_0 = adaptor.nil();
1071 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1073 + root_0 = (Object)adaptor.nil();
1074 // 38:24: -> ^( IDLIST ( identifier )* )
1076 // Bst.g:38:27: ^( IDLIST ( identifier )* )
1078 - Object root_1 = adaptor.nil();
1079 - root_1 = adaptor.becomeRoot(adaptor.create(IDLIST, "IDLIST"), root_1);
1080 + Object root_1 = (Object)adaptor.nil();
1081 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(IDLIST, "IDLIST"), root_1);
1083 // Bst.g:38:36: ( identifier )*
1085 - int n_1 = list_identifier == null ? 0 : list_identifier.size();
1088 + while ( stream_identifier.hasNext() ) {
1089 + adaptor.addChild(root_1, stream_identifier.nextTree());
1091 - for (int i_1=0; i_1<n_1; i_1++) {
1092 - adaptor.addChild(root_1, list_identifier.get(i_1));
1096 + stream_identifier.reset();
1098 adaptor.addChild(root_0, root_1);
1103 + retval.tree = root_0;
1106 + retval.stop = input.LT(-1);
1109 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1110 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1113 catch (RecognitionException re) {
1116 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1120 - retval.stop = input.LT(-1);
1122 - retval.tree = adaptor.rulePostProcessing(root_0);
1123 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1129 - // $ANTLR end idList0
1130 + // $ANTLR end "idList0"
1132 public static class function_return extends ParserRuleReturnScope {
1134 public Object getTree() { return tree; }
1138 - // $ANTLR start function
1139 + // $ANTLR start "function"
1140 // Bst.g:40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );
1141 - public function_return function() throws RecognitionException {
1142 - function_return retval = new function_return();
1143 + public final BstParser.function_return function() throws RecognitionException {
1144 + BstParser.function_return retval = new BstParser.function_return();
1145 retval.start = input.LT(1);
1147 Object root_0 = null;
1148 @@ -860,7 +900,7 @@ public class BstParser extends Parser {
1149 Token char_literal46=null;
1150 Token string_literal47=null;
1151 Token char_literal48=null;
1152 - identifier_return identifier49 = null;
1153 + BstParser.identifier_return identifier49 = null;
1156 Object char_literal42_tree=null;
1157 @@ -872,36 +912,52 @@ public class BstParser extends Parser {
1158 Object char_literal48_tree=null;
1161 - // Bst.g:41:4: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
1162 + // Bst.g:41:2: ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier )
1164 switch ( input.LA(1) ) {
1206 NoViableAltException nvae =
1207 - new NoViableAltException("40:1: function : ( '<' | '>' | '=' | '+' | '-' | ':=' | '*' | identifier );", 5, 0, input);
1208 + new NoViableAltException("", 5, 0, input);
1212 @@ -910,11 +966,10 @@ public class BstParser extends Parser {
1216 - root_0 = adaptor.nil();
1217 + root_0 = (Object)adaptor.nil();
1219 - char_literal42=input.LT(1);
1220 - match(input,27,FOLLOW_27_in_function254);
1221 - char_literal42_tree = adaptor.create(char_literal42);
1222 + char_literal42=(Token)match(input,27,FOLLOW_27_in_function254);
1223 + char_literal42_tree = (Object)adaptor.create(char_literal42);
1224 adaptor.addChild(root_0, char_literal42_tree);
1227 @@ -923,11 +978,10 @@ public class BstParser extends Parser {
1231 - root_0 = adaptor.nil();
1232 + root_0 = (Object)adaptor.nil();
1234 - char_literal43=input.LT(1);
1235 - match(input,28,FOLLOW_28_in_function258);
1236 - char_literal43_tree = adaptor.create(char_literal43);
1237 + char_literal43=(Token)match(input,28,FOLLOW_28_in_function258);
1238 + char_literal43_tree = (Object)adaptor.create(char_literal43);
1239 adaptor.addChild(root_0, char_literal43_tree);
1242 @@ -936,11 +990,10 @@ public class BstParser extends Parser {
1246 - root_0 = adaptor.nil();
1247 + root_0 = (Object)adaptor.nil();
1249 - char_literal44=input.LT(1);
1250 - match(input,29,FOLLOW_29_in_function262);
1251 - char_literal44_tree = adaptor.create(char_literal44);
1252 + char_literal44=(Token)match(input,29,FOLLOW_29_in_function262);
1253 + char_literal44_tree = (Object)adaptor.create(char_literal44);
1254 adaptor.addChild(root_0, char_literal44_tree);
1257 @@ -949,11 +1002,10 @@ public class BstParser extends Parser {
1261 - root_0 = adaptor.nil();
1262 + root_0 = (Object)adaptor.nil();
1264 - char_literal45=input.LT(1);
1265 - match(input,30,FOLLOW_30_in_function266);
1266 - char_literal45_tree = adaptor.create(char_literal45);
1267 + char_literal45=(Token)match(input,30,FOLLOW_30_in_function266);
1268 + char_literal45_tree = (Object)adaptor.create(char_literal45);
1269 adaptor.addChild(root_0, char_literal45_tree);
1272 @@ -962,11 +1014,10 @@ public class BstParser extends Parser {
1276 - root_0 = adaptor.nil();
1277 + root_0 = (Object)adaptor.nil();
1279 - char_literal46=input.LT(1);
1280 - match(input,31,FOLLOW_31_in_function270);
1281 - char_literal46_tree = adaptor.create(char_literal46);
1282 + char_literal46=(Token)match(input,31,FOLLOW_31_in_function270);
1283 + char_literal46_tree = (Object)adaptor.create(char_literal46);
1284 adaptor.addChild(root_0, char_literal46_tree);
1287 @@ -975,11 +1026,10 @@ public class BstParser extends Parser {
1289 // Bst.g:41:34: ':='
1291 - root_0 = adaptor.nil();
1292 + root_0 = (Object)adaptor.nil();
1294 - string_literal47=input.LT(1);
1295 - match(input,32,FOLLOW_32_in_function274);
1296 - string_literal47_tree = adaptor.create(string_literal47);
1297 + string_literal47=(Token)match(input,32,FOLLOW_32_in_function274);
1298 + string_literal47_tree = (Object)adaptor.create(string_literal47);
1299 adaptor.addChild(root_0, string_literal47_tree);
1302 @@ -988,11 +1038,10 @@ public class BstParser extends Parser {
1306 - root_0 = adaptor.nil();
1307 + root_0 = (Object)adaptor.nil();
1309 - char_literal48=input.LT(1);
1310 - match(input,33,FOLLOW_33_in_function278);
1311 - char_literal48_tree = adaptor.create(char_literal48);
1312 + char_literal48=(Token)match(input,33,FOLLOW_33_in_function278);
1313 + char_literal48_tree = (Object)adaptor.create(char_literal48);
1314 adaptor.addChild(root_0, char_literal48_tree);
1317 @@ -1001,64 +1050,66 @@ public class BstParser extends Parser {
1319 // Bst.g:41:47: identifier
1321 - root_0 = adaptor.nil();
1322 + root_0 = (Object)adaptor.nil();
1324 pushFollow(FOLLOW_identifier_in_function282);
1325 identifier49=identifier();
1328 - adaptor.addChild(root_0, identifier49.tree);
1331 + adaptor.addChild(root_0, identifier49.getTree());
1337 + retval.stop = input.LT(-1);
1339 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1340 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1343 catch (RecognitionException re) {
1346 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1350 - retval.stop = input.LT(-1);
1352 - retval.tree = adaptor.rulePostProcessing(root_0);
1353 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1359 - // $ANTLR end function
1360 + // $ANTLR end "function"
1362 public static class stack_return extends ParserRuleReturnScope {
1364 public Object getTree() { return tree; }
1368 - // $ANTLR start stack
1369 + // $ANTLR start "stack"
1370 // Bst.g:43:1: stack : '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) ;
1371 - public stack_return stack() throws RecognitionException {
1372 - stack_return retval = new stack_return();
1373 + public final BstParser.stack_return stack() throws RecognitionException {
1374 + BstParser.stack_return retval = new BstParser.stack_return();
1375 retval.start = input.LT(1);
1377 Object root_0 = null;
1379 Token char_literal50=null;
1380 Token char_literal52=null;
1381 - stackitem_return stackitem51 = null;
1382 + BstParser.stackitem_return stackitem51 = null;
1385 - List list_stackitem=new ArrayList();
1386 - List list_26=new ArrayList();
1387 - List list_25=new ArrayList();
1388 Object char_literal50_tree=null;
1389 Object char_literal52_tree=null;
1391 + RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
1392 + RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
1393 + RewriteRuleSubtreeStream stream_stackitem=new RewriteRuleSubtreeStream(adaptor,"rule stackitem");
1395 - // Bst.g:44:4: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
1396 + // Bst.g:44:2: ( '{' ( stackitem )+ '}' -> ^( STACK ( stackitem )+ ) )
1397 // Bst.g:44:4: '{' ( stackitem )+ '}'
1399 - char_literal50=input.LT(1);
1400 - match(input,25,FOLLOW_25_in_stack293);
1401 - list_25.add(char_literal50);
1402 + char_literal50=(Token)match(input,25,FOLLOW_25_in_stack293);
1403 + stream_25.add(char_literal50);
1405 // Bst.g:44:8: ( stackitem )+
1407 @@ -1066,6 +1117,7 @@ public class BstParser extends Parser {
1410 int LA6_0 = input.LA(1);
1412 if ( (LA6_0==STRING||(LA6_0>=IDENTIFIER && LA6_0<=QUOTED)||LA6_0==25||(LA6_0>=27 && LA6_0<=33)) ) {
1415 @@ -1077,9 +1129,10 @@ public class BstParser extends Parser {
1417 pushFollow(FOLLOW_stackitem_in_stack295);
1418 stackitem51=stackitem();
1421 - list_stackitem.add(stackitem51.tree);
1424 + stream_stackitem.add(stackitem51.getTree());
1428 @@ -1093,69 +1146,73 @@ public class BstParser extends Parser {
1432 - char_literal52=input.LT(1);
1433 - match(input,26,FOLLOW_26_in_stack298);
1434 - list_26.add(char_literal52);
1435 + char_literal52=(Token)match(input,26,FOLLOW_26_in_stack298);
1436 + stream_26.add(char_literal52);
1442 + // elements: stackitem
1444 + // rule labels: retval
1445 + // token list labels:
1446 + // rule list labels:
1447 + // wildcard labels:
1448 retval.tree = root_0;
1449 - root_0 = adaptor.nil();
1450 + RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1452 + root_0 = (Object)adaptor.nil();
1453 // 44:23: -> ^( STACK ( stackitem )+ )
1455 // Bst.g:44:26: ^( STACK ( stackitem )+ )
1457 - Object root_1 = adaptor.nil();
1458 - root_1 = adaptor.becomeRoot(adaptor.create(STACK, "STACK"), root_1);
1460 - // Bst.g:44:34: ( stackitem )+
1462 - int n_1 = list_stackitem == null ? 0 : list_stackitem.size();
1466 - if ( n_1==0 ) throw new RuntimeException("Must have more than one element for (...)+ loops");
1467 - for (int i_1=0; i_1<n_1; i_1++) {
1468 - adaptor.addChild(root_1, list_stackitem.get(i_1));
1469 + Object root_1 = (Object)adaptor.nil();
1470 + root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(STACK, "STACK"), root_1);
1472 + if ( !(stream_stackitem.hasNext()) ) {
1473 + throw new RewriteEarlyExitException();
1475 + while ( stream_stackitem.hasNext() ) {
1476 + adaptor.addChild(root_1, stream_stackitem.nextTree());
1479 + stream_stackitem.reset();
1481 adaptor.addChild(root_0, root_1);
1486 + retval.tree = root_0;
1489 + retval.stop = input.LT(-1);
1492 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1493 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1496 catch (RecognitionException re) {
1499 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1503 - retval.stop = input.LT(-1);
1505 - retval.tree = adaptor.rulePostProcessing(root_0);
1506 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1512 - // $ANTLR end stack
1513 + // $ANTLR end "stack"
1515 public static class stackitem_return extends ParserRuleReturnScope {
1517 public Object getTree() { return tree; }
1521 - // $ANTLR start stackitem
1522 + // $ANTLR start "stackitem"
1523 // Bst.g:46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );
1524 - public stackitem_return stackitem() throws RecognitionException {
1525 - stackitem_return retval = new stackitem_return();
1526 + public final BstParser.stackitem_return stackitem() throws RecognitionException {
1527 + BstParser.stackitem_return retval = new BstParser.stackitem_return();
1528 retval.start = input.LT(1);
1530 Object root_0 = null;
1531 @@ -1163,9 +1220,9 @@ public class BstParser extends Parser {
1532 Token STRING54=null;
1533 Token INTEGER55=null;
1534 Token QUOTED56=null;
1535 - function_return function53 = null;
1536 + BstParser.function_return function53 = null;
1538 - stack_return stack57 = null;
1539 + BstParser.stack_return stack57 = null;
1542 Object STRING54_tree=null;
1543 @@ -1173,7 +1230,7 @@ public class BstParser extends Parser {
1544 Object QUOTED56_tree=null;
1547 - // Bst.g:47:4: ( function | STRING | INTEGER | QUOTED | stack )
1548 + // Bst.g:47:2: ( function | STRING | INTEGER | QUOTED | stack )
1550 switch ( input.LA(1) ) {
1552 @@ -1184,23 +1241,33 @@ public class BstParser extends Parser {
1581 NoViableAltException nvae =
1582 - new NoViableAltException("46:1: stackitem : ( function | STRING | INTEGER | QUOTED | stack );", 7, 0, input);
1583 + new NoViableAltException("", 7, 0, input);
1587 @@ -1209,24 +1276,24 @@ public class BstParser extends Parser {
1589 // Bst.g:47:4: function
1591 - root_0 = adaptor.nil();
1592 + root_0 = (Object)adaptor.nil();
1594 pushFollow(FOLLOW_function_in_stackitem317);
1595 function53=function();
1598 - adaptor.addChild(root_0, function53.tree);
1601 + adaptor.addChild(root_0, function53.getTree());
1606 // Bst.g:48:4: STRING
1608 - root_0 = adaptor.nil();
1609 + root_0 = (Object)adaptor.nil();
1611 - STRING54=input.LT(1);
1612 - match(input,STRING,FOLLOW_STRING_in_stackitem322);
1613 - STRING54_tree = adaptor.create(STRING54);
1614 + STRING54=(Token)match(input,STRING,FOLLOW_STRING_in_stackitem322);
1615 + STRING54_tree = (Object)adaptor.create(STRING54);
1616 adaptor.addChild(root_0, STRING54_tree);
1619 @@ -1235,11 +1302,10 @@ public class BstParser extends Parser {
1621 // Bst.g:49:4: INTEGER
1623 - root_0 = adaptor.nil();
1624 + root_0 = (Object)adaptor.nil();
1626 - INTEGER55=input.LT(1);
1627 - match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
1628 - INTEGER55_tree = adaptor.create(INTEGER55);
1629 + INTEGER55=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_stackitem328);
1630 + INTEGER55_tree = (Object)adaptor.create(INTEGER55);
1631 adaptor.addChild(root_0, INTEGER55_tree);
1634 @@ -1248,11 +1314,10 @@ public class BstParser extends Parser {
1636 // Bst.g:50:4: QUOTED
1638 - root_0 = adaptor.nil();
1639 + root_0 = (Object)adaptor.nil();
1641 - QUOTED56=input.LT(1);
1642 - match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
1643 - QUOTED56_tree = adaptor.create(QUOTED56);
1644 + QUOTED56=(Token)match(input,QUOTED,FOLLOW_QUOTED_in_stackitem334);
1645 + QUOTED56_tree = (Object)adaptor.create(QUOTED56);
1646 adaptor.addChild(root_0, QUOTED56_tree);
1649 @@ -1261,33 +1326,38 @@ public class BstParser extends Parser {
1651 // Bst.g:51:4: stack
1653 - root_0 = adaptor.nil();
1654 + root_0 = (Object)adaptor.nil();
1656 pushFollow(FOLLOW_stack_in_stackitem339);
1660 - adaptor.addChild(root_0, stack57.tree);
1663 + adaptor.addChild(root_0, stack57.getTree());
1669 + retval.stop = input.LT(-1);
1671 + retval.tree = (Object)adaptor.rulePostProcessing(root_0);
1672 + adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1675 catch (RecognitionException re) {
1678 + retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
1682 - retval.stop = input.LT(-1);
1684 - retval.tree = adaptor.rulePostProcessing(root_0);
1685 - adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1691 - // $ANTLR end stackitem
1692 + // $ANTLR end "stackitem"
1694 + // Delegated rules
1698 @@ -1324,14 +1394,14 @@ public class BstParser extends Parser {
1699 public static final BitSet FOLLOW_idList0_in_commands162 = new BitSet(new long[]{0x0000000000000002L});
1700 public static final BitSet FOLLOW_SORT_in_commands167 = new BitSet(new long[]{0x0000000000000002L});
1701 public static final BitSet FOLLOW_IDENTIFIER_in_identifier178 = new BitSet(new long[]{0x0000000000000002L});
1702 - public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x0000000000040000L});
1703 + public static final BitSet FOLLOW_25_in_id188 = new BitSet(new long[]{0x00000003F8040000L});
1704 public static final BitSet FOLLOW_identifier_in_id191 = new BitSet(new long[]{0x0000000004000000L});
1705 public static final BitSet FOLLOW_26_in_id193 = new BitSet(new long[]{0x0000000000000002L});
1706 - public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x0000000000040000L});
1707 - public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x0000000004040000L});
1708 + public static final BitSet FOLLOW_25_in_idList205 = new BitSet(new long[]{0x00000003F8040000L});
1709 + public static final BitSet FOLLOW_identifier_in_idList207 = new BitSet(new long[]{0x00000003FC040000L});
1710 public static final BitSet FOLLOW_26_in_idList210 = new BitSet(new long[]{0x0000000000000002L});
1711 - public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x0000000004040000L});
1712 - public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x0000000004040000L});
1713 + public static final BitSet FOLLOW_25_in_idList0230 = new BitSet(new long[]{0x00000003FC040000L});
1714 + public static final BitSet FOLLOW_identifier_in_idList0232 = new BitSet(new long[]{0x00000003FC040000L});
1715 public static final BitSet FOLLOW_26_in_idList0235 = new BitSet(new long[]{0x0000000000000002L});
1716 public static final BitSet FOLLOW_27_in_function254 = new BitSet(new long[]{0x0000000000000002L});
1717 public static final BitSet FOLLOW_28_in_function258 = new BitSet(new long[]{0x0000000000000002L});
1718 @@ -1350,4 +1420,4 @@ public class BstParser extends Parser {
1719 public static final BitSet FOLLOW_QUOTED_in_stackitem334 = new BitSet(new long[]{0x0000000000000002L});
1720 public static final BitSet FOLLOW_stack_in_stackitem339 = new BitSet(new long[]{0x0000000000000002L});
1723 \ No newline at end of file
1725 --- a/src/java/net/sf/jabref/bst/BstLexer.java
1726 +++ b/src/java/net/sf/jabref/bst/BstLexer.java
1728 package net.sf.jabref.bst;
1730 -// $ANTLR 3.0b5 Bst.g 2006-11-23 23:20:24
1731 +// $ANTLR 3.2 debian-4 Bst.g 2010-08-02 19:59:11
1733 -import org.antlr.runtime.CharStream;
1734 -import org.antlr.runtime.EarlyExitException;
1735 -import org.antlr.runtime.Lexer;
1736 -import org.antlr.runtime.MismatchedSetException;
1737 -import org.antlr.runtime.NoViableAltException;
1738 -import org.antlr.runtime.RecognitionException;
1739 -import org.antlr.runtime.Token;
1740 +import org.antlr.runtime.*;
1741 +import java.util.Stack;
1742 +import java.util.List;
1743 +import java.util.ArrayList;
1745 public class BstLexer extends Lexer {
1746 + public static final int FUNCTION=10;
1747 + public static final int INTEGER=19;
1748 + public static final int T__29=29;
1749 + public static final int T__28=28;
1750 + public static final int T__27=27;
1751 + public static final int T__26=26;
1752 + public static final int LINE_COMMENT=24;
1753 + public static final int QUOTED=20;
1754 + public static final int T__25=25;
1755 public static final int LETTER=21;
1756 - public static final int T29=29;
1757 - public static final int T33=33;
1758 - public static final int INTEGERS=9;
1759 - public static final int ENTRY=6;
1760 - public static final int WS=23;
1761 - public static final int COMMANDS=7;
1762 - public static final int STRING=12;
1763 - public static final int T28=28;
1764 public static final int EXECUTE=14;
1765 - public static final int LINE_COMMENT=24;
1766 + public static final int STRINGS=8;
1767 public static final int SORT=17;
1768 - public static final int STACK=5;
1769 - public static final int REVERSE=16;
1770 - public static final int QUOTED=20;
1771 - public static final int T25=25;
1772 - public static final int INTEGER=19;
1773 - public static final int ITERATE=15;
1774 - public static final int FUNCTION=10;
1775 - public static final int T26=26;
1776 + public static final int ENTRY=6;
1777 public static final int EOF=-1;
1778 - public static final int T32=32;
1779 - public static final int Tokens=34;
1780 - public static final int STRINGS=8;
1781 - public static final int T31=31;
1782 - public static final int T27=27;
1783 + public static final int INTEGERS=9;
1784 + public static final int T__30=30;
1785 + public static final int T__31=31;
1786 + public static final int ITERATE=15;
1787 + public static final int T__32=32;
1788 + public static final int T__33=33;
1789 + public static final int WS=23;
1790 + public static final int COMMANDS=7;
1791 + public static final int READ=13;
1792 public static final int IDENTIFIER=18;
1793 - public static final int MACRO=11;
1794 - public static final int T30=30;
1795 public static final int IDLIST=4;
1796 public static final int NUMERAL=22;
1797 - public static final int READ=13;
1798 - public BstLexer() {
1801 + public static final int STACK=5;
1802 + public static final int REVERSE=16;
1803 + public static final int MACRO=11;
1804 + public static final int STRING=12;
1809 + public BstLexer() {;}
1810 public BstLexer(CharStream input) {
1812 + this(input, new RecognizerSharedState());
1814 + public BstLexer(CharStream input, RecognizerSharedState state) {
1815 + super(input,state);
1818 public String getGrammarFileName() { return "Bst.g"; }
1820 - // $ANTLR start T25
1821 - public void mT25() throws RecognitionException {
1822 + // $ANTLR start "T__25"
1823 + public final void mT__25() throws RecognitionException {
1825 - ruleNestingLevel++;
1827 - int _start = getCharIndex();
1828 - int _line = getLine();
1829 - int _charPosition = getCharPositionInLine();
1830 - int _channel = Token.DEFAULT_CHANNEL;
1831 + int _type = T__25;
1832 + int _channel = DEFAULT_TOKEN_CHANNEL;
1833 // Bst.g:3:7: ( '{' )
1843 - if ( token==null && ruleNestingLevel==1 ) {
1844 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1848 + state.type = _type;
1849 + state.channel = _channel;
1852 - ruleNestingLevel--;
1856 + // $ANTLR end "T__25"
1858 - // $ANTLR start T26
1859 - public void mT26() throws RecognitionException {
1860 + // $ANTLR start "T__26"
1861 + public final void mT__26() throws RecognitionException {
1863 - ruleNestingLevel++;
1865 - int _start = getCharIndex();
1866 - int _line = getLine();
1867 - int _charPosition = getCharPositionInLine();
1868 - int _channel = Token.DEFAULT_CHANNEL;
1869 + int _type = T__26;
1870 + int _channel = DEFAULT_TOKEN_CHANNEL;
1871 // Bst.g:4:7: ( '}' )
1881 - if ( token==null && ruleNestingLevel==1 ) {
1882 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1886 + state.type = _type;
1887 + state.channel = _channel;
1890 - ruleNestingLevel--;
1894 + // $ANTLR end "T__26"
1896 - // $ANTLR start T27
1897 - public void mT27() throws RecognitionException {
1898 + // $ANTLR start "T__27"
1899 + public final void mT__27() throws RecognitionException {
1901 - ruleNestingLevel++;
1903 - int _start = getCharIndex();
1904 - int _line = getLine();
1905 - int _charPosition = getCharPositionInLine();
1906 - int _channel = Token.DEFAULT_CHANNEL;
1907 + int _type = T__27;
1908 + int _channel = DEFAULT_TOKEN_CHANNEL;
1909 // Bst.g:5:7: ( '<' )
1919 - if ( token==null && ruleNestingLevel==1 ) {
1920 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1924 + state.type = _type;
1925 + state.channel = _channel;
1928 - ruleNestingLevel--;
1932 + // $ANTLR end "T__27"
1934 - // $ANTLR start T28
1935 - public void mT28() throws RecognitionException {
1936 + // $ANTLR start "T__28"
1937 + public final void mT__28() throws RecognitionException {
1939 - ruleNestingLevel++;
1941 - int _start = getCharIndex();
1942 - int _line = getLine();
1943 - int _charPosition = getCharPositionInLine();
1944 - int _channel = Token.DEFAULT_CHANNEL;
1945 + int _type = T__28;
1946 + int _channel = DEFAULT_TOKEN_CHANNEL;
1947 // Bst.g:6:7: ( '>' )
1957 - if ( token==null && ruleNestingLevel==1 ) {
1958 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
1962 + state.type = _type;
1963 + state.channel = _channel;
1966 - ruleNestingLevel--;
1970 + // $ANTLR end "T__28"
1972 - // $ANTLR start T29
1973 - public void mT29() throws RecognitionException {
1974 + // $ANTLR start "T__29"
1975 + public final void mT__29() throws RecognitionException {
1977 - ruleNestingLevel++;
1979 - int _start = getCharIndex();
1980 - int _line = getLine();
1981 - int _charPosition = getCharPositionInLine();
1982 - int _channel = Token.DEFAULT_CHANNEL;
1983 + int _type = T__29;
1984 + int _channel = DEFAULT_TOKEN_CHANNEL;
1985 // Bst.g:7:7: ( '=' )
1995 - if ( token==null && ruleNestingLevel==1 ) {
1996 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2000 + state.type = _type;
2001 + state.channel = _channel;
2004 - ruleNestingLevel--;
2008 + // $ANTLR end "T__29"
2010 - // $ANTLR start T30
2011 - public void mT30() throws RecognitionException {
2012 + // $ANTLR start "T__30"
2013 + public final void mT__30() throws RecognitionException {
2015 - ruleNestingLevel++;
2017 - int _start = getCharIndex();
2018 - int _line = getLine();
2019 - int _charPosition = getCharPositionInLine();
2020 - int _channel = Token.DEFAULT_CHANNEL;
2021 + int _type = T__30;
2022 + int _channel = DEFAULT_TOKEN_CHANNEL;
2023 // Bst.g:8:7: ( '+' )
2033 - if ( token==null && ruleNestingLevel==1 ) {
2034 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2038 + state.type = _type;
2039 + state.channel = _channel;
2042 - ruleNestingLevel--;
2046 + // $ANTLR end "T__30"
2048 - // $ANTLR start T31
2049 - public void mT31() throws RecognitionException {
2050 + // $ANTLR start "T__31"
2051 + public final void mT__31() throws RecognitionException {
2053 - ruleNestingLevel++;
2055 - int _start = getCharIndex();
2056 - int _line = getLine();
2057 - int _charPosition = getCharPositionInLine();
2058 - int _channel = Token.DEFAULT_CHANNEL;
2059 + int _type = T__31;
2060 + int _channel = DEFAULT_TOKEN_CHANNEL;
2061 // Bst.g:9:7: ( '-' )
2071 - if ( token==null && ruleNestingLevel==1 ) {
2072 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2076 + state.type = _type;
2077 + state.channel = _channel;
2080 - ruleNestingLevel--;
2084 + // $ANTLR end "T__31"
2086 - // $ANTLR start T32
2087 - public void mT32() throws RecognitionException {
2088 + // $ANTLR start "T__32"
2089 + public final void mT__32() throws RecognitionException {
2091 - ruleNestingLevel++;
2093 - int _start = getCharIndex();
2094 - int _line = getLine();
2095 - int _charPosition = getCharPositionInLine();
2096 - int _channel = Token.DEFAULT_CHANNEL;
2097 + int _type = T__32;
2098 + int _channel = DEFAULT_TOKEN_CHANNEL;
2099 // Bst.g:10:7: ( ':=' )
2100 - // Bst.g:10:7: ':='
2101 + // Bst.g:10:9: ':='
2110 - if ( token==null && ruleNestingLevel==1 ) {
2111 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2115 + state.type = _type;
2116 + state.channel = _channel;
2119 - ruleNestingLevel--;
2123 + // $ANTLR end "T__32"
2125 - // $ANTLR start T33
2126 - public void mT33() throws RecognitionException {
2127 + // $ANTLR start "T__33"
2128 + public final void mT__33() throws RecognitionException {
2130 - ruleNestingLevel++;
2132 - int _start = getCharIndex();
2133 - int _line = getLine();
2134 - int _charPosition = getCharPositionInLine();
2135 - int _channel = Token.DEFAULT_CHANNEL;
2136 + int _type = T__33;
2137 + int _channel = DEFAULT_TOKEN_CHANNEL;
2138 // Bst.g:11:7: ( '*' )
2139 - // Bst.g:11:7: '*'
2140 + // Bst.g:11:9: '*'
2148 - if ( token==null && ruleNestingLevel==1 ) {
2149 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2153 + state.type = _type;
2154 + state.channel = _channel;
2157 - ruleNestingLevel--;
2161 + // $ANTLR end "T__33"
2163 - // $ANTLR start STRINGS
2164 - public void mSTRINGS() throws RecognitionException {
2165 + // $ANTLR start "STRINGS"
2166 + public final void mSTRINGS() throws RecognitionException {
2168 - ruleNestingLevel++;
2169 int _type = STRINGS;
2170 - int _start = getCharIndex();
2171 - int _line = getLine();
2172 - int _charPosition = getCharPositionInLine();
2173 - int _channel = Token.DEFAULT_CHANNEL;
2174 - // Bst.g:53:11: ( 'STRINGS' )
2175 + int _channel = DEFAULT_TOKEN_CHANNEL;
2176 + // Bst.g:53:9: ( 'STRINGS' )
2177 // Bst.g:53:11: 'STRINGS'
2180 @@ -330,29 +247,20 @@ public class BstLexer extends Lexer {
2186 - if ( token==null && ruleNestingLevel==1 ) {
2187 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2191 + state.type = _type;
2192 + state.channel = _channel;
2195 - ruleNestingLevel--;
2198 - // $ANTLR end STRINGS
2199 + // $ANTLR end "STRINGS"
2201 - // $ANTLR start INTEGERS
2202 - public void mINTEGERS() throws RecognitionException {
2203 + // $ANTLR start "INTEGERS"
2204 + public final void mINTEGERS() throws RecognitionException {
2206 - ruleNestingLevel++;
2207 int _type = INTEGERS;
2208 - int _start = getCharIndex();
2209 - int _line = getLine();
2210 - int _charPosition = getCharPositionInLine();
2211 - int _channel = Token.DEFAULT_CHANNEL;
2212 - // Bst.g:54:12: ( 'INTEGERS' )
2213 + int _channel = DEFAULT_TOKEN_CHANNEL;
2214 + // Bst.g:54:10: ( 'INTEGERS' )
2215 // Bst.g:54:12: 'INTEGERS'
2218 @@ -360,29 +268,20 @@ public class BstLexer extends Lexer {
2224 - if ( token==null && ruleNestingLevel==1 ) {
2225 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2229 + state.type = _type;
2230 + state.channel = _channel;
2233 - ruleNestingLevel--;
2236 - // $ANTLR end INTEGERS
2237 + // $ANTLR end "INTEGERS"
2239 - // $ANTLR start FUNCTION
2240 - public void mFUNCTION() throws RecognitionException {
2241 + // $ANTLR start "FUNCTION"
2242 + public final void mFUNCTION() throws RecognitionException {
2244 - ruleNestingLevel++;
2245 int _type = FUNCTION;
2246 - int _start = getCharIndex();
2247 - int _line = getLine();
2248 - int _charPosition = getCharPositionInLine();
2249 - int _channel = Token.DEFAULT_CHANNEL;
2250 - // Bst.g:55:12: ( 'FUNCTION' )
2251 + int _channel = DEFAULT_TOKEN_CHANNEL;
2252 + // Bst.g:55:10: ( 'FUNCTION' )
2253 // Bst.g:55:12: 'FUNCTION'
2256 @@ -390,29 +289,20 @@ public class BstLexer extends Lexer {
2262 - if ( token==null && ruleNestingLevel==1 ) {
2263 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2267 + state.type = _type;
2268 + state.channel = _channel;
2271 - ruleNestingLevel--;
2274 - // $ANTLR end FUNCTION
2275 + // $ANTLR end "FUNCTION"
2277 - // $ANTLR start EXECUTE
2278 - public void mEXECUTE() throws RecognitionException {
2279 + // $ANTLR start "EXECUTE"
2280 + public final void mEXECUTE() throws RecognitionException {
2282 - ruleNestingLevel++;
2283 int _type = EXECUTE;
2284 - int _start = getCharIndex();
2285 - int _line = getLine();
2286 - int _charPosition = getCharPositionInLine();
2287 - int _channel = Token.DEFAULT_CHANNEL;
2288 - // Bst.g:56:11: ( 'EXECUTE' )
2289 + int _channel = DEFAULT_TOKEN_CHANNEL;
2290 + // Bst.g:56:9: ( 'EXECUTE' )
2291 // Bst.g:56:11: 'EXECUTE'
2294 @@ -420,29 +310,20 @@ public class BstLexer extends Lexer {
2300 - if ( token==null && ruleNestingLevel==1 ) {
2301 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2305 + state.type = _type;
2306 + state.channel = _channel;
2309 - ruleNestingLevel--;
2312 - // $ANTLR end EXECUTE
2313 + // $ANTLR end "EXECUTE"
2315 - // $ANTLR start SORT
2316 - public void mSORT() throws RecognitionException {
2317 + // $ANTLR start "SORT"
2318 + public final void mSORT() throws RecognitionException {
2320 - ruleNestingLevel++;
2322 - int _start = getCharIndex();
2323 - int _line = getLine();
2324 - int _charPosition = getCharPositionInLine();
2325 - int _channel = Token.DEFAULT_CHANNEL;
2326 - // Bst.g:57:8: ( 'SORT' )
2327 + int _channel = DEFAULT_TOKEN_CHANNEL;
2328 + // Bst.g:57:6: ( 'SORT' )
2329 // Bst.g:57:8: 'SORT'
2332 @@ -450,29 +331,20 @@ public class BstLexer extends Lexer {
2338 - if ( token==null && ruleNestingLevel==1 ) {
2339 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2343 + state.type = _type;
2344 + state.channel = _channel;
2347 - ruleNestingLevel--;
2350 - // $ANTLR end SORT
2351 + // $ANTLR end "SORT"
2353 - // $ANTLR start ITERATE
2354 - public void mITERATE() throws RecognitionException {
2355 + // $ANTLR start "ITERATE"
2356 + public final void mITERATE() throws RecognitionException {
2358 - ruleNestingLevel++;
2359 int _type = ITERATE;
2360 - int _start = getCharIndex();
2361 - int _line = getLine();
2362 - int _charPosition = getCharPositionInLine();
2363 - int _channel = Token.DEFAULT_CHANNEL;
2364 - // Bst.g:58:11: ( 'ITERATE' )
2365 + int _channel = DEFAULT_TOKEN_CHANNEL;
2366 + // Bst.g:58:9: ( 'ITERATE' )
2367 // Bst.g:58:11: 'ITERATE'
2370 @@ -480,29 +352,20 @@ public class BstLexer extends Lexer {
2376 - if ( token==null && ruleNestingLevel==1 ) {
2377 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2381 + state.type = _type;
2382 + state.channel = _channel;
2385 - ruleNestingLevel--;
2388 - // $ANTLR end ITERATE
2389 + // $ANTLR end "ITERATE"
2391 - // $ANTLR start REVERSE
2392 - public void mREVERSE() throws RecognitionException {
2393 + // $ANTLR start "REVERSE"
2394 + public final void mREVERSE() throws RecognitionException {
2396 - ruleNestingLevel++;
2397 int _type = REVERSE;
2398 - int _start = getCharIndex();
2399 - int _line = getLine();
2400 - int _charPosition = getCharPositionInLine();
2401 - int _channel = Token.DEFAULT_CHANNEL;
2402 - // Bst.g:59:11: ( 'REVERSE' )
2403 + int _channel = DEFAULT_TOKEN_CHANNEL;
2404 + // Bst.g:59:9: ( 'REVERSE' )
2405 // Bst.g:59:11: 'REVERSE'
2408 @@ -510,29 +373,20 @@ public class BstLexer extends Lexer {
2414 - if ( token==null && ruleNestingLevel==1 ) {
2415 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2419 + state.type = _type;
2420 + state.channel = _channel;
2423 - ruleNestingLevel--;
2426 - // $ANTLR end REVERSE
2427 + // $ANTLR end "REVERSE"
2429 - // $ANTLR start ENTRY
2430 - public void mENTRY() throws RecognitionException {
2431 + // $ANTLR start "ENTRY"
2432 + public final void mENTRY() throws RecognitionException {
2434 - ruleNestingLevel++;
2436 - int _start = getCharIndex();
2437 - int _line = getLine();
2438 - int _charPosition = getCharPositionInLine();
2439 - int _channel = Token.DEFAULT_CHANNEL;
2440 - // Bst.g:60:9: ( 'ENTRY' )
2441 + int _channel = DEFAULT_TOKEN_CHANNEL;
2442 + // Bst.g:60:7: ( 'ENTRY' )
2443 // Bst.g:60:9: 'ENTRY'
2446 @@ -540,29 +394,20 @@ public class BstLexer extends Lexer {
2452 - if ( token==null && ruleNestingLevel==1 ) {
2453 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2457 + state.type = _type;
2458 + state.channel = _channel;
2461 - ruleNestingLevel--;
2464 - // $ANTLR end ENTRY
2465 + // $ANTLR end "ENTRY"
2467 - // $ANTLR start READ
2468 - public void mREAD() throws RecognitionException {
2469 + // $ANTLR start "READ"
2470 + public final void mREAD() throws RecognitionException {
2472 - ruleNestingLevel++;
2474 - int _start = getCharIndex();
2475 - int _line = getLine();
2476 - int _charPosition = getCharPositionInLine();
2477 - int _channel = Token.DEFAULT_CHANNEL;
2478 - // Bst.g:61:8: ( 'READ' )
2479 + int _channel = DEFAULT_TOKEN_CHANNEL;
2480 + // Bst.g:61:6: ( 'READ' )
2481 // Bst.g:61:8: 'READ'
2484 @@ -570,29 +415,20 @@ public class BstLexer extends Lexer {
2490 - if ( token==null && ruleNestingLevel==1 ) {
2491 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2495 + state.type = _type;
2496 + state.channel = _channel;
2499 - ruleNestingLevel--;
2502 - // $ANTLR end READ
2503 + // $ANTLR end "READ"
2505 - // $ANTLR start MACRO
2506 - public void mMACRO() throws RecognitionException {
2507 + // $ANTLR start "MACRO"
2508 + public final void mMACRO() throws RecognitionException {
2510 - ruleNestingLevel++;
2512 - int _start = getCharIndex();
2513 - int _line = getLine();
2514 - int _charPosition = getCharPositionInLine();
2515 - int _channel = Token.DEFAULT_CHANNEL;
2516 - // Bst.g:62:9: ( 'MACRO' )
2517 + int _channel = DEFAULT_TOKEN_CHANNEL;
2518 + // Bst.g:62:7: ( 'MACRO' )
2519 // Bst.g:62:9: 'MACRO'
2522 @@ -600,29 +436,20 @@ public class BstLexer extends Lexer {
2528 - if ( token==null && ruleNestingLevel==1 ) {
2529 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2533 + state.type = _type;
2534 + state.channel = _channel;
2537 - ruleNestingLevel--;
2540 - // $ANTLR end MACRO
2541 + // $ANTLR end "MACRO"
2543 - // $ANTLR start QUOTED
2544 - public void mQUOTED() throws RecognitionException {
2545 + // $ANTLR start "QUOTED"
2546 + public final void mQUOTED() throws RecognitionException {
2548 - ruleNestingLevel++;
2550 - int _start = getCharIndex();
2551 - int _line = getLine();
2552 - int _charPosition = getCharPositionInLine();
2553 - int _channel = Token.DEFAULT_CHANNEL;
2554 - // Bst.g:65:4: ( '\\'' IDENTIFIER )
2555 + int _channel = DEFAULT_TOKEN_CHANNEL;
2556 + // Bst.g:65:2: ( '\\'' IDENTIFIER )
2557 // Bst.g:65:4: '\\'' IDENTIFIER
2560 @@ -630,29 +457,20 @@ public class BstLexer extends Lexer {
2566 - if ( token==null && ruleNestingLevel==1 ) {
2567 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2571 + state.type = _type;
2572 + state.channel = _channel;
2575 - ruleNestingLevel--;
2578 - // $ANTLR end QUOTED
2579 + // $ANTLR end "QUOTED"
2581 - // $ANTLR start IDENTIFIER
2582 - public void mIDENTIFIER() throws RecognitionException {
2583 + // $ANTLR start "IDENTIFIER"
2584 + public final void mIDENTIFIER() throws RecognitionException {
2586 - ruleNestingLevel++;
2587 int _type = IDENTIFIER;
2588 - int _start = getCharIndex();
2589 - int _line = getLine();
2590 - int _charPosition = getCharPositionInLine();
2591 - int _channel = Token.DEFAULT_CHANNEL;
2592 - // Bst.g:68:4: ( LETTER ( LETTER | NUMERAL )* )
2593 + int _channel = DEFAULT_TOKEN_CHANNEL;
2594 + // Bst.g:68:2: ( LETTER ( LETTER | NUMERAL )* )
2595 // Bst.g:68:4: LETTER ( LETTER | NUMERAL )*
2598 @@ -661,6 +479,7 @@ public class BstLexer extends Lexer {
2601 int LA1_0 = input.LA(1);
2603 if ( (LA1_0=='$'||LA1_0=='.'||(LA1_0>='A' && LA1_0<='Z')||(LA1_0>='a' && LA1_0<='z')) ) {
2606 @@ -693,82 +512,70 @@ public class BstLexer extends Lexer {
2612 - if ( token==null && ruleNestingLevel==1 ) {
2613 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2617 + state.type = _type;
2618 + state.channel = _channel;
2621 - ruleNestingLevel--;
2624 - // $ANTLR end IDENTIFIER
2625 + // $ANTLR end "IDENTIFIER"
2627 - // $ANTLR start LETTER
2628 - public void mLETTER() throws RecognitionException {
2629 + // $ANTLR start "LETTER"
2630 + public final void mLETTER() throws RecognitionException {
2632 - ruleNestingLevel++;
2633 - // Bst.g:71:4: ( ('a'..'z'|'A'..'Z'|'.'|'$'))
2634 - // Bst.g:71:4: ('a'..'z'|'A'..'Z'|'.'|'$')
2635 + // Bst.g:71:2: ( ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' ) )
2636 + // Bst.g:71:4: ( 'a' .. 'z' | 'A' .. 'Z' | '.' | '$' )
2638 if ( input.LA(1)=='$'||input.LA(1)=='.'||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
2643 - MismatchedSetException mse =
2644 - new MismatchedSetException(null,input);
2645 - recover(mse); throw mse;
2647 + MismatchedSetException mse = new MismatchedSetException(null,input);
2656 - ruleNestingLevel--;
2659 - // $ANTLR end LETTER
2660 + // $ANTLR end "LETTER"
2662 - // $ANTLR start STRING
2663 - public void mSTRING() throws RecognitionException {
2664 + // $ANTLR start "STRING"
2665 + public final void mSTRING() throws RecognitionException {
2667 - ruleNestingLevel++;
2669 - int _start = getCharIndex();
2670 - int _line = getLine();
2671 - int _charPosition = getCharPositionInLine();
2672 - int _channel = Token.DEFAULT_CHANNEL;
2673 - // Bst.g:74:4: ( '\"' (~ '\"' )* '\"' )
2674 - // Bst.g:74:4: '\"' (~ '\"' )* '\"'
2675 + int _channel = DEFAULT_TOKEN_CHANNEL;
2676 + // Bst.g:74:2: ( '\"' (~ ( '\"' ) )* '\"' )
2677 + // Bst.g:74:4: '\"' (~ ( '\"' ) )* '\"'
2680 - // Bst.g:74:8: (~ '\"' )*
2681 + // Bst.g:74:8: (~ ( '\"' ) )*
2685 int LA2_0 = input.LA(1);
2686 - if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFE')) ) {
2688 + if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='\uFFFF')) ) {
2695 - // Bst.g:74:9: ~ '\"'
2696 + // Bst.g:74:9: ~ ( '\"' )
2698 - if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFE') ) {
2699 + if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFF') ) {
2704 - MismatchedSetException mse =
2705 - new MismatchedSetException(null,input);
2706 - recover(mse); throw mse;
2708 + MismatchedSetException mse = new MismatchedSetException(null,input);
2714 @@ -783,51 +590,42 @@ public class BstLexer extends Lexer {
2720 - if ( token==null && ruleNestingLevel==1 ) {
2721 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2725 + state.type = _type;
2726 + state.channel = _channel;
2729 - ruleNestingLevel--;
2732 - // $ANTLR end STRING
2733 + // $ANTLR end "STRING"
2735 - // $ANTLR start INTEGER
2736 - public void mINTEGER() throws RecognitionException {
2737 + // $ANTLR start "INTEGER"
2738 + public final void mINTEGER() throws RecognitionException {
2740 - ruleNestingLevel++;
2741 int _type = INTEGER;
2742 - int _start = getCharIndex();
2743 - int _line = getLine();
2744 - int _charPosition = getCharPositionInLine();
2745 - int _channel = Token.DEFAULT_CHANNEL;
2746 - // Bst.g:77:4: ( '#' ( ('+'|'-'))? ( NUMERAL )+ )
2747 - // Bst.g:77:4: '#' ( ('+'|'-'))? ( NUMERAL )+
2748 + int _channel = DEFAULT_TOKEN_CHANNEL;
2749 + // Bst.g:77:2: ( '#' ( '+' | '-' )? ( NUMERAL )+ )
2750 + // Bst.g:77:4: '#' ( '+' | '-' )? ( NUMERAL )+
2753 - // Bst.g:77:8: ( ('+'|'-'))?
2754 + // Bst.g:77:8: ( '+' | '-' )?
2756 int LA3_0 = input.LA(1);
2758 if ( (LA3_0=='+'||LA3_0=='-') ) {
2763 - // Bst.g:77:9: ('+'|'-')
2766 if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
2771 - MismatchedSetException mse =
2772 - new MismatchedSetException(null,input);
2773 - recover(mse); throw mse;
2775 + MismatchedSetException mse = new MismatchedSetException(null,input);
2781 @@ -841,6 +639,7 @@ public class BstLexer extends Lexer {
2784 int LA4_0 = input.LA(1);
2786 if ( ((LA4_0>='0' && LA4_0<='9')) ) {
2789 @@ -867,24 +666,18 @@ public class BstLexer extends Lexer {
2795 - if ( token==null && ruleNestingLevel==1 ) {
2796 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2800 + state.type = _type;
2801 + state.channel = _channel;
2804 - ruleNestingLevel--;
2807 - // $ANTLR end INTEGER
2808 + // $ANTLR end "INTEGER"
2810 - // $ANTLR start NUMERAL
2811 - public void mNUMERAL() throws RecognitionException {
2812 + // $ANTLR start "NUMERAL"
2813 + public final void mNUMERAL() throws RecognitionException {
2815 - ruleNestingLevel++;
2816 - // Bst.g:80:4: ( ( '0' .. '9' ) )
2817 + // Bst.g:80:2: ( ( '0' .. '9' ) )
2818 // Bst.g:80:4: ( '0' .. '9' )
2820 // Bst.g:80:4: ( '0' .. '9' )
2821 @@ -899,47 +692,42 @@ public class BstLexer extends Lexer {
2825 - ruleNestingLevel--;
2828 - // $ANTLR end NUMERAL
2829 + // $ANTLR end "NUMERAL"
2831 - // $ANTLR start WS
2832 - public void mWS() throws RecognitionException {
2833 + // $ANTLR start "WS"
2834 + public final void mWS() throws RecognitionException {
2836 - ruleNestingLevel++;
2838 - int _start = getCharIndex();
2839 - int _line = getLine();
2840 - int _charPosition = getCharPositionInLine();
2841 - int _channel = Token.DEFAULT_CHANNEL;
2842 - // Bst.g:82:9: ( ( (' '|'\\t'|'\\r'|'\\n'))+ )
2843 - // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
2844 + int _channel = DEFAULT_TOKEN_CHANNEL;
2845 + // Bst.g:83:2: ( ( ' ' | '\\t' | '\\n' )+ )
2846 + // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
2848 - // Bst.g:82:9: ( (' '|'\\t'|'\\r'|'\\n'))+
2849 + // Bst.g:83:4: ( ' ' | '\\t' | '\\n' )+
2854 int LA5_0 = input.LA(1);
2855 - if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0=='\r'||LA5_0==' ') ) {
2857 + if ( ((LA5_0>='\t' && LA5_0<='\n')||LA5_0==' ') ) {
2864 - // Bst.g:82:13: (' '|'\\t'|'\\r'|'\\n')
2867 - if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
2868 + if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)==' ' ) {
2873 - MismatchedSetException mse =
2874 - new MismatchedSetException(null,input);
2875 - recover(mse); throw mse;
2877 + MismatchedSetException mse = new MismatchedSetException(null,input);
2883 @@ -954,59 +742,50 @@ public class BstLexer extends Lexer {
2894 - if ( token==null && ruleNestingLevel==1 ) {
2895 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2899 + state.type = _type;
2900 + state.channel = _channel;
2903 - ruleNestingLevel--;
2907 + // $ANTLR end "WS"
2909 - // $ANTLR start LINE_COMMENT
2910 - public void mLINE_COMMENT() throws RecognitionException {
2911 + // $ANTLR start "LINE_COMMENT"
2912 + public final void mLINE_COMMENT() throws RecognitionException {
2914 - ruleNestingLevel++;
2915 int _type = LINE_COMMENT;
2916 - int _start = getCharIndex();
2917 - int _line = getLine();
2918 - int _charPosition = getCharPositionInLine();
2919 - int _channel = Token.DEFAULT_CHANNEL;
2920 - // Bst.g:90:7: ( '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n' )
2921 - // Bst.g:90:7: '%' (~ ('\\n'|'\\r'))* ( '\\r' )? '\\n'
2922 + int _channel = DEFAULT_TOKEN_CHANNEL;
2923 + // Bst.g:86:5: ( '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
2924 + // Bst.g:86:7: '%' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
2927 - // Bst.g:90:11: (~ ('\\n'|'\\r'))*
2928 + // Bst.g:86:11: (~ ( '\\n' | '\\r' ) )*
2932 int LA6_0 = input.LA(1);
2933 - if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFE')) ) {
2935 + if ( ((LA6_0>='\u0000' && LA6_0<='\t')||(LA6_0>='\u000B' && LA6_0<='\f')||(LA6_0>='\u000E' && LA6_0<='\uFFFF')) ) {
2942 - // Bst.g:90:11: ~ ('\\n'|'\\r')
2943 + // Bst.g:86:11: ~ ( '\\n' | '\\r' )
2945 - 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') ) {
2946 + 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') ) {
2951 - MismatchedSetException mse =
2952 - new MismatchedSetException(null,input);
2953 - recover(mse); throw mse;
2955 + MismatchedSetException mse = new MismatchedSetException(null,input);
2961 @@ -1017,15 +796,16 @@ public class BstLexer extends Lexer {
2965 - // Bst.g:90:25: ( '\\r' )?
2966 + // Bst.g:86:25: ( '\\r' )?
2968 int LA7_0 = input.LA(1);
2970 if ( (LA7_0=='\r') ) {
2975 - // Bst.g:90:25: '\\r'
2976 + // Bst.g:86:25: '\\r'
2980 @@ -1035,619 +815,193 @@ public class BstLexer extends Lexer {
2991 - if ( token==null && ruleNestingLevel==1 ) {
2992 - emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
2996 + state.type = _type;
2997 + state.channel = _channel;
3000 - ruleNestingLevel--;
3003 - // $ANTLR end LINE_COMMENT
3004 + // $ANTLR end "LINE_COMMENT"
3006 public void mTokens() throws RecognitionException {
3007 - // 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 )
3008 + // 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 )
3010 - switch ( input.LA(1) ) {
3039 - switch ( input.LA(2) ) {
3041 - int LA8_22 = input.LA(3);
3042 - if ( (LA8_22=='R') ) {
3043 - int LA8_31 = input.LA(4);
3044 - if ( (LA8_31=='I') ) {
3045 - int LA8_41 = input.LA(5);
3046 - if ( (LA8_41=='N') ) {
3047 - int LA8_51 = input.LA(6);
3048 - if ( (LA8_51=='G') ) {
3049 - int LA8_61 = input.LA(7);
3050 - if ( (LA8_61=='S') ) {
3051 - int LA8_69 = input.LA(8);
3052 - if ( (LA8_69=='$'||LA8_69=='.'||(LA8_69>='0' && LA8_69<='9')||(LA8_69>='A' && LA8_69<='Z')||(LA8_69>='a' && LA8_69<='z')) ) {
3074 - int LA8_23 = input.LA(3);
3075 - if ( (LA8_23=='R') ) {
3076 - int LA8_32 = input.LA(4);
3077 - if ( (LA8_32=='T') ) {
3078 - int LA8_42 = input.LA(5);
3079 - if ( (LA8_42=='$'||LA8_42=='.'||(LA8_42>='0' && LA8_42<='9')||(LA8_42>='A' && LA8_42<='Z')||(LA8_42>='a' && LA8_42<='z')) ) {
3096 - switch ( input.LA(2) ) {
3098 - int LA8_24 = input.LA(3);
3099 - if ( (LA8_24=='E') ) {
3100 - int LA8_33 = input.LA(4);
3101 - if ( (LA8_33=='R') ) {
3102 - int LA8_43 = input.LA(5);
3103 - if ( (LA8_43=='A') ) {
3104 - int LA8_53 = input.LA(6);
3105 - if ( (LA8_53=='T') ) {
3106 - int LA8_62 = input.LA(7);
3107 - if ( (LA8_62=='E') ) {
3108 - int LA8_70 = input.LA(8);
3109 - if ( (LA8_70=='$'||LA8_70=='.'||(LA8_70>='0' && LA8_70<='9')||(LA8_70>='A' && LA8_70<='Z')||(LA8_70>='a' && LA8_70<='z')) ) {
3131 - int LA8_25 = input.LA(3);
3132 - if ( (LA8_25=='T') ) {
3133 - int LA8_34 = input.LA(4);
3134 - if ( (LA8_34=='E') ) {
3135 - int LA8_44 = input.LA(5);
3136 - if ( (LA8_44=='G') ) {
3137 - int LA8_54 = input.LA(6);
3138 - if ( (LA8_54=='E') ) {
3139 - int LA8_63 = input.LA(7);
3140 - if ( (LA8_63=='R') ) {
3141 - int LA8_71 = input.LA(8);
3142 - if ( (LA8_71=='S') ) {
3143 - int LA8_77 = input.LA(9);
3144 - if ( (LA8_77=='$'||LA8_77=='.'||(LA8_77>='0' && LA8_77<='9')||(LA8_77>='A' && LA8_77<='Z')||(LA8_77>='a' && LA8_77<='z')) ) {
3173 - int LA8_12 = input.LA(2);
3174 - if ( (LA8_12=='U') ) {
3175 - int LA8_26 = input.LA(3);
3176 - if ( (LA8_26=='N') ) {
3177 - int LA8_35 = input.LA(4);
3178 - if ( (LA8_35=='C') ) {
3179 - int LA8_45 = input.LA(5);
3180 - if ( (LA8_45=='T') ) {
3181 - int LA8_55 = input.LA(6);
3182 - if ( (LA8_55=='I') ) {
3183 - int LA8_64 = input.LA(7);
3184 - if ( (LA8_64=='O') ) {
3185 - int LA8_72 = input.LA(8);
3186 - if ( (LA8_72=='N') ) {
3187 - int LA8_78 = input.LA(9);
3188 - if ( (LA8_78=='$'||LA8_78=='.'||(LA8_78>='0' && LA8_78<='9')||(LA8_78>='A' && LA8_78<='Z')||(LA8_78>='a' && LA8_78<='z')) ) {
3216 - switch ( input.LA(2) ) {
3218 - int LA8_27 = input.LA(3);
3219 - if ( (LA8_27=='T') ) {
3220 - int LA8_36 = input.LA(4);
3221 - if ( (LA8_36=='R') ) {
3222 - int LA8_46 = input.LA(5);
3223 - if ( (LA8_46=='Y') ) {
3224 - int LA8_56 = input.LA(6);
3225 - if ( (LA8_56=='$'||LA8_56=='.'||(LA8_56>='0' && LA8_56<='9')||(LA8_56>='A' && LA8_56<='Z')||(LA8_56>='a' && LA8_56<='z')) ) {
3241 - int LA8_28 = input.LA(3);
3242 - if ( (LA8_28=='E') ) {
3243 - int LA8_37 = input.LA(4);
3244 - if ( (LA8_37=='C') ) {
3245 - int LA8_47 = input.LA(5);
3246 - if ( (LA8_47=='U') ) {
3247 - int LA8_57 = input.LA(6);
3248 - if ( (LA8_57=='T') ) {
3249 - int LA8_66 = input.LA(7);
3250 - if ( (LA8_66=='E') ) {
3251 - int LA8_73 = input.LA(8);
3252 - if ( (LA8_73=='$'||LA8_73=='.'||(LA8_73>='0' && LA8_73<='9')||(LA8_73>='A' && LA8_73<='Z')||(LA8_73>='a' && LA8_73<='z')) ) {
3278 - int LA8_14 = input.LA(2);
3279 - if ( (LA8_14=='E') ) {
3280 - switch ( input.LA(3) ) {
3282 - int LA8_38 = input.LA(4);
3283 - if ( (LA8_38=='D') ) {
3284 - int LA8_48 = input.LA(5);
3285 - if ( (LA8_48=='$'||LA8_48=='.'||(LA8_48>='0' && LA8_48<='9')||(LA8_48>='A' && LA8_48<='Z')||(LA8_48>='a' && LA8_48<='z')) ) {
3295 - int LA8_39 = input.LA(4);
3296 - if ( (LA8_39=='E') ) {
3297 - int LA8_49 = input.LA(5);
3298 - if ( (LA8_49=='R') ) {
3299 - int LA8_59 = input.LA(6);
3300 - if ( (LA8_59=='S') ) {
3301 - int LA8_67 = input.LA(7);
3302 - if ( (LA8_67=='E') ) {
3303 - int LA8_74 = input.LA(8);
3304 - if ( (LA8_74=='$'||LA8_74=='.'||(LA8_74>='0' && LA8_74<='9')||(LA8_74>='A' && LA8_74<='Z')||(LA8_74>='a' && LA8_74<='z')) ) {
3330 - int LA8_15 = input.LA(2);
3331 - if ( (LA8_15=='A') ) {
3332 - int LA8_30 = input.LA(3);
3333 - if ( (LA8_30=='C') ) {
3334 - int LA8_40 = input.LA(4);
3335 - if ( (LA8_40=='R') ) {
3336 - int LA8_50 = input.LA(5);
3337 - if ( (LA8_50=='O') ) {
3338 - int LA8_60 = input.LA(6);
3339 - if ( (LA8_60=='$'||LA8_60=='.'||(LA8_60>='0' && LA8_60<='9')||(LA8_60>='A' && LA8_60<='Z')||(LA8_60>='a' && LA8_60<='z')) ) {
3426 - NoViableAltException nvae =
3427 - 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);
3432 + alt8 = dfa8.predict(input);
3435 - // Bst.g:1:10: T25
3436 + // Bst.g:1:10: T__25
3444 - // Bst.g:1:14: T26
3445 + // Bst.g:1:16: T__26
3453 - // Bst.g:1:18: T27
3454 + // Bst.g:1:22: T__27
3462 - // Bst.g:1:22: T28
3463 + // Bst.g:1:28: T__28
3471 - // Bst.g:1:26: T29
3472 + // Bst.g:1:34: T__29
3480 - // Bst.g:1:30: T30
3481 + // Bst.g:1:40: T__30
3489 - // Bst.g:1:34: T31
3490 + // Bst.g:1:46: T__31
3498 - // Bst.g:1:38: T32
3499 + // Bst.g:1:52: T__32
3507 - // Bst.g:1:42: T33
3508 + // Bst.g:1:58: T__33
3516 - // Bst.g:1:46: STRINGS
3517 + // Bst.g:1:64: STRINGS
3524 - // Bst.g:1:54: INTEGERS
3525 + // Bst.g:1:72: INTEGERS
3532 - // Bst.g:1:63: FUNCTION
3533 + // Bst.g:1:81: FUNCTION
3540 - // Bst.g:1:72: EXECUTE
3541 + // Bst.g:1:90: EXECUTE
3548 - // Bst.g:1:80: SORT
3549 + // Bst.g:1:98: SORT
3556 - // Bst.g:1:85: ITERATE
3557 + // Bst.g:1:103: ITERATE
3564 - // Bst.g:1:93: REVERSE
3565 + // Bst.g:1:111: REVERSE
3572 - // Bst.g:1:101: ENTRY
3573 + // Bst.g:1:119: ENTRY
3580 - // Bst.g:1:107: READ
3581 + // Bst.g:1:125: READ
3588 - // Bst.g:1:112: MACRO
3589 + // Bst.g:1:130: MACRO
3596 - // Bst.g:1:118: QUOTED
3597 + // Bst.g:1:136: QUOTED
3604 - // Bst.g:1:125: IDENTIFIER
3605 + // Bst.g:1:143: IDENTIFIER
3612 - // Bst.g:1:136: STRING
3613 + // Bst.g:1:154: STRING
3620 - // Bst.g:1:143: INTEGER
3621 + // Bst.g:1:161: INTEGER
3628 - // Bst.g:1:151: WS
3629 + // Bst.g:1:169: WS
3636 - // Bst.g:1:154: LINE_COMMENT
3637 + // Bst.g:1:172: LINE_COMMENT
3641 @@ -1659,6 +1013,167 @@ public class BstLexer extends Lexer {
3645 + protected DFA8 dfa8 = new DFA8(this);
3646 + static final String DFA8_eotS =
3647 + "\12\uffff\6\21\6\uffff\24\21\1\64\6\21\1\73\2\21\1\uffff\4\21\1"+
3648 + "\102\1\21\1\uffff\1\104\5\21\1\uffff\1\21\1\uffff\1\113\1\21\1\115"+
3649 + "\1\21\1\117\1\120\1\uffff\1\121\1\uffff\1\122\4\uffff";
3650 + static final String DFA8_eofS =
3652 + static final String DFA8_minS =
3653 + "\1\11\11\uffff\1\117\1\116\1\125\1\116\1\105\1\101\6\uffff\2\122"+
3654 + "\1\124\1\105\1\116\1\105\1\124\1\101\1\103\1\111\1\124\1\105\1\122"+
3655 + "\2\103\1\122\1\105\1\104\1\122\1\116\1\44\1\107\1\101\1\124\1\125"+
3656 + "\1\131\1\122\1\44\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1"+
3657 + "\44\1\123\1\uffff\1\44\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105"+
3658 + "\1\uffff\1\44\1\123\1\44\1\116\2\44\1\uffff\1\44\1\uffff\1\44\4"+
3660 + static final String DFA8_maxS =
3661 + "\1\175\11\uffff\2\124\1\125\1\130\1\105\1\101\6\uffff\2\122\1\124"+
3662 + "\1\105\1\116\1\105\1\124\1\126\1\103\1\111\1\124\1\105\1\122\2\103"+
3663 + "\1\122\1\105\1\104\1\122\1\116\1\172\1\107\1\101\1\124\1\125\1\131"+
3664 + "\1\122\1\172\1\117\1\107\1\uffff\1\105\1\124\1\111\1\124\1\172\1"+
3665 + "\123\1\uffff\1\172\1\123\1\122\1\105\1\117\1\105\1\uffff\1\105\1"+
3666 + "\uffff\1\172\1\123\1\172\1\116\2\172\1\uffff\1\172\1\uffff\1\172"+
3668 + static final String DFA8_acceptS =
3669 + "\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"+
3670 + "\1\26\1\27\1\30\1\31\36\uffff\1\16\6\uffff\1\22\6\uffff\1\21\1\uffff"+
3671 + "\1\23\6\uffff\1\12\1\uffff\1\17\1\uffff\1\15\1\20\1\13\1\14";
3672 + static final String DFA8_specialS =
3674 + static final String[] DFA8_transitionS = {
3675 + "\2\24\25\uffff\1\24\1\uffff\1\22\1\23\1\21\1\25\1\uffff\1\20"+
3676 + "\2\uffff\1\11\1\6\1\uffff\1\7\1\21\13\uffff\1\10\1\uffff\1\3"+
3677 + "\1\5\1\4\2\uffff\4\21\1\15\1\14\2\21\1\13\3\21\1\17\4\21\1\16"+
3678 + "\1\12\7\21\6\uffff\32\21\1\1\1\uffff\1\2",
3688 + "\1\27\4\uffff\1\26",
3689 + "\1\30\5\uffff\1\31",
3691 + "\1\34\11\uffff\1\33",
3707 + "\1\47\24\uffff\1\46",
3720 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3728 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3737 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3741 + "\1\21\11\uffff\1\21\1\uffff\12\21\7\uffff\32\21\6\uffff\32"+
3751 + "\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"+
3759 + "\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"+
3773 + static final short[] DFA8_eot = DFA.unpackEncodedString(DFA8_eotS);
3774 + static final short[] DFA8_eof = DFA.unpackEncodedString(DFA8_eofS);
3775 + static final char[] DFA8_min = DFA.unpackEncodedStringToUnsignedChars(DFA8_minS);