001/* SRCPParser.java */
002/* Generated By:JJTree&JavaCC: Do not edit this line. SRCPParser.java */
003package jmri.jmris.srcp.parser;
004
005import org.slf4j.Logger;
006import org.slf4j.LoggerFactory;
007
008/*
009 * This file defines a JavaTree/JavaCC parser implementation for
010 * the SRCP protocol.
011 *
012 * @author Paul Bender Copyright (C) 2010
013 */
014
015// This is generated code.  DO NOT ATTEMPT TO FIX ANY FINDBUGS WARNINGS
016@edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"NM_METHOD_NAMING_CONVENTION",
017    "NM_CONFUSING","RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE","SLF4J_FORMAT_SHOULD_BE_CONST"})
018
019public class SRCPParser/*@bgen(jjtree)*/implements SRCPParserTreeConstants, SRCPParserConstants {/*@bgen(jjtree)*/
020  protected JJTSRCPParserState jjtree = new JJTSRCPParserState();
021   private final static Logger log = LoggerFactory.getLogger(SRCPParser.class);
022
023// Lexical specifications begin here
024  final public 
025SimpleNode handshakecommand() throws ParseException {/*@bgen(jjtree) handshakecommand */
026  ASThandshakecommand jjtn000 = new ASThandshakecommand(JJTHANDSHAKECOMMAND);
027  boolean jjtc000 = true;
028  jjtree.openNodeScope(jjtn000);
029    try {
030      if (jj_2_1(2)) {
031        go();
032      } else {
033        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
034        case SET:{
035          handshake_set();
036          break;
037          }
038        default:
039          jj_la1[0] = jj_gen;
040          jj_consume_token(-1);
041          throw new ParseException();
042        }
043      }
044      jj_consume_token(EOL);
045jjtree.closeNodeScope(jjtn000, true);
046    jjtc000 = false;
047log.debug("Handshake Command Production");
048    {if ("" != null) return jjtn000;}
049    } catch (Throwable jjte000) {
050if (jjtc000) {
051      jjtree.clearNodeScope(jjtn000);
052      jjtc000 = false;
053    } else {
054      jjtree.popNode();
055    }
056    if (jjte000 instanceof RuntimeException) {
057      {if (true) throw (RuntimeException)jjte000;}
058    }
059    if (jjte000 instanceof ParseException) {
060      {if (true) throw (ParseException)jjte000;}
061    }
062    {if (true) throw (Error)jjte000;}
063    } finally {
064if (jjtc000) {
065      jjtree.closeNodeScope(jjtn000, true);
066    }
067    }
068    throw new Error("Missing return statement in function");
069}
070
071  final public SimpleNode command() throws ParseException {/*@bgen(jjtree) command */
072  ASTcommand jjtn000 = new ASTcommand(JJTCOMMAND);
073  boolean jjtc000 = true;
074  jjtree.openNodeScope(jjtn000);
075    try {
076      if (jj_2_2(4)) {
077        get();
078      } else {
079        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
080        case SET:{
081          set();
082          break;
083          }
084        case CHECK:{
085          check();
086          break;
087          }
088        case WAIT:{
089          wait_cmd();
090          break;
091          }
092        case INIT:{
093          init();
094          break;
095          }
096        case TERM:{
097          term();
098          break;
099          }
100        case RESET:{
101          reset();
102          break;
103          }
104        case VERIFY:{
105          verify();
106          break;
107          }
108        default:
109          jj_la1[1] = jj_gen;
110          jj_consume_token(-1);
111          throw new ParseException();
112        }
113      }
114      jj_consume_token(EOL);
115jjtree.closeNodeScope(jjtn000, true);
116    jjtc000 = false;
117log.debug("Command Production");
118    {if ("" != null) return jjtn000;}
119    } catch (Throwable jjte000) {
120if (jjtc000) {
121      jjtree.clearNodeScope(jjtn000);
122      jjtc000 = false;
123    } else {
124      jjtree.popNode();
125    }
126    if (jjte000 instanceof RuntimeException) {
127      {if (true) throw (RuntimeException)jjte000;}
128    }
129    if (jjte000 instanceof ParseException) {
130      {if (true) throw (ParseException)jjte000;}
131    }
132    {if (true) throw (Error)jjte000;}
133    } finally {
134if (jjtc000) {
135      jjtree.closeNodeScope(jjtn000, true);
136    }
137    }
138    throw new Error("Missing return statement in function");
139}
140
141  final public SimpleNode serviceversion() throws ParseException {/*@bgen(jjtree) serviceversion */
142                             ASTserviceversion jjtn000 = new ASTserviceversion(JJTSERVICEVERSION);
143                             boolean jjtc000 = true;
144                             jjtree.openNodeScope(jjtn000);Token t;
145    try {
146      jj_consume_token(SRCP);
147      t = jj_consume_token(VERSION);
148jjtree.closeNodeScope(jjtn000, true);
149    jjtc000 = false;
150log.debug("Service Version Production");
151    jjtn000.jjtSetValue(t.image);
152    {if ("" != null) return jjtn000;}
153    } finally {
154if (jjtc000) {
155      jjtree.closeNodeScope(jjtn000, true);
156    }
157    }
158    throw new Error("Missing return statement in function");
159}
160
161  final public SimpleNode connectionmode() throws ParseException {/*@bgen(jjtree) connectionmode */
162                             ASTconnectionmode jjtn000 = new ASTconnectionmode(JJTCONNECTIONMODE);
163                             boolean jjtc000 = true;
164                             jjtree.openNodeScope(jjtn000);Token t;
165    try {
166      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
167      case COMMAND:{
168        t = jj_consume_token(COMMAND);
169        break;
170        }
171      case INFO:{
172        t = jj_consume_token(INFO);
173        break;
174        }
175      default:
176        jj_la1[2] = jj_gen;
177        jj_consume_token(-1);
178        throw new ParseException();
179      }
180jjtree.closeNodeScope(jjtn000, true);
181    jjtc000 = false;
182log.debug("Connection Mode Production");
183    jjtn000.jjtSetValue(t.image);
184    {if ("" != null) return jjtn000;}
185    } finally {
186if (jjtc000) {
187      jjtree.closeNodeScope(jjtn000, true);
188    }
189    }
190    throw new Error("Missing return statement in function");
191}
192
193  final public SimpleNode bus() throws ParseException {/*@bgen(jjtree) bus */
194                  ASTbus jjtn000 = new ASTbus(JJTBUS);
195                  boolean jjtc000 = true;
196                  jjtree.openNodeScope(jjtn000);SimpleNode s;
197    try {
198      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
199      case ZEROADDR:{
200        s = zeroaddress();
201        break;
202        }
203      case NONZEROADDR:{
204        s = nonzeroaddress();
205        break;
206        }
207      default:
208        jj_la1[3] = jj_gen;
209        jj_consume_token(-1);
210        throw new ParseException();
211      }
212jjtree.closeNodeScope(jjtn000, true);
213    jjtc000 = false;
214log.debug("BUS Production "+ s.jjtGetValue());
215    jjtn000.jjtSetValue(s.jjtGetValue());
216    {if ("" != null) return jjtn000;}
217    } catch (Throwable jjte000) {
218if (jjtc000) {
219      jjtree.clearNodeScope(jjtn000);
220      jjtc000 = false;
221    } else {
222      jjtree.popNode();
223    }
224    if (jjte000 instanceof RuntimeException) {
225      {if (true) throw (RuntimeException)jjte000;}
226    }
227    if (jjte000 instanceof ParseException) {
228      {if (true) throw (ParseException)jjte000;}
229    }
230    {if (true) throw (Error)jjte000;}
231    } finally {
232if (jjtc000) {
233      jjtree.closeNodeScope(jjtn000, true);
234    }
235    }
236    throw new Error("Missing return statement in function");
237}
238
239  final public SimpleNode address() throws ParseException {/*@bgen(jjtree) address */
240                      ASTaddress jjtn000 = new ASTaddress(JJTADDRESS);
241                      boolean jjtc000 = true;
242                      jjtree.openNodeScope(jjtn000);SimpleNode s;
243    try {
244      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
245      case ZEROADDR:{
246        s = zeroaddress();
247        break;
248        }
249      case NONZEROADDR:{
250        s = nonzeroaddress();
251        break;
252        }
253      default:
254        jj_la1[4] = jj_gen;
255        jj_consume_token(-1);
256        throw new ParseException();
257      }
258jjtree.closeNodeScope(jjtn000, true);
259    jjtc000 = false;
260log.debug("Address Production "+ s.jjtGetValue());
261    jjtn000.jjtSetValue(s.jjtGetValue());
262    {if ("" != null) return jjtn000;}
263    } catch (Throwable jjte000) {
264if (jjtc000) {
265      jjtree.clearNodeScope(jjtn000);
266      jjtc000 = false;
267    } else {
268      jjtree.popNode();
269    }
270    if (jjte000 instanceof RuntimeException) {
271      {if (true) throw (RuntimeException)jjte000;}
272    }
273    if (jjte000 instanceof ParseException) {
274      {if (true) throw (ParseException)jjte000;}
275    }
276    {if (true) throw (Error)jjte000;}
277    } finally {
278if (jjtc000) {
279      jjtree.closeNodeScope(jjtn000, true);
280    }
281    }
282    throw new Error("Missing return statement in function");
283}
284
285  final public SimpleNode value() throws ParseException {/*@bgen(jjtree) value */
286                    ASTvalue jjtn000 = new ASTvalue(JJTVALUE);
287                    boolean jjtc000 = true;
288                    jjtree.openNodeScope(jjtn000);SimpleNode s;
289    try {
290      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
291      case ZEROADDR:{
292        s = zeroaddress();
293        break;
294        }
295      case NONZEROADDR:{
296        s = nonzeroaddress();
297        break;
298        }
299      default:
300        jj_la1[5] = jj_gen;
301        jj_consume_token(-1);
302        throw new ParseException();
303      }
304jjtree.closeNodeScope(jjtn000, true);
305    jjtc000 = false;
306log.debug("Value Production "+ s.jjtGetValue());
307    jjtn000.jjtSetValue(s.jjtGetValue());
308    {if ("" != null) return jjtn000;}
309    } catch (Throwable jjte000) {
310if (jjtc000) {
311      jjtree.clearNodeScope(jjtn000);
312      jjtc000 = false;
313    } else {
314      jjtree.popNode();
315    }
316    if (jjte000 instanceof RuntimeException) {
317      {if (true) throw (RuntimeException)jjte000;}
318    }
319    if (jjte000 instanceof ParseException) {
320      {if (true) throw (ParseException)jjte000;}
321    }
322    {if (true) throw (Error)jjte000;}
323    } finally {
324if (jjtc000) {
325      jjtree.closeNodeScope(jjtn000, true);
326    }
327    }
328    throw new Error("Missing return statement in function");
329}
330
331  final public SimpleNode cvno() throws ParseException {/*@bgen(jjtree) cvno */
332                   ASTcvno jjtn000 = new ASTcvno(JJTCVNO);
333                   boolean jjtc000 = true;
334                   jjtree.openNodeScope(jjtn000);SimpleNode s;
335    try {
336      s = nonzeroaddress();
337jjtree.closeNodeScope(jjtn000, true);
338    jjtc000 = false;
339log.debug("CV Number Production "+ s.jjtGetValue());
340    jjtn000.jjtSetValue(s.jjtGetValue());
341    {if ("" != null) return jjtn000;}
342    } catch (Throwable jjte000) {
343if (jjtc000) {
344      jjtree.clearNodeScope(jjtn000);
345      jjtc000 = false;
346    } else {
347      jjtree.popNode();
348    }
349    if (jjte000 instanceof RuntimeException) {
350      {if (true) throw (RuntimeException)jjte000;}
351    }
352    if (jjte000 instanceof ParseException) {
353      {if (true) throw (ParseException)jjte000;}
354    }
355    {if (true) throw (Error)jjte000;}
356    } finally {
357if (jjtc000) {
358      jjtree.closeNodeScope(jjtn000, true);
359    }
360    }
361    throw new Error("Missing return statement in function");
362}
363
364  final public SimpleNode zeroaddress() throws ParseException {/*@bgen(jjtree) zeroaddress */
365                          ASTzeroaddress jjtn000 = new ASTzeroaddress(JJTZEROADDRESS);
366                          boolean jjtc000 = true;
367                          jjtree.openNodeScope(jjtn000);Token t;
368    try {
369      t = jj_consume_token(ZEROADDR);
370jjtree.closeNodeScope(jjtn000, true);
371    jjtc000 = false;
372//Zero Address allows a leading zero
373    log.debug("ZeroAddress Production "+ t.image);
374    jjtn000.jjtSetValue(t.image);
375    {if ("" != null) return jjtn000;}
376    } finally {
377if (jjtc000) {
378      jjtree.closeNodeScope(jjtn000, true);
379    }
380    }
381    throw new Error("Missing return statement in function");
382}
383
384  final public SimpleNode nonzeroaddress() throws ParseException {/*@bgen(jjtree) nonzeroaddress */
385                             ASTnonzeroaddress jjtn000 = new ASTnonzeroaddress(JJTNONZEROADDRESS);
386                             boolean jjtc000 = true;
387                             jjtree.openNodeScope(jjtn000);Token t;
388    try {
389      t = jj_consume_token(NONZEROADDR);
390jjtree.closeNodeScope(jjtn000, true);
391    jjtc000 = false;
392//NonZero Address requires a value  >=1, without
393    //a leading zero
394    log.debug("NonZeroAddress Production "+ t.image);
395    jjtn000.jjtSetValue(t.image);
396    {if ("" != null) return jjtn000;}
397    } finally {
398if (jjtc000) {
399      jjtree.closeNodeScope(jjtn000, true);
400    }
401    }
402    throw new Error("Missing return statement in function");
403}
404
405  final public SimpleNode port() throws ParseException {/*@bgen(jjtree) port */
406                   ASTport jjtn000 = new ASTport(JJTPORT);
407                   boolean jjtc000 = true;
408                   jjtree.openNodeScope(jjtn000);SimpleNode s;
409    try {
410      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
411      case ZEROADDR:{
412        s = zeroaddress();
413        break;
414        }
415      case NONZEROADDR:{
416        s = nonzeroaddress();
417        break;
418        }
419      default:
420        jj_la1[6] = jj_gen;
421        jj_consume_token(-1);
422        throw new ParseException();
423      }
424jjtree.closeNodeScope(jjtn000, true);
425    jjtc000 = false;
426log.debug("PORT Production "+ s.jjtGetValue());
427    jjtn000.jjtSetValue(s.jjtGetValue());
428    {if ("" != null) return jjtn000;}
429    } catch (Throwable jjte000) {
430if (jjtc000) {
431      jjtree.clearNodeScope(jjtn000);
432      jjtc000 = false;
433    } else {
434      jjtree.popNode();
435    }
436    if (jjte000 instanceof RuntimeException) {
437      {if (true) throw (RuntimeException)jjte000;}
438    }
439    if (jjte000 instanceof ParseException) {
440      {if (true) throw (ParseException)jjte000;}
441    }
442    {if (true) throw (Error)jjte000;}
443    } finally {
444if (jjtc000) {
445      jjtree.closeNodeScope(jjtn000, true);
446    }
447    }
448    throw new Error("Missing return statement in function");
449}
450
451  final public SimpleNode devicegroup() throws ParseException {/*@bgen(jjtree) devicegroup */
452                          ASTdevicegroup jjtn000 = new ASTdevicegroup(JJTDEVICEGROUP);
453                          boolean jjtc000 = true;
454                          jjtree.openNodeScope(jjtn000);Token t;
455    try {
456      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
457      case FB:{
458        t = jj_consume_token(FB);
459        break;
460        }
461      case GA:{
462        t = jj_consume_token(GA);
463        break;
464        }
465      case GL:{
466        t = jj_consume_token(GL);
467        break;
468        }
469      case SM:{
470        t = jj_consume_token(SM);
471        break;
472        }
473      case TIME:{
474        t = jj_consume_token(TIME);
475        break;
476        }
477      case SESSION:{
478        t = jj_consume_token(SESSION);
479        break;
480        }
481      case SERVER:{
482        t = jj_consume_token(SERVER);
483        break;
484        }
485      case LOCK:{
486        t = jj_consume_token(LOCK);
487        break;
488        }
489      case DESCRIPTION:{
490        t = jj_consume_token(DESCRIPTION);
491        break;
492        }
493      case POWER:{
494        t = jj_consume_token(POWER);
495        break;
496        }
497      default:
498        jj_la1[7] = jj_gen;
499        jj_consume_token(-1);
500        throw new ParseException();
501      }
502jjtree.closeNodeScope(jjtn000, true);
503    jjtc000 = false;
504log.debug("DeviceGroup Production");
505    jjtn000.jjtSetValue(t.image);
506    {if ("" != null) return jjtn000;}
507    } finally {
508if (jjtc000) {
509      jjtree.closeNodeScope(jjtn000, true);
510    }
511    }
512    throw new Error("Missing return statement in function");
513}
514
515  final public SimpleNode go() throws ParseException {/*@bgen(jjtree) go */
516  ASTgo jjtn000 = new ASTgo(JJTGO);
517  boolean jjtc000 = true;
518  jjtree.openNodeScope(jjtn000);
519    try {
520      jj_consume_token(GO);
521jjtree.closeNodeScope(jjtn000, true);
522    jjtc000 = false;
523log.debug("GO Production");
524     {if ("" != null) return jjtn000;}
525    } finally {
526if (jjtc000) {
527      jjtree.closeNodeScope(jjtn000, true);
528    }
529    }
530    throw new Error("Missing return statement in function");
531}
532
533  final public SimpleNode get() throws ParseException {/*@bgen(jjtree) get */
534  ASTget jjtn000 = new ASTget(JJTGET);
535  boolean jjtc000 = true;
536  jjtree.openNodeScope(jjtn000);
537    try {
538      jj_consume_token(GET);
539      bus();
540      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
541      case FB:{
542        fb();
543        address();
544        break;
545        }
546      case GA:{
547        ga();
548        address();
549        port();
550        break;
551        }
552      case GL:{
553        gl();
554        address();
555        break;
556        }
557      case SM:{
558        sm();
559        address();
560        progmode();
561        cvno();
562        label_1:
563        while (true) {
564          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
565          case ZEROADDR:
566          case NONZEROADDR:{
567            ;
568            break;
569            }
570          default:
571            jj_la1[8] = jj_gen;
572            break label_1;
573          }
574          value();
575        }
576        break;
577        }
578      case TIME:{
579        time();
580        break;
581        }
582      case POWER:{
583        power();
584        break;
585        }
586      case SERVER:{
587        server();
588        break;
589        }
590      case SESSION:{
591        session();
592        address();
593        break;
594        }
595      case LOCK:{
596        lock();
597        break;
598        }
599      case DESCRIPTION:{
600        description();
601        break;
602        }
603      default:
604        jj_la1[9] = jj_gen;
605        jj_consume_token(-1);
606        throw new ParseException();
607      }
608jjtree.closeNodeScope(jjtn000, true);
609    jjtc000 = false;
610log.debug("GET Production");
611     {if ("" != null) return jjtn000;}
612    } catch (Throwable jjte000) {
613if (jjtc000) {
614      jjtree.clearNodeScope(jjtn000);
615      jjtc000 = false;
616    } else {
617      jjtree.popNode();
618    }
619    if (jjte000 instanceof RuntimeException) {
620      {if (true) throw (RuntimeException)jjte000;}
621    }
622    if (jjte000 instanceof ParseException) {
623      {if (true) throw (ParseException)jjte000;}
624    }
625    {if (true) throw (Error)jjte000;}
626    } finally {
627if (jjtc000) {
628      jjtree.closeNodeScope(jjtn000, true);
629    }
630    }
631    throw new Error("Missing return statement in function");
632}
633
634  final public SimpleNode handshake_set() throws ParseException {/*@bgen(jjtree) handshake_set */
635  ASThandshake_set jjtn000 = new ASThandshake_set(JJTHANDSHAKE_SET);
636  boolean jjtc000 = true;
637  jjtree.openNodeScope(jjtn000);
638    try {
639      jj_consume_token(SET);
640      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
641      case PROTOCOLLITTERAL:{
642        protocollitteral();
643        serviceversion();
644        break;
645        }
646      case CONNECTIONMODELITTERAL:{
647        connectionlitteral();
648        jj_consume_token(SRCP);
649        connectionmode();
650        break;
651        }
652      default:
653        jj_la1[10] = jj_gen;
654        jj_consume_token(-1);
655        throw new ParseException();
656      }
657jjtree.closeNodeScope(jjtn000, true);
658    jjtc000 = false;
659log.debug("Handshake Mode SET Production");
660    {if ("" != null) return jjtn000;}
661    } catch (Throwable jjte000) {
662if (jjtc000) {
663            jjtree.clearNodeScope(jjtn000);
664            jjtc000 = false;
665          } else {
666            jjtree.popNode();
667          }
668          if (jjte000 instanceof RuntimeException) {
669            {if (true) throw (RuntimeException)jjte000;}
670          }
671          if (jjte000 instanceof ParseException) {
672            {if (true) throw (ParseException)jjte000;}
673          }
674          {if (true) throw (Error)jjte000;}
675    } finally {
676if (jjtc000) {
677            jjtree.closeNodeScope(jjtn000, true);
678          }
679    }
680    throw new Error("Missing return statement in function");
681}
682
683  final public SimpleNode protocollitteral() throws ParseException {/*@bgen(jjtree) protocollitteral */
684  ASTprotocollitteral jjtn000 = new ASTprotocollitteral(JJTPROTOCOLLITTERAL);
685  boolean jjtc000 = true;
686  jjtree.openNodeScope(jjtn000);
687    try {
688      jj_consume_token(PROTOCOLLITTERAL);
689jjtree.closeNodeScope(jjtn000, true);
690     jjtc000 = false;
691log.debug("Protocol Litteral production");
692       {if ("" != null) return jjtn000;}
693    } finally {
694if (jjtc000) {
695       jjtree.closeNodeScope(jjtn000, true);
696     }
697    }
698    throw new Error("Missing return statement in function");
699}
700
701  final public SimpleNode connectionlitteral() throws ParseException {/*@bgen(jjtree) connectionlitteral */
702  ASTconnectionlitteral jjtn000 = new ASTconnectionlitteral(JJTCONNECTIONLITTERAL);
703  boolean jjtc000 = true;
704  jjtree.openNodeScope(jjtn000);
705    try {
706      jj_consume_token(CONNECTIONMODELITTERAL);
707jjtree.closeNodeScope(jjtn000, true);
708     jjtc000 = false;
709log.debug("Connection Litteral production");
710       {if ("" != null) return jjtn000;}
711    } finally {
712if (jjtc000) {
713       jjtree.closeNodeScope(jjtn000, true);
714     }
715    }
716    throw new Error("Missing return statement in function");
717}
718
719  final public SimpleNode set() throws ParseException {/*@bgen(jjtree) set */
720  ASTset jjtn000 = new ASTset(JJTSET);
721  boolean jjtc000 = true;
722  jjtree.openNodeScope(jjtn000);
723    try {
724      jj_consume_token(SET);
725      bus();
726      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
727      case GL:{
728        gl();
729        address();
730        drivemode();
731        address();
732        address();
733        label_2:
734        while (true) {
735          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
736          case ZEROADDR:
737          case NONZEROADDR:
738          case DRIVEMODE:
739          case FUNCTIONMODE:{
740            ;
741            break;
742            }
743          default:
744            jj_la1[11] = jj_gen;
745            break label_2;
746          }
747          functionmode();
748        }
749        break;
750        }
751      case SM:{
752        sm();
753        address();
754        progmode();
755        cvno();
756        label_3:
757        while (true) {
758          value();
759          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
760          case ZEROADDR:
761          case NONZEROADDR:{
762            ;
763            break;
764            }
765          default:
766            jj_la1[12] = jj_gen;
767            break label_3;
768          }
769        }
770        break;
771        }
772      case GA:{
773        ga();
774        address();
775        port();
776        zeroone();
777        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
778        case DELAY:{
779          delay();
780          break;
781          }
782        case ZEROADDR:
783        case NONZEROADDR:{
784          timeout();
785          break;
786          }
787        default:
788          jj_la1[13] = jj_gen;
789          jj_consume_token(-1);
790          throw new ParseException();
791        }
792        break;
793        }
794      case FB:{
795        fb();
796        address();
797        zeroone();
798        break;
799        }
800      case TIME:{
801        time();
802        address();
803        address();
804        address();
805        address();
806        break;
807        }
808      case POWER:{
809        power();
810        onoff();
811        break;
812        }
813      case LOCK:{
814        lock();
815        break;
816        }
817      default:
818        jj_la1[14] = jj_gen;
819        jj_consume_token(-1);
820        throw new ParseException();
821      }
822jjtree.closeNodeScope(jjtn000, true);
823    jjtc000 = false;
824log.debug("SET Production");
825    {if ("" != null) return jjtn000;}
826    } catch (Throwable jjte000) {
827if (jjtc000) {
828      jjtree.clearNodeScope(jjtn000);
829      jjtc000 = false;
830    } else {
831      jjtree.popNode();
832    }
833    if (jjte000 instanceof RuntimeException) {
834      {if (true) throw (RuntimeException)jjte000;}
835    }
836    if (jjte000 instanceof ParseException) {
837      {if (true) throw (ParseException)jjte000;}
838    }
839    {if (true) throw (Error)jjte000;}
840    } finally {
841if (jjtc000) {
842      jjtree.closeNodeScope(jjtn000, true);
843    }
844    }
845    throw new Error("Missing return statement in function");
846}
847
848  final public SimpleNode term() throws ParseException {/*@bgen(jjtree) term */
849  ASTterm jjtn000 = new ASTterm(JJTTERM);
850  boolean jjtc000 = true;
851  jjtree.openNodeScope(jjtn000);
852    try {
853      jj_consume_token(TERM);
854      bus();
855      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
856      case FB:{
857        fb();
858        break;
859        }
860      case GL:{
861        gl();
862        address();
863        break;
864        }
865      case SM:{
866        sm();
867        break;
868        }
869      case POWER:{
870        power();
871        break;
872        }
873      case SERVER:{
874        server();
875        break;
876        }
877      case LOCK:{
878        lock();
879        break;
880        }
881      case TIME:{
882        time();
883        break;
884        }
885      case SESSION:{
886        session();
887        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
888        case ZEROADDR:
889        case NONZEROADDR:{
890          address();
891          break;
892          }
893        default:
894          jj_la1[15] = jj_gen;
895          ;
896        }
897        break;
898        }
899      default:
900        jj_la1[16] = jj_gen;
901        jj_consume_token(-1);
902        throw new ParseException();
903      }
904jjtree.closeNodeScope(jjtn000, true);
905    jjtc000 = false;
906{if ("" != null) return jjtn000;}
907    } catch (Throwable jjte000) {
908if (jjtc000) {
909      jjtree.clearNodeScope(jjtn000);
910      jjtc000 = false;
911    } else {
912      jjtree.popNode();
913    }
914    if (jjte000 instanceof RuntimeException) {
915      {if (true) throw (RuntimeException)jjte000;}
916    }
917    if (jjte000 instanceof ParseException) {
918      {if (true) throw (ParseException)jjte000;}
919    }
920    {if (true) throw (Error)jjte000;}
921    } finally {
922if (jjtc000) {
923      jjtree.closeNodeScope(jjtn000, true);
924    }
925    }
926    throw new Error("Missing return statement in function");
927}
928
929  final public SimpleNode check() throws ParseException {/*@bgen(jjtree) check */
930  ASTcheck jjtn000 = new ASTcheck(JJTCHECK);
931  boolean jjtc000 = true;
932  jjtree.openNodeScope(jjtn000);
933    try {
934      jj_consume_token(CHECK);
935      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
936      case ZEROADDR:
937      case NONZEROADDR:{
938        bus();
939        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
940        case GL:{
941          gl();
942          break;
943          }
944        case SM:{
945          sm();
946          break;
947          }
948        case GA:{
949          ga();
950          address();
951          port();
952          zeroone();
953          switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
954          case DELAY:{
955            delay();
956            break;
957            }
958          case ZEROADDR:
959          case NONZEROADDR:{
960            timeout();
961            break;
962            }
963          default:
964            jj_la1[17] = jj_gen;
965            jj_consume_token(-1);
966            throw new ParseException();
967          }
968          break;
969          }
970        case FB:{
971          fb();
972          address();
973          zeroone();
974          break;
975          }
976        case TIME:{
977          time();
978          break;
979          }
980        case POWER:{
981          power();
982          onoff();
983          break;
984          }
985        case LOCK:{
986          lock();
987          break;
988          }
989        default:
990          jj_la1[18] = jj_gen;
991          jj_consume_token(-1);
992          throw new ParseException();
993        }
994        break;
995        }
996      case PROTOCOLLITTERAL:{
997        jj_consume_token(PROTOCOLLITTERAL);
998        serviceversion();
999        break;
1000        }
1001      case CONNECTIONMODELITTERAL:{
1002        jj_consume_token(CONNECTIONMODELITTERAL);
1003        connectionmode();
1004        break;
1005        }
1006      default:
1007        jj_la1[19] = jj_gen;
1008        jj_consume_token(-1);
1009        throw new ParseException();
1010      }
1011jjtree.closeNodeScope(jjtn000, true);
1012    jjtc000 = false;
1013log.debug("Check Production");
1014    {if ("" != null) return jjtn000;}
1015    } catch (Throwable jjte000) {
1016if (jjtc000) {
1017      jjtree.clearNodeScope(jjtn000);
1018      jjtc000 = false;
1019    } else {
1020      jjtree.popNode();
1021    }
1022    if (jjte000 instanceof RuntimeException) {
1023      {if (true) throw (RuntimeException)jjte000;}
1024    }
1025    if (jjte000 instanceof ParseException) {
1026      {if (true) throw (ParseException)jjte000;}
1027    }
1028    {if (true) throw (Error)jjte000;}
1029    } finally {
1030if (jjtc000) {
1031      jjtree.closeNodeScope(jjtn000, true);
1032    }
1033    }
1034    throw new Error("Missing return statement in function");
1035}
1036
1037  final public SimpleNode wait_cmd() throws ParseException {/*@bgen(jjtree) wait_cmd */
1038  ASTwait_cmd jjtn000 = new ASTwait_cmd(JJTWAIT_CMD);
1039  boolean jjtc000 = true;
1040  jjtree.openNodeScope(jjtn000);
1041    try {
1042      jj_consume_token(WAIT);
1043      bus();
1044      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1045      case FB:{
1046        fb();
1047        address();
1048        zeroone();
1049        timeout();
1050        break;
1051        }
1052      case TIME:{
1053        time();
1054        address();
1055        address();
1056        address();
1057        address();
1058        break;
1059        }
1060      default:
1061        jj_la1[20] = jj_gen;
1062        jj_consume_token(-1);
1063        throw new ParseException();
1064      }
1065jjtree.closeNodeScope(jjtn000, true);
1066    jjtc000 = false;
1067log.debug("WAIT Production");
1068     {if ("" != null) return jjtn000;}
1069    } catch (Throwable jjte000) {
1070if (jjtc000) {
1071      jjtree.clearNodeScope(jjtn000);
1072      jjtc000 = false;
1073    } else {
1074      jjtree.popNode();
1075    }
1076    if (jjte000 instanceof RuntimeException) {
1077      {if (true) throw (RuntimeException)jjte000;}
1078    }
1079    if (jjte000 instanceof ParseException) {
1080      {if (true) throw (ParseException)jjte000;}
1081    }
1082    {if (true) throw (Error)jjte000;}
1083    } finally {
1084if (jjtc000) {
1085      jjtree.closeNodeScope(jjtn000, true);
1086    }
1087    }
1088    throw new Error("Missing return statement in function");
1089}
1090
1091  final public SimpleNode init() throws ParseException {/*@bgen(jjtree) init */
1092  ASTinit jjtn000 = new ASTinit(JJTINIT);
1093  boolean jjtc000 = true;
1094  jjtree.openNodeScope(jjtn000);
1095    try {
1096      jj_consume_token(INIT);
1097      bus();
1098      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1099      case FB:{
1100        fb();
1101        break;
1102        }
1103      case GA:{
1104        ga();
1105        address();
1106        protocol();
1107        break;
1108        }
1109      case GL:{
1110        gl();
1111        address();
1112        protocol();
1113        break;
1114        }
1115      case SM:{
1116        sm();
1117        jj_consume_token(NMRA);
1118        break;
1119        }
1120      case TIME:{
1121        time();
1122        nonzeroaddress();
1123        nonzeroaddress();
1124        break;
1125        }
1126      case POWER:{
1127        power();
1128        break;
1129        }
1130      default:
1131        jj_la1[21] = jj_gen;
1132        jj_consume_token(-1);
1133        throw new ParseException();
1134      }
1135jjtree.closeNodeScope(jjtn000, true);
1136    jjtc000 = false;
1137log.debug("INIT Production");
1138     {if ("" != null) return jjtn000;}
1139    } catch (Throwable jjte000) {
1140if (jjtc000) {
1141      jjtree.clearNodeScope(jjtn000);
1142      jjtc000 = false;
1143    } else {
1144      jjtree.popNode();
1145    }
1146    if (jjte000 instanceof RuntimeException) {
1147      {if (true) throw (RuntimeException)jjte000;}
1148    }
1149    if (jjte000 instanceof ParseException) {
1150      {if (true) throw (ParseException)jjte000;}
1151    }
1152    {if (true) throw (Error)jjte000;}
1153    } finally {
1154if (jjtc000) {
1155      jjtree.closeNodeScope(jjtn000, true);
1156    }
1157    }
1158    throw new Error("Missing return statement in function");
1159}
1160
1161  final public SimpleNode reset() throws ParseException {/*@bgen(jjtree) reset */
1162  ASTreset jjtn000 = new ASTreset(JJTRESET);
1163  boolean jjtc000 = true;
1164  jjtree.openNodeScope(jjtn000);
1165    try {
1166      jj_consume_token(RESET);
1167      bus();
1168      server();
1169jjtree.closeNodeScope(jjtn000, true);
1170    jjtc000 = false;
1171log.debug("RESET Production");
1172     {if ("" != null) return jjtn000;}
1173    } catch (Throwable jjte000) {
1174if (jjtc000) {
1175      jjtree.clearNodeScope(jjtn000);
1176      jjtc000 = false;
1177    } else {
1178      jjtree.popNode();
1179    }
1180    if (jjte000 instanceof RuntimeException) {
1181      {if (true) throw (RuntimeException)jjte000;}
1182    }
1183    if (jjte000 instanceof ParseException) {
1184      {if (true) throw (ParseException)jjte000;}
1185    }
1186    {if (true) throw (Error)jjte000;}
1187    } finally {
1188if (jjtc000) {
1189      jjtree.closeNodeScope(jjtn000, true);
1190    }
1191    }
1192    throw new Error("Missing return statement in function");
1193}
1194
1195  final public SimpleNode verify() throws ParseException {/*@bgen(jjtree) verify */
1196  ASTverify jjtn000 = new ASTverify(JJTVERIFY);
1197  boolean jjtc000 = true;
1198  jjtree.openNodeScope(jjtn000);
1199    try {
1200      jj_consume_token(VERIFY);
1201      bus();
1202      sm();
1203      address();
1204      progmode();
1205      cvno();
1206      label_4:
1207      while (true) {
1208        value();
1209        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1210        case ZEROADDR:
1211        case NONZEROADDR:{
1212          ;
1213          break;
1214          }
1215        default:
1216          jj_la1[22] = jj_gen;
1217          break label_4;
1218        }
1219      }
1220jjtree.closeNodeScope(jjtn000, true);
1221    jjtc000 = false;
1222log.debug("RESET Production");
1223     {if ("" != null) return jjtn000;}
1224    } catch (Throwable jjte000) {
1225if (jjtc000) {
1226      jjtree.clearNodeScope(jjtn000);
1227      jjtc000 = false;
1228    } else {
1229      jjtree.popNode();
1230    }
1231    if (jjte000 instanceof RuntimeException) {
1232      {if (true) throw (RuntimeException)jjte000;}
1233    }
1234    if (jjte000 instanceof ParseException) {
1235      {if (true) throw (ParseException)jjte000;}
1236    }
1237    {if (true) throw (Error)jjte000;}
1238    } finally {
1239if (jjtc000) {
1240      jjtree.closeNodeScope(jjtn000, true);
1241    }
1242    }
1243    throw new Error("Missing return statement in function");
1244}
1245
1246  final public SimpleNode gl() throws ParseException {/*@bgen(jjtree) gl */
1247                 ASTgl jjtn000 = new ASTgl(JJTGL);
1248                 boolean jjtc000 = true;
1249                 jjtree.openNodeScope(jjtn000);Token t;
1250    try {
1251      t = jj_consume_token(GL);
1252jjtree.closeNodeScope(jjtn000, true);
1253    jjtc000 = false;
1254jjtn000.jjtSetValue(t.image);
1255     {if ("" != null) return jjtn000;}
1256    } finally {
1257if (jjtc000) {
1258      jjtree.closeNodeScope(jjtn000, true);
1259    }
1260    }
1261    throw new Error("Missing return statement in function");
1262}
1263
1264  final public SimpleNode sm() throws ParseException {/*@bgen(jjtree) sm */
1265                 ASTsm jjtn000 = new ASTsm(JJTSM);
1266                 boolean jjtc000 = true;
1267                 jjtree.openNodeScope(jjtn000);Token t;
1268    try {
1269      t = jj_consume_token(SM);
1270jjtree.closeNodeScope(jjtn000, true);
1271    jjtc000 = false;
1272jjtn000.jjtSetValue(t.image);
1273     {if ("" != null) return jjtn000;}
1274    } finally {
1275if (jjtc000) {
1276      jjtree.closeNodeScope(jjtn000, true);
1277    }
1278    }
1279    throw new Error("Missing return statement in function");
1280}
1281
1282  final public SimpleNode ga() throws ParseException {/*@bgen(jjtree) ga */
1283                 ASTga jjtn000 = new ASTga(JJTGA);
1284                 boolean jjtc000 = true;
1285                 jjtree.openNodeScope(jjtn000);Token t;
1286    try {
1287      t = jj_consume_token(GA);
1288jjtree.closeNodeScope(jjtn000, true);
1289    jjtc000 = false;
1290jjtn000.jjtSetValue(t.image);
1291    {if ("" != null) return jjtn000;}
1292    } finally {
1293if (jjtc000) {
1294      jjtree.closeNodeScope(jjtn000, true);
1295    }
1296    }
1297    throw new Error("Missing return statement in function");
1298}
1299
1300  final public SimpleNode fb() throws ParseException {/*@bgen(jjtree) fb */
1301                 ASTfb jjtn000 = new ASTfb(JJTFB);
1302                 boolean jjtc000 = true;
1303                 jjtree.openNodeScope(jjtn000);Token t;
1304    try {
1305      t = jj_consume_token(FB);
1306jjtree.closeNodeScope(jjtn000, true);
1307    jjtc000 = false;
1308jjtn000.jjtSetValue(t.image);
1309    {if ("" != null) return jjtn000;}
1310    } finally {
1311if (jjtc000) {
1312      jjtree.closeNodeScope(jjtn000, true);
1313    }
1314    }
1315    throw new Error("Missing return statement in function");
1316}
1317
1318  final public SimpleNode time() throws ParseException {/*@bgen(jjtree) time */
1319                   ASTtime jjtn000 = new ASTtime(JJTTIME);
1320                   boolean jjtc000 = true;
1321                   jjtree.openNodeScope(jjtn000);Token t;
1322    try {
1323      t = jj_consume_token(TIME);
1324jjtree.closeNodeScope(jjtn000, true);
1325    jjtc000 = false;
1326jjtn000.jjtSetValue(t.image);
1327    {if ("" != null) return jjtn000;}
1328    } finally {
1329if (jjtc000) {
1330      jjtree.closeNodeScope(jjtn000, true);
1331    }
1332    }
1333    throw new Error("Missing return statement in function");
1334}
1335
1336  final public SimpleNode power() throws ParseException {/*@bgen(jjtree) power */
1337                    ASTpower jjtn000 = new ASTpower(JJTPOWER);
1338                    boolean jjtc000 = true;
1339                    jjtree.openNodeScope(jjtn000);Token t;
1340    try {
1341      t = jj_consume_token(POWER);
1342jjtree.closeNodeScope(jjtn000, true);
1343    jjtc000 = false;
1344jjtn000.jjtSetValue(t.image);
1345    {if ("" != null) return jjtn000;}
1346    } finally {
1347if (jjtc000) {
1348      jjtree.closeNodeScope(jjtn000, true);
1349    }
1350    }
1351    throw new Error("Missing return statement in function");
1352}
1353
1354  final public SimpleNode server() throws ParseException {/*@bgen(jjtree) server */
1355                     ASTserver jjtn000 = new ASTserver(JJTSERVER);
1356                     boolean jjtc000 = true;
1357                     jjtree.openNodeScope(jjtn000);Token t;
1358    try {
1359      t = jj_consume_token(SERVER);
1360jjtree.closeNodeScope(jjtn000, true);
1361    jjtc000 = false;
1362jjtn000.jjtSetValue(t.image);
1363    {if ("" != null) return jjtn000;}
1364    } finally {
1365if (jjtc000) {
1366      jjtree.closeNodeScope(jjtn000, true);
1367    }
1368    }
1369    throw new Error("Missing return statement in function");
1370}
1371
1372  final public SimpleNode session() throws ParseException {/*@bgen(jjtree) session */
1373                      ASTsession jjtn000 = new ASTsession(JJTSESSION);
1374                      boolean jjtc000 = true;
1375                      jjtree.openNodeScope(jjtn000);Token t;
1376    try {
1377      t = jj_consume_token(SESSION);
1378jjtree.closeNodeScope(jjtn000, true);
1379    jjtc000 = false;
1380jjtn000.jjtSetValue(t.image);
1381    {if ("" != null) return jjtn000;}
1382    } finally {
1383if (jjtc000) {
1384      jjtree.closeNodeScope(jjtn000, true);
1385    }
1386    }
1387    throw new Error("Missing return statement in function");
1388}
1389
1390  final public SimpleNode lock() throws ParseException {/*@bgen(jjtree) lock */
1391                   ASTlock jjtn000 = new ASTlock(JJTLOCK);
1392                   boolean jjtc000 = true;
1393                   jjtree.openNodeScope(jjtn000);Token t;
1394    try {
1395      t = jj_consume_token(LOCK);
1396      devicegroup();
1397      address();
1398      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1399      case ZEROADDR:
1400      case NONZEROADDR:{
1401        address();
1402        break;
1403        }
1404      default:
1405        jj_la1[23] = jj_gen;
1406        ;
1407      }
1408jjtree.closeNodeScope(jjtn000, true);
1409    jjtc000 = false;
1410jjtn000.jjtSetValue(t.image);
1411    {if ("" != null) return jjtn000;}
1412    } catch (Throwable jjte000) {
1413if (jjtc000) {
1414      jjtree.clearNodeScope(jjtn000);
1415      jjtc000 = false;
1416    } else {
1417      jjtree.popNode();
1418    }
1419    if (jjte000 instanceof RuntimeException) {
1420      {if (true) throw (RuntimeException)jjte000;}
1421    }
1422    if (jjte000 instanceof ParseException) {
1423      {if (true) throw (ParseException)jjte000;}
1424    }
1425    {if (true) throw (Error)jjte000;}
1426    } finally {
1427if (jjtc000) {
1428      jjtree.closeNodeScope(jjtn000, true);
1429    }
1430    }
1431    throw new Error("Missing return statement in function");
1432}
1433
1434  final public SimpleNode description() throws ParseException {/*@bgen(jjtree) description */
1435                          ASTdescription jjtn000 = new ASTdescription(JJTDESCRIPTION);
1436                          boolean jjtc000 = true;
1437                          jjtree.openNodeScope(jjtn000);Token t; SimpleNode s; SimpleNode r;
1438    try {
1439      t = jj_consume_token(DESCRIPTION);
1440      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1441      case FB:
1442      case GA:
1443      case GL:
1444      case SM:
1445      case LOCK:
1446      case TIME:
1447      case POWER:
1448      case SESSION:
1449      case DESCRIPTION:
1450      case SERVER:{
1451        devicegroup();
1452        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1453        case ZEROADDR:
1454        case NONZEROADDR:{
1455          address();
1456          break;
1457          }
1458        default:
1459          jj_la1[24] = jj_gen;
1460          ;
1461        }
1462        break;
1463        }
1464      default:
1465        jj_la1[25] = jj_gen;
1466        ;
1467      }
1468jjtree.closeNodeScope(jjtn000, true);
1469    jjtc000 = false;
1470jjtn000.jjtSetValue(t.image);
1471    {if ("" != null) return jjtn000;}
1472    } catch (Throwable jjte000) {
1473if (jjtc000) {
1474      jjtree.clearNodeScope(jjtn000);
1475      jjtc000 = false;
1476    } else {
1477      jjtree.popNode();
1478    }
1479    if (jjte000 instanceof RuntimeException) {
1480      {if (true) throw (RuntimeException)jjte000;}
1481    }
1482    if (jjte000 instanceof ParseException) {
1483      {if (true) throw (ParseException)jjte000;}
1484    }
1485    {if (true) throw (Error)jjte000;}
1486    } finally {
1487if (jjtc000) {
1488      jjtree.closeNodeScope(jjtn000, true);
1489    }
1490    }
1491    throw new Error("Missing return statement in function");
1492}
1493
1494  final public SimpleNode onoff() throws ParseException {/*@bgen(jjtree) onoff */
1495                    ASTonoff jjtn000 = new ASTonoff(JJTONOFF);
1496                    boolean jjtc000 = true;
1497                    jjtree.openNodeScope(jjtn000);Token t;
1498    try {
1499      t = jj_consume_token(ONOFF);
1500jjtree.closeNodeScope(jjtn000, true);
1501    jjtc000 = false;
1502log.debug("OnOff Production " +t.image);
1503     jjtn000.jjtSetValue(t.image);
1504     {if ("" != null) return jjtn000;}
1505    } finally {
1506if (jjtc000) {
1507      jjtree.closeNodeScope(jjtn000, true);
1508    }
1509    }
1510    throw new Error("Missing return statement in function");
1511}
1512
1513  final public SimpleNode zeroone() throws ParseException {/*@bgen(jjtree) zeroone */
1514                      ASTzeroone jjtn000 = new ASTzeroone(JJTZEROONE);
1515                      boolean jjtc000 = true;
1516                      jjtree.openNodeScope(jjtn000);SimpleNode s;
1517    try {
1518      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1519      case ZEROADDR:{
1520        s = zeroaddress();
1521        break;
1522        }
1523      case NONZEROADDR:{
1524        s = nonzeroaddress();
1525        break;
1526        }
1527      default:
1528        jj_la1[26] = jj_gen;
1529        jj_consume_token(-1);
1530        throw new ParseException();
1531      }
1532jjtree.closeNodeScope(jjtn000, true);
1533    jjtc000 = false;
1534log.debug("ZeroOne Production ");
1535     jjtn000.jjtSetValue(s.jjtGetValue());
1536     {if ("" != null) return jjtn000;}
1537    } catch (Throwable jjte000) {
1538if (jjtc000) {
1539      jjtree.clearNodeScope(jjtn000);
1540      jjtc000 = false;
1541    } else {
1542      jjtree.popNode();
1543    }
1544    if (jjte000 instanceof RuntimeException) {
1545      {if (true) throw (RuntimeException)jjte000;}
1546    }
1547    if (jjte000 instanceof ParseException) {
1548      {if (true) throw (ParseException)jjte000;}
1549    }
1550    {if (true) throw (Error)jjte000;}
1551    } finally {
1552if (jjtc000) {
1553      jjtree.closeNodeScope(jjtn000, true);
1554    }
1555    }
1556    throw new Error("Missing return statement in function");
1557}
1558
1559  final public SimpleNode delay() throws ParseException {/*@bgen(jjtree) delay */
1560                    ASTdelay jjtn000 = new ASTdelay(JJTDELAY);
1561                    boolean jjtc000 = true;
1562                    jjtree.openNodeScope(jjtn000);Token t;
1563    try {
1564      // time timeout is a non-zero integer.  It may be negative.
1565        t = jj_consume_token(DELAY);
1566jjtree.closeNodeScope(jjtn000, true);
1567    jjtc000 = false;
1568log.debug("Delay Production " +t.image);
1569     {if ("" != null) return jjtn000;}
1570    } finally {
1571if (jjtc000) {
1572      jjtree.closeNodeScope(jjtn000, true);
1573    }
1574    }
1575    throw new Error("Missing return statement in function");
1576}
1577
1578  final public SimpleNode timeout() throws ParseException {/*@bgen(jjtree) timeout */
1579                      ASTtimeout jjtn000 = new ASTtimeout(JJTTIMEOUT);
1580                      boolean jjtc000 = true;
1581                      jjtree.openNodeScope(jjtn000);Token t;
1582    try {
1583      address();
1584jjtree.closeNodeScope(jjtn000, true);
1585    jjtc000 = false;
1586log.debug("Timeout Production ");
1587     {if ("" != null) return jjtn000;}
1588    } catch (Throwable jjte000) {
1589if (jjtc000) {
1590      jjtree.clearNodeScope(jjtn000);
1591      jjtc000 = false;
1592    } else {
1593      jjtree.popNode();
1594    }
1595    if (jjte000 instanceof RuntimeException) {
1596      {if (true) throw (RuntimeException)jjte000;}
1597    }
1598    if (jjte000 instanceof ParseException) {
1599      {if (true) throw (ParseException)jjte000;}
1600    }
1601    {if (true) throw (Error)jjte000;}
1602    } finally {
1603if (jjtc000) {
1604      jjtree.closeNodeScope(jjtn000, true);
1605    }
1606    }
1607    throw new Error("Missing return statement in function");
1608}
1609
1610// service mode programming modes
1611  final public 
1612SimpleNode progmode() throws ParseException {/*@bgen(jjtree) progmode */
1613                       ASTprogmode jjtn000 = new ASTprogmode(JJTPROGMODE);
1614                       boolean jjtc000 = true;
1615                       jjtree.openNodeScope(jjtn000);SimpleNode s;
1616    try {
1617      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1618      case CVBIT:{
1619        s = cvbit();
1620        break;
1621        }
1622      case CV:{
1623        s = cv();
1624        break;
1625        }
1626      case REG:{
1627        s = reg();
1628        break;
1629        }
1630      default:
1631        jj_la1[27] = jj_gen;
1632        jj_consume_token(-1);
1633        throw new ParseException();
1634      }
1635jjtree.closeNodeScope(jjtn000, true);
1636    jjtc000 = false;
1637log.debug("Programming Mode Production ");
1638     {if ("" != null) return jjtn000;}
1639    } catch (Throwable jjte000) {
1640if (jjtc000) {
1641      jjtree.clearNodeScope(jjtn000);
1642      jjtc000 = false;
1643    } else {
1644      jjtree.popNode();
1645    }
1646    if (jjte000 instanceof RuntimeException) {
1647      {if (true) throw (RuntimeException)jjte000;}
1648    }
1649    if (jjte000 instanceof ParseException) {
1650      {if (true) throw (ParseException)jjte000;}
1651    }
1652    {if (true) throw (Error)jjte000;}
1653    } finally {
1654if (jjtc000) {
1655      jjtree.closeNodeScope(jjtn000, true);
1656    }
1657    }
1658    throw new Error("Missing return statement in function");
1659}
1660
1661  final public SimpleNode cv() throws ParseException {/*@bgen(jjtree) cv */
1662  ASTcv jjtn000 = new ASTcv(JJTCV);
1663  boolean jjtc000 = true;
1664  jjtree.openNodeScope(jjtn000);
1665    try {
1666      jj_consume_token(CV);
1667jjtree.closeNodeScope(jjtn000, true);
1668    jjtc000 = false;
1669{if ("" != null) return jjtn000;}
1670    } finally {
1671if (jjtc000) {
1672      jjtree.closeNodeScope(jjtn000, true);
1673    }
1674    }
1675    throw new Error("Missing return statement in function");
1676}
1677
1678  final public SimpleNode cvbit() throws ParseException {/*@bgen(jjtree) cvbit */
1679  ASTcvbit jjtn000 = new ASTcvbit(JJTCVBIT);
1680  boolean jjtc000 = true;
1681  jjtree.openNodeScope(jjtn000);
1682    try {
1683      jj_consume_token(CVBIT);
1684jjtree.closeNodeScope(jjtn000, true);
1685    jjtc000 = false;
1686{if ("" != null) return jjtn000;}
1687    } finally {
1688if (jjtc000) {
1689      jjtree.closeNodeScope(jjtn000, true);
1690    }
1691    }
1692    throw new Error("Missing return statement in function");
1693}
1694
1695  final public SimpleNode reg() throws ParseException {/*@bgen(jjtree) reg */
1696  ASTreg jjtn000 = new ASTreg(JJTREG);
1697  boolean jjtc000 = true;
1698  jjtree.openNodeScope(jjtn000);
1699    try {
1700      jj_consume_token(REG);
1701jjtree.closeNodeScope(jjtn000, true);
1702    jjtc000 = false;
1703{if ("" != null) return jjtn000;}
1704    } finally {
1705if (jjtc000) {
1706      jjtree.closeNodeScope(jjtn000, true);
1707    }
1708    }
1709    throw new Error("Missing return statement in function");
1710}
1711
1712  final public SimpleNode protocol() throws ParseException {/*@bgen(jjtree) protocol */
1713                       ASTprotocol jjtn000 = new ASTprotocol(JJTPROTOCOL);
1714                       boolean jjtc000 = true;
1715                       jjtree.openNodeScope(jjtn000);Token t;
1716    try {
1717      t = jj_consume_token(PROTOCOL);
1718      label_5:
1719      while (true) {
1720        switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1721        case ZEROADDR:
1722        case NONZEROADDR:{
1723          ;
1724          break;
1725          }
1726        default:
1727          jj_la1[28] = jj_gen;
1728          break label_5;
1729        }
1730        address();
1731      }
1732jjtree.closeNodeScope(jjtn000, true);
1733    jjtc000 = false;
1734log.debug("Protocol Production "+ t.image);
1735    jjtn000.jjtSetValue(t.image);
1736    {if ("" != null) return jjtn000;}
1737    } catch (Throwable jjte000) {
1738if (jjtc000) {
1739      jjtree.clearNodeScope(jjtn000);
1740      jjtc000 = false;
1741    } else {
1742      jjtree.popNode();
1743    }
1744    if (jjte000 instanceof RuntimeException) {
1745      {if (true) throw (RuntimeException)jjte000;}
1746    }
1747    if (jjte000 instanceof ParseException) {
1748      {if (true) throw (ParseException)jjte000;}
1749    }
1750    {if (true) throw (Error)jjte000;}
1751    } finally {
1752if (jjtc000) {
1753      jjtree.closeNodeScope(jjtn000, true);
1754    }
1755    }
1756    throw new Error("Missing return statement in function");
1757}
1758
1759  final public SimpleNode drivemode() throws ParseException {/*@bgen(jjtree) drivemode */
1760                        ASTdrivemode jjtn000 = new ASTdrivemode(JJTDRIVEMODE);
1761                        boolean jjtc000 = true;
1762                        jjtree.openNodeScope(jjtn000);Token t;
1763    try {
1764      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1765      case DRIVEMODE:{
1766        t = jj_consume_token(DRIVEMODE);
1767        break;
1768        }
1769      case ZEROADDR:{
1770        t = jj_consume_token(ZEROADDR);
1771        break;
1772        }
1773      case NONZEROADDR:{
1774        t = jj_consume_token(NONZEROADDR);
1775        break;
1776        }
1777      default:
1778        jj_la1[29] = jj_gen;
1779        jj_consume_token(-1);
1780        throw new ParseException();
1781      }
1782jjtree.closeNodeScope(jjtn000, true);
1783     jjtc000 = false;
1784log.debug("Drivemode Production "+ t.image);
1785    jjtn000.jjtSetValue(t.image);
1786    {if ("" != null) return jjtn000;}
1787    } finally {
1788if (jjtc000) {
1789       jjtree.closeNodeScope(jjtn000, true);
1790     }
1791    }
1792    throw new Error("Missing return statement in function");
1793}
1794
1795  final public SimpleNode functionmode() throws ParseException {/*@bgen(jjtree) functionmode */
1796                           ASTfunctionmode jjtn000 = new ASTfunctionmode(JJTFUNCTIONMODE);
1797                           boolean jjtc000 = true;
1798                           jjtree.openNodeScope(jjtn000);Token t;
1799    try {
1800      switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
1801      case FUNCTIONMODE:{
1802        t = jj_consume_token(FUNCTIONMODE);
1803        break;
1804        }
1805      case ZEROADDR:{
1806        t = jj_consume_token(ZEROADDR);
1807        break;
1808        }
1809      case NONZEROADDR:{
1810        t = jj_consume_token(NONZEROADDR);
1811        break;
1812        }
1813      case DRIVEMODE:{
1814        t = jj_consume_token(DRIVEMODE);
1815        break;
1816        }
1817      default:
1818        jj_la1[30] = jj_gen;
1819        jj_consume_token(-1);
1820        throw new ParseException();
1821      }
1822jjtree.closeNodeScope(jjtn000, true);
1823     jjtc000 = false;
1824log.debug("Functionmode Production "+ t.image);
1825    jjtn000.jjtSetValue(t.image);
1826    {if ("" != null) return jjtn000;}
1827    } finally {
1828if (jjtc000) {
1829       jjtree.closeNodeScope(jjtn000, true);
1830     }
1831    }
1832    throw new Error("Missing return statement in function");
1833}
1834
1835  private boolean jj_2_1(int xla)
1836 {
1837    jj_la = xla; jj_lastpos = jj_scanpos = token;
1838    try { return (!jj_3_1()); }
1839    catch(LookaheadSuccess ls) { return true; }
1840    finally { jj_save(0, xla); }
1841  }
1842
1843  private boolean jj_2_2(int xla)
1844 {
1845    jj_la = xla; jj_lastpos = jj_scanpos = token;
1846    try { return (!jj_3_2()); }
1847    catch(LookaheadSuccess ls) { return true; }
1848    finally { jj_save(1, xla); }
1849  }
1850
1851  private boolean jj_3R_26()
1852 {
1853    if (jj_scan_token(TIME)) return true;
1854    return false;
1855  }
1856
1857  private boolean jj_3R_31()
1858 {
1859    if (jj_scan_token(DESCRIPTION)) return true;
1860    Token xsp;
1861    xsp = jj_scanpos;
1862    if (jj_3R_37()) jj_scanpos = xsp;
1863    return false;
1864  }
1865
1866  private boolean jj_3R_35()
1867 {
1868    if (jj_3R_33()) return true;
1869    return false;
1870  }
1871
1872  private boolean jj_3R_36()
1873 {
1874    Token xsp;
1875    xsp = jj_scanpos;
1876    if (jj_scan_token(19)) {
1877    jj_scanpos = xsp;
1878    if (jj_scan_token(20)) {
1879    jj_scanpos = xsp;
1880    if (jj_scan_token(21)) {
1881    jj_scanpos = xsp;
1882    if (jj_scan_token(23)) {
1883    jj_scanpos = xsp;
1884    if (jj_scan_token(25)) {
1885    jj_scanpos = xsp;
1886    if (jj_scan_token(27)) {
1887    jj_scanpos = xsp;
1888    if (jj_scan_token(29)) {
1889    jj_scanpos = xsp;
1890    if (jj_scan_token(24)) {
1891    jj_scanpos = xsp;
1892    if (jj_scan_token(28)) {
1893    jj_scanpos = xsp;
1894    if (jj_scan_token(26)) return true;
1895    }
1896    }
1897    }
1898    }
1899    }
1900    }
1901    }
1902    }
1903    }
1904    return false;
1905  }
1906
1907  private boolean jj_3R_21()
1908 {
1909    if (jj_scan_token(FB)) return true;
1910    return false;
1911  }
1912
1913  private boolean jj_3R_18()
1914 {
1915    if (jj_3R_31()) return true;
1916    return false;
1917  }
1918
1919  private boolean jj_3R_17()
1920 {
1921    if (jj_3R_30()) return true;
1922    return false;
1923  }
1924
1925  private boolean jj_3R_30()
1926 {
1927    if (jj_scan_token(LOCK)) return true;
1928    if (jj_3R_36()) return true;
1929    return false;
1930  }
1931
1932  private boolean jj_3R_16()
1933 {
1934    if (jj_3R_29()) return true;
1935    if (jj_3R_22()) return true;
1936    return false;
1937  }
1938
1939  private boolean jj_3R_15()
1940 {
1941    if (jj_3R_28()) return true;
1942    return false;
1943  }
1944
1945  private boolean jj_3_2()
1946 {
1947    if (jj_3R_7()) return true;
1948    return false;
1949  }
1950
1951  private boolean jj_3R_20()
1952 {
1953    if (jj_3R_33()) return true;
1954    return false;
1955  }
1956
1957  private boolean jj_3R_14()
1958 {
1959    if (jj_3R_27()) return true;
1960    return false;
1961  }
1962
1963  private boolean jj_3R_13()
1964 {
1965    if (jj_3R_26()) return true;
1966    return false;
1967  }
1968
1969  private boolean jj_3R_12()
1970 {
1971    if (jj_3R_25()) return true;
1972    if (jj_3R_22()) return true;
1973    return false;
1974  }
1975
1976  private boolean jj_3R_11()
1977 {
1978    if (jj_3R_24()) return true;
1979    if (jj_3R_22()) return true;
1980    return false;
1981  }
1982
1983  private boolean jj_3R_10()
1984 {
1985    if (jj_3R_23()) return true;
1986    if (jj_3R_22()) return true;
1987    return false;
1988  }
1989
1990  private boolean jj_3R_23()
1991 {
1992    if (jj_scan_token(GA)) return true;
1993    return false;
1994  }
1995
1996  private boolean jj_3R_9()
1997 {
1998    if (jj_3R_21()) return true;
1999    if (jj_3R_22()) return true;
2000    return false;
2001  }
2002
2003  private boolean jj_3R_29()
2004 {
2005    if (jj_scan_token(SESSION)) return true;
2006    return false;
2007  }
2008
2009  private boolean jj_3R_34()
2010 {
2011    if (jj_3R_32()) return true;
2012    return false;
2013  }
2014
2015  private boolean jj_3R_22()
2016 {
2017    Token xsp;
2018    xsp = jj_scanpos;
2019    if (jj_3R_34()) {
2020    jj_scanpos = xsp;
2021    if (jj_3R_35()) return true;
2022    }
2023    return false;
2024  }
2025
2026  private boolean jj_3_1()
2027 {
2028    if (jj_3R_6()) return true;
2029    return false;
2030  }
2031
2032  private boolean jj_3R_25()
2033 {
2034    if (jj_scan_token(SM)) return true;
2035    return false;
2036  }
2037
2038  private boolean jj_3R_33()
2039 {
2040    if (jj_scan_token(NONZEROADDR)) return true;
2041    return false;
2042  }
2043
2044  private boolean jj_3R_37()
2045 {
2046    if (jj_3R_36()) return true;
2047    return false;
2048  }
2049
2050  private boolean jj_3R_28()
2051 {
2052    if (jj_scan_token(SERVER)) return true;
2053    return false;
2054  }
2055
2056  private boolean jj_3R_19()
2057 {
2058    if (jj_3R_32()) return true;
2059    return false;
2060  }
2061
2062  private boolean jj_3R_8()
2063 {
2064    Token xsp;
2065    xsp = jj_scanpos;
2066    if (jj_3R_19()) {
2067    jj_scanpos = xsp;
2068    if (jj_3R_20()) return true;
2069    }
2070    return false;
2071  }
2072
2073  private boolean jj_3R_7()
2074 {
2075    if (jj_scan_token(GET)) return true;
2076    if (jj_3R_8()) return true;
2077    Token xsp;
2078    xsp = jj_scanpos;
2079    if (jj_3R_9()) {
2080    jj_scanpos = xsp;
2081    if (jj_3R_10()) {
2082    jj_scanpos = xsp;
2083    if (jj_3R_11()) {
2084    jj_scanpos = xsp;
2085    if (jj_3R_12()) {
2086    jj_scanpos = xsp;
2087    if (jj_3R_13()) {
2088    jj_scanpos = xsp;
2089    if (jj_3R_14()) {
2090    jj_scanpos = xsp;
2091    if (jj_3R_15()) {
2092    jj_scanpos = xsp;
2093    if (jj_3R_16()) {
2094    jj_scanpos = xsp;
2095    if (jj_3R_17()) {
2096    jj_scanpos = xsp;
2097    if (jj_3R_18()) return true;
2098    }
2099    }
2100    }
2101    }
2102    }
2103    }
2104    }
2105    }
2106    }
2107    return false;
2108  }
2109
2110  private boolean jj_3R_24()
2111 {
2112    if (jj_scan_token(GL)) return true;
2113    return false;
2114  }
2115
2116  private boolean jj_3R_27()
2117 {
2118    if (jj_scan_token(POWER)) return true;
2119    return false;
2120  }
2121
2122  private boolean jj_3R_32()
2123 {
2124    if (jj_scan_token(ZEROADDR)) return true;
2125    return false;
2126  }
2127
2128  private boolean jj_3R_6()
2129 {
2130    if (jj_scan_token(GO)) return true;
2131    return false;
2132  }
2133
2134  /* Generated Token Manager. */
2135  public SRCPParserTokenManager token_source;
2136  SimpleCharStream jj_input_stream;
2137  /* Current token. */
2138  public Token token;
2139  /* Next token. */
2140  public Token jj_nt;
2141  private int jj_ntk;
2142  private Token jj_scanpos, jj_lastpos;
2143  private int jj_la;
2144  private int jj_gen;
2145  final private int[] jj_la1 = new int[31];
2146  static private int[] jj_la1_0;
2147  static private int[] jj_la1_1;
2148  static private int[] jj_la1_2;
2149  static {
2150           jj_la1_init_0();
2151           jj_la1_init_1();
2152           jj_la1_init_2();
2153        }
2154        private static void jj_la1_init_0() {
2155           jj_la1_0 = new int[] {0x0,0x0,0x0,0xc0,0xc0,0xc0,0xc0,0x3fb80000,0xc0,0x3fb80000,0x0,0x180c0,0xc0,0x200c0,0x7b80000,0xc0,0x2fa80000,0x200c0,0x7b80000,0xc0,0x2080000,0x6b80000,0xc0,0xc0,0xc0,0x3fb80000,0xc0,0x0,0xc0,0x80c0,0x180c0,};
2156        }
2157        private static void jj_la1_init_1() {
2158           jj_la1_1 = new int[] {0x200,0xfe00,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe0,0x0,0x0,0x0,};
2159        }
2160        private static void jj_la1_init_2() {
2161           jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
2162        }
2163  final private JJCalls[] jj_2_rtns = new JJCalls[2];
2164  private boolean jj_rescan = false;
2165  private int jj_gc = 0;
2166
2167  /* Constructor with InputStream. */
2168  public SRCPParser(java.io.InputStream stream) {
2169          this(stream, null);
2170  }
2171  /* Constructor with InputStream and supplied encoding */
2172  public SRCPParser(java.io.InputStream stream, String encoding) {
2173         try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
2174         token_source = new SRCPParserTokenManager(jj_input_stream);
2175         token = new Token();
2176         jj_ntk = -1;
2177         jj_gen = 0;
2178         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2179         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2180  }
2181
2182  /* Reinitialise. */
2183  public void ReInit(java.io.InputStream stream) {
2184          ReInit(stream, null);
2185  }
2186  /* Reinitialise. */
2187  public void ReInit(java.io.InputStream stream, String encoding) {
2188         try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
2189         token_source.ReInit(jj_input_stream);
2190         token = new Token();
2191         jj_ntk = -1;
2192         jjtree.reset();
2193         jj_gen = 0;
2194         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2195         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2196  }
2197
2198  /* Constructor. */
2199  public SRCPParser(java.io.Reader stream) {
2200         jj_input_stream = new SimpleCharStream(stream, 1, 1);
2201         token_source = new SRCPParserTokenManager(jj_input_stream);
2202         token = new Token();
2203         jj_ntk = -1;
2204         jj_gen = 0;
2205         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2206         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2207  }
2208
2209  /* Reinitialise. */
2210  public void ReInit(java.io.Reader stream) {
2211        if (jj_input_stream == null) {
2212           jj_input_stream = new SimpleCharStream(stream, 1, 1);
2213        } else {
2214           jj_input_stream.ReInit(stream, 1, 1);
2215        }
2216        if (token_source == null) {
2217 token_source = new SRCPParserTokenManager(jj_input_stream);
2218        }
2219
2220         token_source.ReInit(jj_input_stream);
2221         token = new Token();
2222         jj_ntk = -1;
2223         jjtree.reset();
2224         jj_gen = 0;
2225         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2226         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2227  }
2228
2229  /* Constructor with generated Token Manager. */
2230  public SRCPParser(SRCPParserTokenManager tm) {
2231         token_source = tm;
2232         token = new Token();
2233         jj_ntk = -1;
2234         jj_gen = 0;
2235         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2236         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2237  }
2238
2239  /* Reinitialise. */
2240  public void ReInit(SRCPParserTokenManager tm) {
2241         token_source = tm;
2242         token = new Token();
2243         jj_ntk = -1;
2244         jjtree.reset();
2245         jj_gen = 0;
2246         for (int i = 0; i < 31; i++) jj_la1[i] = -1;
2247         for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2248  }
2249
2250  private Token jj_consume_token(int kind) throws ParseException {
2251         Token oldToken;
2252         if ((oldToken = token).next != null) token = token.next;
2253         else token = token.next = token_source.getNextToken();
2254         jj_ntk = -1;
2255         if (token.kind == kind) {
2256           jj_gen++;
2257           if (++jj_gc > 100) {
2258                 jj_gc = 0;
2259                 for (int i = 0; i < jj_2_rtns.length; i++) {
2260                   JJCalls c = jj_2_rtns[i];
2261                   while (c != null) {
2262                         if (c.gen < jj_gen) c.first = null;
2263                         c = c.next;
2264                   }
2265                 }
2266           }
2267           return token;
2268         }
2269         token = oldToken;
2270         jj_kind = kind;
2271         throw generateParseException();
2272  }
2273
2274  @SuppressWarnings("serial")
2275  static private final class LookaheadSuccess extends java.lang.Error { }
2276  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
2277  private boolean jj_scan_token(int kind) {
2278         if (jj_scanpos == jj_lastpos) {
2279           jj_la--;
2280           if (jj_scanpos.next == null) {
2281                 jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
2282           } else {
2283                 jj_lastpos = jj_scanpos = jj_scanpos.next;
2284           }
2285         } else {
2286           jj_scanpos = jj_scanpos.next;
2287         }
2288         if (jj_rescan) {
2289           int i = 0; Token tok = token;
2290           while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
2291           if (tok != null) jj_add_error_token(kind, i);
2292         }
2293         if (jj_scanpos.kind != kind) return true;
2294         if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
2295         return false;
2296  }
2297
2298
2299/* Get the next Token. */
2300  final public Token getNextToken() {
2301         if (token.next != null) token = token.next;
2302         else token = token.next = token_source.getNextToken();
2303         jj_ntk = -1;
2304         jj_gen++;
2305         return token;
2306  }
2307
2308/* Get the specific Token. */
2309  final public Token getToken(int index) {
2310         Token t = token;
2311         for (int i = 0; i < index; i++) {
2312           if (t.next != null) t = t.next;
2313           else t = t.next = token_source.getNextToken();
2314         }
2315         return t;
2316  }
2317
2318  private int jj_ntk_f() {
2319         if ((jj_nt=token.next) == null)
2320           return (jj_ntk = (token.next=token_source.getNextToken()).kind);
2321         else
2322           return (jj_ntk = jj_nt.kind);
2323  }
2324
2325  private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
2326  private int[] jj_expentry;
2327  private int jj_kind = -1;
2328  private int[] jj_lasttokens = new int[100];
2329  private int jj_endpos;
2330
2331  private void jj_add_error_token(int kind, int pos) {
2332         if (pos >= 100) {
2333                return;
2334         }
2335
2336         if (pos == jj_endpos + 1) {
2337           jj_lasttokens[jj_endpos++] = kind;
2338         } else if (jj_endpos != 0) {
2339           jj_expentry = new int[jj_endpos];
2340
2341           for (int i = 0; i < jj_endpos; i++) {
2342                 jj_expentry[i] = jj_lasttokens[i];
2343           }
2344
2345           for (int[] oldentry : jj_expentries) {
2346                 if (oldentry.length == jj_expentry.length) {
2347                   boolean isMatched = true;
2348
2349                   for (int i = 0; i < jj_expentry.length; i++) {
2350                         if (oldentry[i] != jj_expentry[i]) {
2351                           isMatched = false;
2352                           break;
2353                         }
2354
2355                   }
2356                   if (isMatched) {
2357                         jj_expentries.add(jj_expentry);
2358                         break;
2359                   }
2360                 }
2361           }
2362
2363           if (pos != 0) {
2364                 jj_lasttokens[(jj_endpos = pos) - 1] = kind;
2365           }
2366         }
2367  }
2368
2369  /* Generate ParseException. */
2370  public ParseException generateParseException() {
2371         jj_expentries.clear();
2372         boolean[] la1tokens = new boolean[74];
2373         if (jj_kind >= 0) {
2374           la1tokens[jj_kind] = true;
2375           jj_kind = -1;
2376         }
2377         for (int i = 0; i < 31; i++) {
2378           if (jj_la1[i] == jj_gen) {
2379                 for (int j = 0; j < 32; j++) {
2380                   if ((jj_la1_0[i] & (1<<j)) != 0) {
2381                         la1tokens[j] = true;
2382                   }
2383                   if ((jj_la1_1[i] & (1<<j)) != 0) {
2384                         la1tokens[32+j] = true;
2385                   }
2386                   if ((jj_la1_2[i] & (1<<j)) != 0) {
2387                         la1tokens[64+j] = true;
2388                   }
2389                 }
2390           }
2391         }
2392         for (int i = 0; i < 74; i++) {
2393           if (la1tokens[i]) {
2394                 jj_expentry = new int[1];
2395                 jj_expentry[0] = i;
2396                 jj_expentries.add(jj_expentry);
2397           }
2398         }
2399         jj_endpos = 0;
2400         jj_rescan_token();
2401         jj_add_error_token(0, 0);
2402         int[][] exptokseq = new int[jj_expentries.size()][];
2403         for (int i = 0; i < jj_expentries.size(); i++) {
2404           exptokseq[i] = jj_expentries.get(i);
2405         }
2406         return new ParseException(token, exptokseq, tokenImage);
2407  }
2408
2409  private int trace_indent = 0;
2410  private boolean trace_enabled;
2411
2412/* Trace enabled. */
2413  final public boolean trace_enabled() {
2414         return trace_enabled;
2415  }
2416
2417  /* Enable tracing. */
2418  final public void enable_tracing() {
2419  }
2420
2421  /* Disable tracing. */
2422  final public void disable_tracing() {
2423  }
2424
2425  private void jj_rescan_token() {
2426         jj_rescan = true;
2427         for (int i = 0; i < 2; i++) {
2428           try {
2429                 JJCalls p = jj_2_rtns[i];
2430
2431                 do {
2432                   if (p.gen > jj_gen) {
2433                         jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
2434                         switch (i) {
2435                           case 0: jj_3_1(); break;
2436                           case 1: jj_3_2(); break;
2437                         }
2438                   }
2439                   p = p.next;
2440                 } while (p != null);
2441
2442                 } catch(LookaheadSuccess ls) { }
2443         }
2444         jj_rescan = false;
2445  }
2446
2447  private void jj_save(int index, int xla) {
2448         JJCalls p = jj_2_rtns[index];
2449         while (p.gen > jj_gen) {
2450           if (p.next == null) { p = p.next = new JJCalls(); break; }
2451           p = p.next;
2452         }
2453
2454         p.gen = jj_gen + xla - jj_la; 
2455         p.first = token;
2456         p.arg = xla;
2457  }
2458
2459  static final class JJCalls {
2460         int gen;
2461         Token first;
2462         int arg;
2463         JJCalls next;
2464  }
2465
2466  }