content: /* Generated By:JavaCC: Do not edit this line. CycLParser.java */
  package org.opencyc.parser;
  
  import org.opencyc.api.*;
  import org.opencyc.cycobject.*;
  
  /**
   * <P>This class implements a parser for the CycL grammar. This file
   * was automatically generated with javacc based on the file: "cycl.jj".
   * The CycL parser files can be regenerated by calling:
   * "javacc cycl.jj"
   * 
   * <P>Changes from our current SubL-based CycL parser and/or 
   * current documentation:
   * <UL>
   * <LI>1. #$ExpandSubLFn and #$SubLQuoteFn are not supported
   *         -@Note: these seem like a really, 
   *          really bad thing to support in the the syntax. This means that 
   *          in order to do the most basic syntatic checking/tokenization of 
   *          CycL statements, one must have the complete knowledge
   *          of the SubL grammar...these would probably
   *          better be handled with opaque structures like strings or 
   *          sentinel delimited sections.
   *
   *<LI> 2. Added support for C++ style comments.
   *        Anything starting from a "//" that isn't embedded in a string
   *        on a line in a CycL expression to the end of the same line 
   *        is ignored as a comment. The lisp version of this with a 
   *        semicolon is also supported.
   *        Embedded comments with slash-star and star-slash are allowed. 
   *        Nesting of embedded comments is not allowed.
   *
   *<LI> 3. Don't use SubLString and SubLNumber.
   *        Instead use explicit definitions of strings and numbers.
   *        These explicit definitions may not exactly correspond to 
   *            to their SubL counterpart.
   *        For decimal integers we support notatation like: 1, +1, 23, -344.
   *        For floating point numbers: 0.1, .32, -23.0, +234.323, 9E-234, 
   *            +9e234, 9e+234, -9.1134e-11 (also variations where "e" is 
   *            replaced by "d" are supported, but not encouraged -- 
   *            the d notation is a artifact of the Lisp interpreter, 
   *            while the e notation is a widely adopted standard for 
   *            scientific notation).
   *        Note: floating point numbers that contain e,E,d,D,- and numbers only
   *            could be amibiguous with a non-prefixed constant names, 
   *            the floating point interpretation is always taken.
   *        European style numbers with a comma as the decimal separator 
   *            are not allowed.
   *        Comma separators in the thousands places are not allowed.
   *        For strings, we support ascii characters inside of double quotation
   *        marks with a backslash escapes like: "hi", "\"bye\"\n"
   * 
   *<LI> 4. Added special support for parsing from GUIDs.
   *        Any string preceded by "#G" is parsed as constant with the given 
   *        GUID.
   *        Any character sequences not enclosed in double quotes and
   *        containing only hexidecimal characters and dashes preceded by a "#G"
   *        are interpreted as a GUIDs. #g works too.
   *
   *<LI> 5. No deprecated features of the language are supported like characters,
   *        list terminals, SubL symbols, SubL expressions etc..
   *
   *<LI> 6. No support for HL constructs.
   * <UL>
   * <P>The contents of this file is based on the BNF comment
   * at the top of cycl-grammar.lisp and on the contents and documentation
   * of the CycL vocabulary in the KB, and on the current behavior of the system
   * with a bit of cleaning up.
   *
   * @version $Id: CycLParser.java 138070 2012-01-10 19:46:08Z sbrown $
   * @author Tony Brusseau
   *
   * <p>Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
   * <p><a href="http://www.opencyc.org/license.txt">the license</a>
   * <p><a href="http://www.opencyc.org">www.opencyc.org</a>
   * <p><a href="http://www.sourceforge.net/projects/opencyc">OpenCyc at SourceForge</a>
   * <p>
   * THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND
   * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
   * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
   * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENCYC
   * ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE
   * BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
    class CycLParser extends Object implements CycLParserConstants {
  
      private CycAccess access;
  
      public CycLParser(java.io.Reader stream, CycAccess access) {
        this(stream);
        this.access = access;
      }
  
      public CycAccess getCycAccess() { return access; }
  
      /**
       * The parser program.
       *
       * @param args currently ignored.
       */
      public static void main(String[] args) {
        CycLParser parser = new CycLParser(System.in);
        try {
          parser.term(true);
        } catch (Exception e) {
          System.err.println(e);
        }
      }
  
  /********************* Parser ********************/
    final public CycList termList(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycList val = new CycList();
    Object curTerm = null;
      label_1:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case OPEN_PAREN:
        case TRUE_CONSTANT:
        case FALSE_CONSTANT:
        case AND_CONSTANT:
        case OR_CONSTANT:
        case XOR_CONSTANT:
        case NOT_CONSTANT:
        case EQUIV_CONSTANT:
        case IMPLIES_CONSTANT:
        case FORALL_CONSTANT:
        case THEREEXISTS_CONSTANT:
        case THEREEXISTEXACTLY_CONSTANT:
        case THEREEXISTATMOST_CONSTANT:
        case THEREEXISTATLEAST_CONSTANT:
        case EXPANDSUBLFN_CONSTANT:
        case SUBLQUOTEFN_CONSTANT:
        case TRUE_GUID_CONSTANT:
        case FALSE_GUID_CONSTANT:
        case AND_GUID_CONSTANT:
        case OR_GUID_CONSTANT:
        case XOR_GUID_CONSTANT:
        case NOT_GUID_CONSTANT:
        case EQUIV_GUID_CONSTANT:
        case IMPLIES_GUID_CONSTANT:
        case FORALL_GUID_CONSTANT:
        case THEREEXISTS_GUID_CONSTANT:
        case THEREEXISTEXACTLY_GUID_CONSTANT:
        case THEREEXISTATMOST_GUID_CONSTANT:
        case THEREEXISTATLEAST_GUID_CONSTANT:
        case EXPANDSUBLFN_GUID_CONSTANT:
        case SUBLQUOTEFN_GUID_CONSTANT:
        case INTEGER:
        case FLOAT:
        case CONSTANT_NAME1:
        case CONSTANT_NAME2:
        case CONSTANT_GUID:
        case CONSTANT_GUID2:
        case SIMPLE_VARIABLE:
        case META_VARIABLE:
        case STRING:
          ;
          break;
        default:
          jj_la1[0] = jj_gen;
          break label_1;
        }
        curTerm = term(false);
                              val.add(curTerm);
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public Object term(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    Object result = null;
      if (jj_2_1(2147483647)) {
        result = sentence(false);
      } else {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case TRUE_CONSTANT:
        case FALSE_CONSTANT:
        case AND_CONSTANT:
        case OR_CONSTANT:
        case XOR_CONSTANT:
        case NOT_CONSTANT:
        case EQUIV_CONSTANT:
        case IMPLIES_CONSTANT:
        case FORALL_CONSTANT:
        case THEREEXISTS_CONSTANT:
        case THEREEXISTEXACTLY_CONSTANT:
        case THEREEXISTATMOST_CONSTANT:
        case THEREEXISTATLEAST_CONSTANT:
        case EXPANDSUBLFN_CONSTANT:
        case SUBLQUOTEFN_CONSTANT:
        case TRUE_GUID_CONSTANT:
        case FALSE_GUID_CONSTANT:
        case AND_GUID_CONSTANT:
        case OR_GUID_CONSTANT:
        case XOR_GUID_CONSTANT:
        case NOT_GUID_CONSTANT:
        case EQUIV_GUID_CONSTANT:
        case IMPLIES_GUID_CONSTANT:
        case FORALL_GUID_CONSTANT:
        case THEREEXISTS_GUID_CONSTANT:
        case THEREEXISTEXACTLY_GUID_CONSTANT:
        case THEREEXISTATMOST_GUID_CONSTANT:
        case THEREEXISTATLEAST_GUID_CONSTANT:
        case EXPANDSUBLFN_GUID_CONSTANT:
        case SUBLQUOTEFN_GUID_CONSTANT:
        case INTEGER:
        case FLOAT:
        case CONSTANT_NAME1:
        case CONSTANT_NAME2:
        case CONSTANT_GUID:
        case CONSTANT_GUID2:
        case SIMPLE_VARIABLE:
        case META_VARIABLE:
        case STRING:
          result = atomicDenotationalTerm(false);
          break;
        default:
          jj_la1[1] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
      }
      eof(requireEOF);
      {if (true) return result;}
      throw new Error("Missing return statement in function");
    }
  
    final public void eof(boolean requireEOF) throws ParseException {
      if (!requireEOF) {if (true) return;}
      jj_consume_token(0);
    }
  
    final public CycObject sentence(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
        /*LOOKAHEAD( < TRUE_CONSTANT > | < TRUE_GUID_CONSTANT > | 
                       < FALSE_CONSTANT > | < FALSE_GUID_CONSTANT > )
            val = constant(false) 
            | val = variable(false)*/
            val = sentenceDenotingRepresentedTerm(false);
        break;
      case OPEN_PAREN:
        jj_consume_token(OPEN_PAREN);
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case NOT_CONSTANT:
        case NOT_GUID_CONSTANT:
          val = notForm(false);
          break;
        case AND_CONSTANT:
        case AND_GUID_CONSTANT:
          val = andForm(false);
          break;
        case OR_CONSTANT:
        case OR_GUID_CONSTANT:
          val = orForm(false);
          break;
        case XOR_CONSTANT:
        case XOR_GUID_CONSTANT:
          val = xorForm(false);
          break;
        case IMPLIES_CONSTANT:
        case IMPLIES_GUID_CONSTANT:
          val = impForm(false);
          break;
        case EQUIV_CONSTANT:
        case EQUIV_GUID_CONSTANT:
          val = equivForm(false);
          break;
        case FORALL_CONSTANT:
        case FORALL_GUID_CONSTANT:
          val = univForm(false);
          break;
        case THEREEXISTS_CONSTANT:
        case THEREEXISTS_GUID_CONSTANT:
          val = existForm(false);
          break;
        case THEREEXISTEXACTLY_CONSTANT:
        case THEREEXISTEXACTLY_GUID_CONSTANT:
          val = existExactForm(false);
          break;
        case THEREEXISTATMOST_CONSTANT:
        case THEREEXISTATMOST_GUID_CONSTANT:
          val = existUBoundForm(false);
          break;
        case THEREEXISTATLEAST_CONSTANT:
        case THEREEXISTATLEAST_GUID_CONSTANT:
          val = existLBoundForm(false);
          break;
        case OPEN_PAREN:
        case TRUE_CONSTANT:
        case FALSE_CONSTANT:
        case EXPANDSUBLFN_CONSTANT:
        case SUBLQUOTEFN_CONSTANT:
        case TRUE_GUID_CONSTANT:
        case FALSE_GUID_CONSTANT:
        case EXPANDSUBLFN_GUID_CONSTANT:
        case SUBLQUOTEFN_GUID_CONSTANT:
        case CONSTANT_NAME1:
        case CONSTANT_NAME2:
        case CONSTANT_GUID:
        case CONSTANT_GUID2:
        case SIMPLE_VARIABLE:
        case META_VARIABLE:
          val = genericSentence(false);
          break;
        default:
          jj_la1[2] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
        jj_consume_token(CLOSE_PAREN);
        break;
      default:
        jj_la1[3] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList notForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case NOT_CONSTANT:
        jj_consume_token(NOT_CONSTANT);
        break;
      case NOT_GUID_CONSTANT:
        jj_consume_token(NOT_GUID_CONSTANT);
        break;
      default:
        jj_la1[4] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                     val.add(getCycAccess().not);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList andForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycList sentences = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case AND_CONSTANT:
        jj_consume_token(AND_CONSTANT);
        break;
      case AND_GUID_CONSTANT:
        jj_consume_token(AND_GUID_CONSTANT);
        break;
      default:
        jj_la1[5] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                     val.add(getCycAccess().and);
      sentences = sentenceList(false);
                                        if (sentences != null) { val.addAll(sentences); }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList orForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycList sentences = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case OR_CONSTANT:
        jj_consume_token(OR_CONSTANT);
        break;
      case OR_GUID_CONSTANT:
        jj_consume_token(OR_GUID_CONSTANT);
        break;
      default:
        jj_la1[6] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                   val.add(getCycAccess().or);
      sentences = sentenceList(false);
                                        if (sentences != null) { val.addAll(sentences); }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList xorForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject sent = null;
    CycObject sent2 = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case XOR_CONSTANT:
        jj_consume_token(XOR_CONSTANT);
        break;
      case XOR_GUID_CONSTANT:
        jj_consume_token(XOR_GUID_CONSTANT);
        break;
      default:
        jj_la1[7] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                     val.add(getCycAccess().xorConst);
      sent = sentence(false);
                               val.add(sent);
      sent2 = sentence(false);
                                val.add(sent2);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList impForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject sent = null;
    CycObject sent2 = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case IMPLIES_CONSTANT:
        jj_consume_token(IMPLIES_CONSTANT);
        break;
      case IMPLIES_GUID_CONSTANT:
        jj_consume_token(IMPLIES_GUID_CONSTANT);
        break;
      default:
        jj_la1[8] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                             val.add(getCycAccess().impliesConst);
      sent = sentence(false);
                               val.add(sent);
      sent2 = sentence(false);
                                val.add(sent2);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList equivForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject sent = null;
    CycObject sent2 = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case EQUIV_CONSTANT:
        jj_consume_token(EQUIV_CONSTANT);
        break;
      case EQUIV_GUID_CONSTANT:
        jj_consume_token(EQUIV_GUID_CONSTANT);
        break;
      default:
        jj_la1[9] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                         val.add(getCycAccess().equivConst);
      sent = sentence(false);
                               val.add(sent);
      sent2 = sentence(false);
                                val.add(sent2);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList univForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject var = null;
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case FORALL_CONSTANT:
        jj_consume_token(FORALL_CONSTANT);
        break;
      case FORALL_GUID_CONSTANT:
        jj_consume_token(FORALL_GUID_CONSTANT);
        break;
      default:
        jj_la1[10] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                           val.add(getCycAccess().forAllConst);
      var = variable(false);
                              val.add(var);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList existForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycVariable var = null;
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case THEREEXISTS_CONSTANT:
        jj_consume_token(THEREEXISTS_CONSTANT);
        break;
      case THEREEXISTS_GUID_CONSTANT:
        jj_consume_token(THEREEXISTS_GUID_CONSTANT);
        break;
      default:
        jj_la1[11] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                                     val.add(getCycAccess().thereExistsConst);
      var = variable(false);
                              val.add(var);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject existExactForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycVariable var = null;
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case THEREEXISTEXACTLY_CONSTANT:
        jj_consume_token(THEREEXISTEXACTLY_CONSTANT);
        break;
      case THEREEXISTEXACTLY_GUID_CONSTANT:
        jj_consume_token(THEREEXISTEXACTLY_GUID_CONSTANT);
        break;
      default:
        jj_la1[12] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                                                 val.add(getCycAccess().thereExistExactlyConst);
      var = variable(false);
                              val.add(var);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList existUBoundForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycVariable var = null;
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case THEREEXISTATMOST_CONSTANT:
        jj_consume_token(THEREEXISTATMOST_CONSTANT);
        break;
      case THEREEXISTATMOST_GUID_CONSTANT:
        jj_consume_token(THEREEXISTATMOST_GUID_CONSTANT);
        break;
      default:
        jj_la1[13] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                                               val.add(getCycAccess().thereExistAtMostConst);
      var = variable(false);
                              val.add(var);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList existLBoundForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycVariable var = null;
    CycObject sent = null;
    CycList val = new CycList();
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case THEREEXISTATLEAST_CONSTANT:
        jj_consume_token(THEREEXISTATLEAST_CONSTANT);
        break;
      case THEREEXISTATLEAST_GUID_CONSTANT:
        jj_consume_token(THEREEXISTATLEAST_GUID_CONSTANT);
        break;
      default:
        jj_la1[14] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                                                 val.add(getCycAccess().thereExistAtLeastConst);
      var = variable(false);
                              val.add(var);
      sent = sentence(false);
                               val.add(sent);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList genericSentence(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject pred = null;
    CycList args = null;
      pred = predicate(false);
      args = argumentList(false);
                                   args.add(0, pred);
      eof(requireEOF);
      {if (true) return args;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList sentenceList(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject sent = null;
    CycVariable var = null;
    CycList result = new CycList();
      label_2:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case OPEN_PAREN:
        case TRUE_CONSTANT:
        case FALSE_CONSTANT:
        case AND_CONSTANT:
        case OR_CONSTANT:
        case XOR_CONSTANT:
        case NOT_CONSTANT:
        case EQUIV_CONSTANT:
        case IMPLIES_CONSTANT:
        case FORALL_CONSTANT:
        case THEREEXISTS_CONSTANT:
        case THEREEXISTEXACTLY_CONSTANT:
        case THEREEXISTATMOST_CONSTANT:
        case THEREEXISTATLEAST_CONSTANT:
        case EXPANDSUBLFN_CONSTANT:
        case SUBLQUOTEFN_CONSTANT:
        case TRUE_GUID_CONSTANT:
        case FALSE_GUID_CONSTANT:
        case AND_GUID_CONSTANT:
        case OR_GUID_CONSTANT:
        case XOR_GUID_CONSTANT:
        case NOT_GUID_CONSTANT:
        case EQUIV_GUID_CONSTANT:
        case IMPLIES_GUID_CONSTANT:
        case FORALL_GUID_CONSTANT:
        case THEREEXISTS_GUID_CONSTANT:
        case THEREEXISTEXACTLY_GUID_CONSTANT:
        case THEREEXISTATMOST_GUID_CONSTANT:
        case THEREEXISTATLEAST_GUID_CONSTANT:
        case EXPANDSUBLFN_GUID_CONSTANT:
        case SUBLQUOTEFN_GUID_CONSTANT:
        case CONSTANT_NAME1:
        case CONSTANT_NAME2:
        case CONSTANT_GUID:
        case CONSTANT_GUID2:
        case SIMPLE_VARIABLE:
        case META_VARIABLE:
          ;
          break;
        default:
          jj_la1[15] = jj_gen;
          break label_2;
        }
        sent = sentence(false);
                                 result.add(sent);
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 78:
        jj_consume_token(78);
        var = variable(false);
        break;
      default:
        jj_la1[16] = jj_gen;
        ;
      }
      eof(requireEOF);
      if (var != null) { result.setDottedElement(var); }
      if (result.size() == 0) { result = null; }
      {if (true) return result;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList argumentList(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    Object curTerm = null;
    CycVariable var = null;
    CycList result = new CycList();
      label_3:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case OPEN_PAREN:
        case TRUE_CONSTANT:
        case FALSE_CONSTANT:
        case AND_CONSTANT:
        case OR_CONSTANT:
        case XOR_CONSTANT:
        case NOT_CONSTANT:
        case EQUIV_CONSTANT:
        case IMPLIES_CONSTANT:
        case FORALL_CONSTANT:
        case THEREEXISTS_CONSTANT:
        case THEREEXISTEXACTLY_CONSTANT:
        case THEREEXISTATMOST_CONSTANT:
        case THEREEXISTATLEAST_CONSTANT:
        case EXPANDSUBLFN_CONSTANT:
        case SUBLQUOTEFN_CONSTANT:
        case TRUE_GUID_CONSTANT:
        case FALSE_GUID_CONSTANT:
        case AND_GUID_CONSTANT:
        case OR_GUID_CONSTANT:
        case XOR_GUID_CONSTANT:
        case NOT_GUID_CONSTANT:
        case EQUIV_GUID_CONSTANT:
        case IMPLIES_GUID_CONSTANT:
        case FORALL_GUID_CONSTANT:
        case THEREEXISTS_GUID_CONSTANT:
        case THEREEXISTEXACTLY_GUID_CONSTANT:
        case THEREEXISTATMOST_GUID_CONSTANT:
        case THEREEXISTATLEAST_GUID_CONSTANT:
        case EXPANDSUBLFN_GUID_CONSTANT:
        case SUBLQUOTEFN_GUID_CONSTANT:
        case INTEGER:
        case FLOAT:
        case CONSTANT_NAME1:
        case CONSTANT_NAME2:
        case CONSTANT_GUID:
        case CONSTANT_GUID2:
        case SIMPLE_VARIABLE:
        case META_VARIABLE:
        case STRING:
          ;
          break;
        default:
          jj_la1[17] = jj_gen;
          break label_3;
        }
        curTerm = term(false);
                                result.add(curTerm);
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 78:
        jj_consume_token(78);
        var = variable(false);
        break;
      default:
        jj_la1[18] = jj_gen;
        ;
      }
      eof(requireEOF);
      if (var != null) { result.setDottedElement(var); }
      {if (true) return result;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject predicate(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject t = null;
      t = representedTerm(false);
      eof(requireEOF);
      {if (true) return t;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject sentenceDenotingRepresentedTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      val = atomicSentenceDenotingRepresentedTerm(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList nonAtomicSentenceDenotingDenotationalTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycList val;
      val = nonAtomicDenotationalTerm(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject representedTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
        val = atomicRepresentedTerm(false);
        break;
      case OPEN_PAREN:
        val = nonAtomicDenotationalTerm(false);
        break;
      default:
        jj_la1[19] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycList nonAtomicDenotationalTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject func;
    CycList args;
      jj_consume_token(OPEN_PAREN);
      func = function(false);
      args = argumentList(false);
      jj_consume_token(CLOSE_PAREN);
      eof(requireEOF);
      args.add(0, func);
      {if (true) return args;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject function(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      val = representedTerm(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public Object denotationalTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    Object val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case INTEGER:
      case FLOAT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
      case STRING:
        val = atomicDenotationalTerm(false);
        break;
      case OPEN_PAREN:
        val = nonAtomicDenotationalTerm(false);
        break;
      default:
        jj_la1[20] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
  ///// Deal with atoms
    final public Object atomicDenotationalTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    Object result = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
        result = atomicRepresentedTerm(false);
        break;
      case INTEGER:
      case FLOAT:
      case STRING:
        result = literal(false);
        break;
      default:
        jj_la1[21] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return result;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject atomicSentenceDenotingRepresentedTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
        val = sentenceDenotingConstant(false);
        break;
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
        val = sentenceDenotingVariable(false);
        break;
      default:
        jj_la1[22] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycObject atomicRepresentedTerm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycObject val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
      case CONSTANT_NAME1:
      case CONSTANT_NAME2:
      case CONSTANT_GUID:
      case CONSTANT_GUID2:
        val = constant(false);
        break;
      case SIMPLE_VARIABLE:
      case META_VARIABLE:
        val = variable(false);
        break;
      default:
        jj_la1[23] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public Object literal(boolean requireEOF) throws ParseException, java.io.IOException {
    Object val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case STRING:
        val = string(false);
        break;
      case INTEGER:
      case FLOAT:
        val = number(false);
        break;
      default:
        jj_la1[24] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant sentenceDenotingConstant(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycConstant val = null;
      val = constant(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant constant(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycConstant val = null;
    Token t = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
        val = coreConstant(false);
        break;
      case CONSTANT_NAME1:
        t = jj_consume_token(CONSTANT_NAME1);
                                 val = makeConstantFromName(t.image);
        break;
      case CONSTANT_NAME2:
        t = jj_consume_token(CONSTANT_NAME2);
                                 val = makeConstantFromName(t.image);
        break;
      case CONSTANT_GUID:
        t = jj_consume_token(CONSTANT_GUID);
                                val = makeConstantFromGUID(t.image.substring(2));
        break;
      case CONSTANT_GUID2:
        t = jj_consume_token(CONSTANT_GUID2);
                                 val = makeConstantFromGUID(t.image.substring(3, t.image.length() - 1));
        break;
      default:
        jj_la1[25] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant makeConstantFromName(String name) throws ParseException {
    CycConstant val = null;
      if (name.startsWith("#$")) {
        name = name.substring(2);
      }
      val = CycObjectFactory.getCycConstantCacheByName(name);
      if (val == null) {
        try {
          val = new CycConstant(name, null);
        } catch (Exception e) {
          {if (true) throw new ParseException(e.getMessage());}
        }
      }
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant makeConstantFromGUID(String guidStr) throws ParseException {
    CycConstant val = null;
    Guid guid = null;
      guid = CycObjectFactory.makeGuid(guidStr);
      val = CycObjectFactory.getCycConstantCacheByGuid(guid);
      if (val == null) {
        try {
          val = new CycConstant(null, guid);
        } catch (Exception e) {
          {if (true) throw new ParseException(e.getMessage());}
        }
      }
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant coreConstant(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycConstant val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_GUID_CONSTANT:
      case FALSE_GUID_CONSTANT:
      case AND_GUID_CONSTANT:
      case OR_GUID_CONSTANT:
      case XOR_GUID_CONSTANT:
      case NOT_GUID_CONSTANT:
      case EQUIV_GUID_CONSTANT:
      case IMPLIES_GUID_CONSTANT:
      case FORALL_GUID_CONSTANT:
      case THEREEXISTS_GUID_CONSTANT:
      case THEREEXISTEXACTLY_GUID_CONSTANT:
      case THEREEXISTATMOST_GUID_CONSTANT:
      case THEREEXISTATLEAST_GUID_CONSTANT:
      case EXPANDSUBLFN_GUID_CONSTANT:
      case SUBLQUOTEFN_GUID_CONSTANT:
        val = coreGUIDConstant(false);
        break;
      case TRUE_CONSTANT:
      case FALSE_CONSTANT:
      case AND_CONSTANT:
      case OR_CONSTANT:
      case XOR_CONSTANT:
      case NOT_CONSTANT:
      case EQUIV_CONSTANT:
      case IMPLIES_CONSTANT:
      case FORALL_CONSTANT:
      case THEREEXISTS_CONSTANT:
      case THEREEXISTEXACTLY_CONSTANT:
      case THEREEXISTATMOST_CONSTANT:
      case THEREEXISTATLEAST_CONSTANT:
      case EXPANDSUBLFN_CONSTANT:
      case SUBLQUOTEFN_CONSTANT:
        val = coreNameConstant(false);
        break;
      default:
        jj_la1[26] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant coreNameConstant(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycConstant val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_CONSTANT:
        jj_consume_token(TRUE_CONSTANT);
                          val = CycAccess.trueConst;
        break;
      case FALSE_CONSTANT:
        jj_consume_token(FALSE_CONSTANT);
                             val = CycAccess.falseConst;
        break;
      case AND_CONSTANT:
        jj_consume_token(AND_CONSTANT);
                           val = CycAccess.and;
        break;
      case OR_CONSTANT:
        jj_consume_token(OR_CONSTANT);
                          val = CycAccess.or;
        break;
      case XOR_CONSTANT:
        jj_consume_token(XOR_CONSTANT);
                           val = CycAccess.xorConst;
        break;
      case NOT_CONSTANT:
        jj_consume_token(NOT_CONSTANT);
                           val = CycAccess.not;
        break;
      case EQUIV_CONSTANT:
        jj_consume_token(EQUIV_CONSTANT);
                             val = CycAccess.equivConst;
        break;
      case IMPLIES_CONSTANT:
        jj_consume_token(IMPLIES_CONSTANT);
                               val = CycAccess.impliesConst;
        break;
      case FORALL_CONSTANT:
        jj_consume_token(FORALL_CONSTANT);
                              val = CycAccess.forAllConst;
        break;
      case THEREEXISTS_CONSTANT:
        jj_consume_token(THEREEXISTS_CONSTANT);
                                   val = CycAccess.thereExistsConst;
        break;
      case THEREEXISTEXACTLY_CONSTANT:
        jj_consume_token(THEREEXISTEXACTLY_CONSTANT);
                                         val = CycAccess.thereExistExactlyConst;
        break;
      case THEREEXISTATMOST_CONSTANT:
        jj_consume_token(THEREEXISTATMOST_CONSTANT);
                                        val = CycAccess.thereExistAtMostConst;
        break;
      case THEREEXISTATLEAST_CONSTANT:
        jj_consume_token(THEREEXISTATLEAST_CONSTANT);
                                         val = CycAccess.thereExistAtLeastConst;
        break;
      case EXPANDSUBLFN_CONSTANT:
        jj_consume_token(EXPANDSUBLFN_CONSTANT);
                                    {if (true) throw new UnsupportedVocabularyException(CycAccess.expandSubLFnConst);}
        break;
      case SUBLQUOTEFN_CONSTANT:
        jj_consume_token(SUBLQUOTEFN_CONSTANT);
                                   {if (true) throw new UnsupportedVocabularyException(CycAccess.sublQuoteFnConst);}
        break;
      default:
        jj_la1[27] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycConstant coreGUIDConstant(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException {
    CycConstant val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case TRUE_GUID_CONSTANT:
        jj_consume_token(TRUE_GUID_CONSTANT);
                               val = CycAccess.trueConst;
        break;
      case FALSE_GUID_CONSTANT:
        jj_consume_token(FALSE_GUID_CONSTANT);
                                  val = CycAccess.falseConst;
        break;
      case AND_GUID_CONSTANT:
        jj_consume_token(AND_GUID_CONSTANT);
                                val = CycAccess.and;
        break;
      case OR_GUID_CONSTANT:
        jj_consume_token(OR_GUID_CONSTANT);
                               val = CycAccess.or;
        break;
      case XOR_GUID_CONSTANT:
        jj_consume_token(XOR_GUID_CONSTANT);
                                val = CycAccess.xorConst;
        break;
      case NOT_GUID_CONSTANT:
        jj_consume_token(NOT_GUID_CONSTANT);
                                val = CycAccess.not;
        break;
      case EQUIV_GUID_CONSTANT:
        jj_consume_token(EQUIV_GUID_CONSTANT);
                                  val = CycAccess.equivConst;
        break;
      case IMPLIES_GUID_CONSTANT:
        jj_consume_token(IMPLIES_GUID_CONSTANT);
                                    val = CycAccess.impliesConst;
        break;
      case FORALL_GUID_CONSTANT:
        jj_consume_token(FORALL_GUID_CONSTANT);
                                   val = CycAccess.forAllConst;
        break;
      case THEREEXISTS_GUID_CONSTANT:
        jj_consume_token(THEREEXISTS_GUID_CONSTANT);
                                        val = CycAccess.thereExistsConst;
        break;
      case THEREEXISTEXACTLY_GUID_CONSTANT:
        jj_consume_token(THEREEXISTEXACTLY_GUID_CONSTANT);
                                              val = CycAccess.thereExistExactlyConst;
        break;
      case THEREEXISTATMOST_GUID_CONSTANT:
        jj_consume_token(THEREEXISTATMOST_GUID_CONSTANT);
                                             val = CycAccess.thereExistAtMostConst;
        break;
      case THEREEXISTATLEAST_GUID_CONSTANT:
        jj_consume_token(THEREEXISTATLEAST_GUID_CONSTANT);
                                              val = CycAccess.thereExistAtLeastConst;
        break;
      case EXPANDSUBLFN_GUID_CONSTANT:
        jj_consume_token(EXPANDSUBLFN_GUID_CONSTANT);
                                         {if (true) throw new UnsupportedVocabularyException(CycAccess.expandSubLFnConst);}
        break;
      case SUBLQUOTEFN_GUID_CONSTANT:
        jj_consume_token(SUBLQUOTEFN_GUID_CONSTANT);
                                        {if (true) throw new UnsupportedVocabularyException(CycAccess.expandSubLFnConst);}
        break;
      default:
        jj_la1[28] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable sentenceDenotingVariable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case SIMPLE_VARIABLE:
        val = sentenceDenotingSimpleVariable(false);
        break;
      case META_VARIABLE:
        val = sentenceDenotingMetaVariable(false);
        break;
      default:
        jj_la1[29] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable variable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case SIMPLE_VARIABLE:
        val = simpleVariable(false);
        break;
      case META_VARIABLE:
        val = metaVariable(false);
        break;
      default:
        jj_la1[30] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable sentenceDenotingMetaVariable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
      val = metaVariable(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable sentenceDenotingSimpleVariable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
      val = simpleVariable(false);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable metaVariable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
    Token t = null;
      t = jj_consume_token(META_VARIABLE);
                              val = new CycVariable(t.image);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public CycVariable simpleVariable(boolean requireEOF) throws ParseException {
    CycVariable val = null;
    Token t = null;
      t = jj_consume_token(SIMPLE_VARIABLE);
                                val = new CycVariable(t.image);
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    final public String string(boolean requireEOF) throws ParseException {
    Token t = null;
      t = jj_consume_token(STRING);
      eof(requireEOF);
      {if (true) return t.image.substring(1, t.image.length()-1);}
      throw new Error("Missing return statement in function");
    }
  
    final public Number number(boolean requireEOF) throws ParseException {
    Number val = null;
    Token t = null;
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case INTEGER:
        t = jj_consume_token(INTEGER);
                            val = new Long((t.image.startsWith("+")) ? t.image.substring(1) : t.image);
        break;
      case FLOAT:
        t = jj_consume_token(FLOAT);
                            val = new Double(t.image.toLowerCase().replaceAll("d", "e"));
        break;
      default:
        jj_la1[31] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      eof(requireEOF);
      {if (true) return val;}
      throw new Error("Missing return statement in function");
    }
  
    private boolean jj_2_1(int xla) {
      jj_la = xla; jj_lastpos = jj_scanpos = token;
      try { return !jj_3_1(); }
      catch(LookaheadSuccess ls) { return true; }
      finally { jj_save(0, xla); }
    }
  
    private boolean jj_3_1() {
      Token xsp;
      xsp = jj_scanpos;
      if (jj_scan_token(15)) {
      jj_scanpos = xsp;
      if (jj_scan_token(30)) {
      jj_scanpos = xsp;
      if (jj_scan_token(16)) {
      jj_scanpos = xsp;
      if (jj_scan_token(31)) {
      jj_scanpos = xsp;
      if (jj_scan_token(73)) {
      jj_scanpos = xsp;
      if (jj_scan_token(75)) {
      jj_scanpos = xsp;
      if (jj_scan_token(1)) return true;
      }
      }
      }
      }
      }
      }
      return false;
    }
  
    /** Generated Token Manager. */
    public CycLParserTokenManager token_source;
    SimpleCharStream jj_input_stream;
    /** Current token. */
    public Token token;
    /** Next token. */
    public Token jj_nt;
    private int jj_ntk;
    private Token jj_scanpos, jj_lastpos;
    private int jj_la;
    private int jj_gen;
    final private int[] jj_la1 = new int[32];
    static private int[] jj_la1_0;
    static private int[] jj_la1_1;
    static private int[] jj_la1_2;
    static {
        jj_la1_init_0();
        jj_la1_init_1();
        jj_la1_init_2();
     }
     private static void jj_la1_init_0() {
        jj_la1_0 = new int[] {0xffff8002,0xffff8000,0xffff8002,0xffff8002,0x100000,0x20000,0x40000,0x80000,0x400000,0x200000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xffff8002,0x0,0xffff8002,0x0,0xffff8002,0xffff8002,0xffff8000,0xffff8000,0xffff8000,0x0,0xffff8000,0xffff8000,0x3fff8000,0xc0000000,0x0,0x0,0x0,};
     }
     private static void jj_la1_init_1() {
        jj_la1_1 = new int[] {0x30001fff,0x30001fff,0x1fff,0x1fff,0x8,0x1,0x2,0x4,0x20,0x10,0x40,0x80,0x100,0x200,0x400,0x1fff,0x0,0x30001fff,0x0,0x1fff,0x30001fff,0x30001fff,0x1fff,0x1fff,0x30000000,0x1fff,0x1fff,0x0,0x1fff,0x0,0x0,0x30000000,};
     }
     private static void jj_la1_init_2() {
        jj_la1_2 = new int[] {0x2b62,0x2b62,0xb62,0xb62,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xb62,0x4000,0x2b62,0x4000,0xb62,0x2b62,0x2b62,0xb62,0xb62,0x2000,0x162,0x0,0x0,0x0,0xa00,0xa00,0x0,};
     }
    final private JJCalls[] jj_2_rtns = new JJCalls[1];
    private boolean jj_rescan = false;
    private int jj_gc = 0;
  
    /** Constructor with InputStream. */
    public CycLParser(java.io.InputStream stream) {
       this(stream, null);
    }
    /** Constructor with InputStream and supplied encoding */
    public CycLParser(java.io.InputStream stream, String encoding) {
      try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
      token_source = new CycLParserTokenManager(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Reinitialise. */
    public void ReInit(java.io.InputStream stream) {
       ReInit(stream, null);
    }
    /** Reinitialise. */
    public void ReInit(java.io.InputStream stream, String encoding) {
      try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
      token_source.ReInit(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Constructor. */
    public CycLParser(java.io.Reader stream) {
      jj_input_stream = new SimpleCharStream(stream, 1, 1);
      token_source = new CycLParserTokenManager(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Reinitialise. */
    public void ReInit(java.io.Reader stream) {
      jj_input_stream.ReInit(stream, 1, 1);
      token_source.ReInit(jj_input_stream);
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Constructor with generated Token Manager. */
    public CycLParser(CycLParserTokenManager tm) {
      token_source = tm;
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    /** Reinitialise. */
    public void ReInit(CycLParserTokenManager tm) {
      token_source = tm;
      token = new Token();
      jj_ntk = -1;
      jj_gen = 0;
      for (int i = 0; i < 32; i++) jj_la1[i] = -1;
      for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
    }
  
    private Token jj_consume_token(int kind) throws ParseException {
      Token oldToken;
      if ((oldToken = token).next != null) token = token.next;
      else token = token.next = token_source.getNextToken();
      jj_ntk = -1;
      if (token.kind == kind) {
        jj_gen++;
        if (++jj_gc > 100) {
          jj_gc = 0;
          for (int i = 0; i < jj_2_rtns.length; i++) {
            JJCalls c = jj_2_rtns[i];
            while (c != null) {
              if (c.gen < jj_gen) c.first = null;
              c = c.next;
            }
          }
        }
        return token;
      }
      token = oldToken;
      jj_kind = kind;
      throw generateParseException();
    }
  
    static private final class LookaheadSuccess extends java.lang.Error { }
    final private LookaheadSuccess jj_ls = new LookaheadSuccess();
    private boolean jj_scan_token(int kind) {
      if (jj_scanpos == jj_lastpos) {
        jj_la--;
        if (jj_scanpos.next == null) {
          jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
        } else {
          jj_lastpos = jj_scanpos = jj_scanpos.next;
        }
      } else {
        jj_scanpos = jj_scanpos.next;
      }
      if (jj_rescan) {
        int i = 0; Token tok = token;
        while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
        if (tok != null) jj_add_error_token(kind, i);
      }
      if (jj_scanpos.kind != kind) return true;
      if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
      return false;
    }
  
  
  /** Get the next Token. */
    final public Token getNextToken() {
      if (token.next != null) token = token.next;
      else token = token.next = token_source.getNextToken();
      jj_ntk = -1;
      jj_gen++;
      return token;
    }
  
  /** Get the specific Token. */
    final public Token getToken(int index) {
      Token t = token;
      for (int i = 0; i < index; i++) {
        if (t.next != null) t = t.next;
        else t = t.next = token_source.getNextToken();
      }
      return t;
    }
  
    private int jj_ntk() {
      if ((jj_nt=token.next) == null)
        return (jj_ntk = (token.next=token_source.getNextToken()).kind);
      else
        return (jj_ntk = jj_nt.kind);
    }
  
    private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
    private int[] jj_expentry;
    private int jj_kind = -1;
    private int[] jj_lasttokens = new int[100];
    private int jj_endpos;
  
    private void jj_add_error_token(int kind, int pos) {
      if (pos >= 100) return;
      if (pos == jj_endpos + 1) {
        jj_lasttokens[jj_endpos++] = kind;
      } else if (jj_endpos != 0) {
        jj_expentry = new int[jj_endpos];
        for (int i = 0; i < jj_endpos; i++) {
          jj_expentry[i] = jj_lasttokens[i];
        }
        jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
          int[] oldentry = (int[])(it.next());
          if (oldentry.length == jj_expentry.length) {
            for (int i = 0; i < jj_expentry.length; i++) {
              if (oldentry[i] != jj_expentry[i]) {
                continue jj_entries_loop;
              }
            }
            jj_expentries.add(jj_expentry);
            break jj_entries_loop;
          }
        }
        if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
      }
    }
  
    /** Generate ParseException. */
    public ParseException generateParseException() {
      jj_expentries.clear();
      boolean[] la1tokens = new boolean[79];
      if (jj_kind >= 0) {
        la1tokens[jj_kind] = true;
        jj_kind = -1;
      }
      for (int i = 0; i < 32; i++) {
        if (jj_la1[i] == jj_gen) {
          for (int j = 0; j < 32; j++) {
            if ((jj_la1_0[i] & (1<<j)) != 0) {
              la1tokens[j] = true;
            }
            if ((jj_la1_1[i] & (1<<j)) != 0) {
              la1tokens[32+j] = true;
            }
            if ((jj_la1_2[i] & (1<<j)) != 0) {
              la1tokens[64+j] = true;
            }
          }
        }
      }
      for (int i = 0; i < 79; i++) {
        if (la1tokens[i]) {
          jj_expentry = new int[1];
          jj_expentry[0] = i;
          jj_expentries.add(jj_expentry);
        }
      }
      jj_endpos = 0;
      jj_rescan_token();
      jj_add_error_token(0, 0);
      int[][] exptokseq = new int[jj_expentries.size()][];
      for (int i = 0; i < jj_expentries.size(); i++) {
        exptokseq[i] = jj_expentries.get(i);
      }
      return new ParseException(token, exptokseq, tokenImage);
    }
  
    /** Enable tracing. */
    final public void enable_tracing() {
    }
  
    /** Disable tracing. */
    final public void disable_tracing() {
    }
  
    private void jj_rescan_token() {
      jj_rescan = true;
      for (int i = 0; i < 1; i++) {
      try {
        JJCalls p = jj_2_rtns[i];
        do {
          if (p.gen > jj_gen) {
            jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
            switch (i) {
              case 0: jj_3_1(); break;
            }
          }
          p = p.next;
        } while (p != null);
        } catch(LookaheadSuccess ls) { }
      }
      jj_rescan = false;
    }
  
    private void jj_save(int index, int xla) {
      JJCalls p = jj_2_rtns[index];
      while (p.gen > jj_gen) {
        if (p.next == null) { p = p.next = new JJCalls(); break; }
        p = p.next;
      }
      p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
    }
  
    static final class JJCalls {
      int gen;
      Token first;
      int arg;
      JJCalls next;
    }
  
    }
  