
//----------------------------------------------------
// The following code was generated by CUP v0.10j
// Thu Jan 30 15:51:27 CET 2003
//----------------------------------------------------

package gr.forth.ics.vrp.corevrp.parser;

import java_cup.runtime.*;
import java.util.*;
import java.io.*;
import java.net.*;
import gr.forth.ics.vrp.corevrp.*;
import gr.forth.ics.vrp.corevrp.vocabulary.*;
import gr.forth.ics.vrp.corevrp.model.*;
import java.net.URI;

/** CUP v0.10j generated parser.
  * @version Thu Jan 30 15:51:27 CET 2003
  */
public class parser extends java_cup.runtime.lr_parser {

  /** Default constructor. */
  public parser() {super();}

  /** Constructor which sets the default scanner. */
  public parser(java_cup.runtime.Scanner s) {super(s);}

  /** Production table. */
  protected static final short _production_table[][] = 
    unpackFromStrings(new String[] {
    "\000\077\000\002\027\004\000\002\002\004\000\002\027" +
    "\003\000\002\027\004\000\002\027\003\000\002\003\012" +
    "\000\002\003\003\000\002\032\012\000\002\033\004\000" +
    "\002\033\002\000\002\034\012\000\002\034\006\000\002" +
    "\034\003\000\002\004\004\000\002\004\003\000\002\005" +
    "\012\000\002\005\006\000\002\005\005\000\002\013\003" +
    "\000\002\010\002\000\002\010\006\000\002\010\006\000" +
    "\002\010\006\000\002\010\004\000\002\010\004\000\002" +
    "\010\004\000\002\010\003\000\002\012\003\000\002\012" +
    "\003\000\002\006\004\000\002\006\002\000\002\035\003" +
    "\000\002\007\012\000\002\007\012\000\002\007\012\000" +
    "\002\007\012\000\002\007\006\000\002\007\005\000\002" +
    "\025\005\000\002\026\005\000\002\031\005\000\002\024" +
    "\003\000\002\024\002\000\002\024\003\000\002\022\003" +
    "\000\002\023\003\000\002\030\003\000\002\021\013\000" +
    "\002\021\007\000\002\021\004\000\002\021\002\000\002" +
    "\021\003\000\002\020\003\000\002\020\003\000\002\020" +
    "\003\000\002\017\003\000\002\015\004\000\002\015\004" +
    "\000\002\015\004\000\002\015\002\000\002\016\005\000" +
    "\002\011\003\000\002\014\005" });

  /** Access to production table. */
  public short[][] production_table() {return _production_table;}

  /** Parse-action table. */
  protected static final short[][] _action_table = 
    unpackFromStrings(new String[] {
    "\000\220\000\010\003\005\004\011\027\010\001\002\000" +
    "\004\002\ufffd\001\002\000\012\002\ufffb\003\ufffb\004\ufffb" +
    "\006\ufffb\001\002\000\004\002\uffff\001\002\000\004\002" +
    "\222\001\002\000\006\003\005\004\011\001\002\000\006" +
    "\011\012\020\013\001\002\000\012\005\uffc6\025\023\026" +
    "\015\030\021\001\002\000\012\005\uffc6\025\023\026\015" +
    "\030\021\001\002\000\014\005\uffc6\007\uffc6\025\023\026" +
    "\015\030\021\001\002\000\034\003\uffc4\005\uffc4\007\uffc4" +
    "\014\uffc4\015\uffc4\021\uffc4\022\uffc4\023\uffc4\024\uffc4\025" +
    "\uffc4\026\uffc4\030\uffc4\031\uffc4\001\002\000\014\005\uffc6" +
    "\007\uffc6\025\023\026\015\030\021\001\002\000\004\005" +
    "\031\001\002\000\006\005\uffca\007\uffca\001\002\000\004" +
    "\016\027\001\002\000\014\005\uffc6\007\uffc6\025\023\026" +
    "\015\030\021\001\002\000\004\016\024\001\002\000\004" +
    "\017\025\001\002\000\034\003\uffc5\005\uffc5\007\uffc5\014" +
    "\uffc5\015\uffc5\021\uffc5\022\uffc5\023\uffc5\024\uffc5\025\uffc5" +
    "\026\uffc5\030\uffc5\031\uffc5\001\002\000\006\005\uffc7\007" +
    "\uffc7\001\002\000\004\017\030\001\002\000\034\003\uffc3" +
    "\005\uffc3\007\uffc3\014\uffc3\015\uffc3\021\uffc3\022\uffc3\023" +
    "\uffc3\024\uffc3\025\uffc3\026\uffc3\030\uffc3\031\uffc3\001\002" +
    "\000\010\003\005\004\035\006\ufff8\001\002\000\010\003" +
    "\ufff5\004\ufff5\006\ufff5\001\002\000\004\006\047\001\002" +
    "\000\010\003\005\004\035\006\ufff8\001\002\000\006\011" +
    "\012\020\036\001\002\000\014\005\uffc6\007\uffc6\025\023" +
    "\026\015\030\021\001\002\000\006\005\041\007\040\001" +
    "\002\000\010\003\ufff6\004\ufff6\006\ufff6\001\002\000\010" +
    "\003\005\004\035\006\ufff8\001\002\000\004\006\043\001" +
    "\002\000\004\020\044\001\002\000\004\005\045\001\002" +
    "\000\010\003\ufff7\004\ufff7\006\ufff7\001\002\000\004\006" +
    "\ufff9\001\002\000\004\020\050\001\002\000\004\005\051" +
    "\001\002\000\004\002\ufffa\001\002\000\006\005\uffc9\007" +
    "\uffc9\001\002\000\006\005\uffc8\007\uffc8\001\002\000\004" +
    "\005\055\001\002\000\004\004\060\001\002\000\006\004" +
    "\060\006\ufff3\001\002\000\004\006\214\001\002\000\004" +
    "\010\061\001\002\000\026\003\072\005\uffee\007\uffee\014" +
    "\070\015\065\021\067\025\023\026\015\030\021\031\074" +
    "\001\002\000\034\003\143\005\uffee\007\uffee\014\070\015" +
    "\065\021\067\022\uffee\023\uffee\024\uffee\025\023\026\015" +
    "\030\021\031\074\001\002\000\034\003\143\005\uffee\007" +
    "\uffee\014\070\015\065\021\067\022\uffee\023\uffee\024\uffee" +
    "\025\023\026\015\030\021\031\074\001\002\000\004\016" +
    "\207\001\002\000\004\016\uffe6\001\002\000\006\005\uffef" +
    "\007\uffef\001\002\000\004\016\204\001\002\000\004\016" +
    "\201\001\002\000\034\003\143\005\uffee\007\uffee\014\070" +
    "\015\065\021\067\022\uffee\023\uffee\024\uffee\025\023\026" +
    "\015\030\021\031\074\001\002\000\012\004\ufff0\005\uffe7" +
    "\006\ufff0\007\uffe7\001\002\000\006\005\076\007\075\001" +
    "\002\000\004\016\uffe5\001\002\000\006\004\ufff1\006\ufff1" +
    "\001\002\000\006\004\101\006\uffe3\001\002\000\006\004" +
    "\101\006\uffe3\001\002\000\004\006\174\001\002\000\004" +
    "\010\102\001\002\000\034\003\106\005\uffee\007\uffee\014" +
    "\070\015\065\021\067\022\uffee\023\uffee\024\uffee\025\023" +
    "\026\015\030\021\031\074\001\002\000\014\005\uffef\007" +
    "\uffef\022\140\023\137\024\167\001\002\000\004\005\160" +
    "\001\002\000\004\005\127\001\002\000\020\004\uffdc\005" +
    "\uffe7\006\uffdc\007\uffe7\022\uffe7\023\uffe7\024\uffe7\001\002" +
    "\000\004\005\122\001\002\000\006\005\111\007\112\001" +
    "\002\000\010\004\uffe2\006\uffe2\013\uffe2\001\002\000\006" +
    "\004\uffdd\006\uffdd\001\002\000\010\004\060\006\uffd7\013" +
    "\115\001\002\000\004\006\uffd6\001\002\000\004\006\uffd8" +
    "\001\002\000\004\006\117\001\002\000\004\010\120\001" +
    "\002\000\004\005\121\001\002\000\006\004\uffe1\006\uffe1" +
    "\001\002\000\004\004\060\001\002\000\004\006\124\001" +
    "\002\000\004\010\125\001\002\000\004\005\126\001\002" +
    "\000\006\004\uffde\006\uffde\001\002\000\012\003\131\004" +
    "\133\006\uffcf\013\130\001\002\000\012\003\131\004\133" +
    "\006\uffcf\013\130\001\002\000\004\006\uffce\001\002\000" +
    "\004\006\154\001\002\000\004\010\134\001\002\000\032" +
    "\003\143\005\uffee\007\uffee\014\070\015\065\021\067\022" +
    "\140\023\137\025\023\026\015\030\021\031\074\001\002" +
    "\000\004\005\uffcb\001\002\000\006\005\uffcd\007\152\001" +
    "\002\000\024\003\uffd4\005\uffd4\014\uffd4\015\uffd4\021\uffd4" +
    "\025\uffd4\026\uffd4\030\uffd4\031\uffd4\001\002\000\024\003" +
    "\uffd5\005\uffd5\014\uffd5\015\uffd5\021\uffd5\025\uffd5\026\uffd5" +
    "\030\uffd5\031\uffd5\001\002\000\004\005\144\001\002\000" +
    "\004\005\uffcc\001\002\000\014\005\uffe7\007\uffe7\022\uffe7" +
    "\023\uffe7\024\uffe7\001\002\000\012\003\131\004\133\006" +
    "\uffcf\013\130\001\002\000\004\006\146\001\002\000\004" +
    "\010\147\001\002\000\004\005\150\001\002\000\012\003" +
    "\131\004\133\006\uffcf\013\130\001\002\000\004\006\uffd2" +
    "\001\002\000\012\003\131\004\133\006\uffcf\013\130\001" +
    "\002\000\004\006\uffd1\001\002\000\004\010\155\001\002" +
    "\000\004\005\156\001\002\000\006\004\uffe0\006\uffe0\001" +
    "\002\000\004\006\uffd0\001\002\000\006\004\101\006\uffe3" +
    "\001\002\000\004\006\162\001\002\000\004\010\163\001" +
    "\002\000\004\005\164\001\002\000\006\004\uffdf\006\uffdf" +
    "\001\002\000\024\003\143\005\uffee\014\070\015\065\021" +
    "\067\025\023\026\015\030\021\031\074\001\002\000\024" +
    "\003\143\005\uffee\014\070\015\065\021\067\025\023\026" +
    "\015\030\021\031\074\001\002\000\024\003\uffd3\005\uffd3" +
    "\014\uffd3\015\uffd3\021\uffd3\025\uffd3\026\uffd3\030\uffd3\031" +
    "\uffd3\001\002\000\024\003\143\005\uffee\014\070\015\065" +
    "\021\067\025\023\026\015\030\021\031\074\001\002\000" +
    "\004\005\uffd9\001\002\000\004\005\uffdb\001\002\000\004" +
    "\005\uffda\001\002\000\004\010\175\001\002\000\004\005" +
    "\176\001\002\000\006\004\ufff2\006\ufff2\001\002\000\004" +
    "\006\uffe4\001\002\000\014\005\uffea\007\uffea\022\uffea\023" +
    "\uffea\024\uffea\001\002\000\004\017\202\001\002\000\034" +
    "\003\143\005\uffee\007\uffee\014\070\015\065\021\067\022" +
    "\uffee\023\uffee\024\uffee\025\023\026\015\030\021\031\074" +
    "\001\002\000\014\005\uffec\007\uffec\022\uffec\023\uffec\024" +
    "\uffec\001\002\000\004\017\205\001\002\000\034\003\143" +
    "\005\uffee\007\uffee\014\070\015\065\021\067\022\uffee\023" +
    "\uffee\024\uffee\025\023\026\015\030\021\031\074\001\002" +
    "\000\014\005\uffeb\007\uffeb\022\uffeb\023\uffeb\024\uffeb\001" +
    "\002\000\004\017\210\001\002\000\034\003\143\005\uffee" +
    "\007\uffee\014\070\015\065\021\067\022\uffee\023\uffee\024" +
    "\uffee\025\023\026\015\030\021\031\074\001\002\000\014" +
    "\005\uffed\007\uffed\022\uffed\023\uffed\024\uffed\001\002\000" +
    "\014\005\uffe8\007\uffe8\022\uffe8\023\uffe8\024\uffe8\001\002" +
    "\000\014\005\uffe9\007\uffe9\022\uffe9\023\uffe9\024\uffe9\001" +
    "\002\000\004\012\215\001\002\000\004\005\216\001\002" +
    "\000\012\002\ufffc\003\ufffc\004\ufffc\006\ufffc\001\002\000" +
    "\004\006\ufff4\001\002\000\004\002\ufffe\001\002\000\004" +
    "\002\001\001\002\000\004\002\000\001\002" });

  /** Access to parse-action table. */
  public short[][] action_table() {return _action_table;}

  /** <code>reduce_goto</code> table. */
  protected static final short[][] _reduce_table = 
    unpackFromStrings(new String[] {
    "\000\220\000\010\003\005\027\006\032\003\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\006\003\220\032\217\001\001\000\002\001" +
    "\001\000\014\011\013\014\021\015\017\016\015\017\053" +
    "\001\001\000\014\011\013\014\021\015\017\016\015\017" +
    "\016\001\001\000\012\011\013\014\021\015\052\016\015" +
    "\001\001\000\002\001\001\000\012\011\013\014\021\015" +
    "\051\016\015\001\001\000\002\001\001\000\002\001\001" +
    "\000\002\001\001\000\012\011\013\014\021\015\025\016" +
    "\015\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\010\003\031\033\032\034\033\001\001\000\002" +
    "\001\001\000\002\001\001\000\010\003\031\033\045\034" +
    "\033\001\001\000\002\001\001\000\014\011\013\014\021" +
    "\015\017\016\015\017\036\001\001\000\002\001\001\000" +
    "\002\001\001\000\010\003\031\033\041\034\033\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\006\004\056\005\055\001\001" +
    "\000\006\004\216\005\055\001\001\000\002\001\001\000" +
    "\002\001\001\000\016\010\065\011\061\012\063\013\072" +
    "\014\062\016\070\001\001\000\014\010\212\011\061\012" +
    "\063\014\062\016\070\001\001\000\014\010\211\011\061" +
    "\012\063\014\062\016\070\001\001\000\002\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\014\010\177\011\061\012\063\014\062\016" +
    "\070\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\006\006\077\007\076\001" +
    "\001\000\006\006\176\007\076\001\001\000\002\001\001" +
    "\000\002\001\001\000\024\010\102\011\061\012\063\013" +
    "\107\014\062\016\070\025\104\026\103\031\106\001\001" +
    "\000\010\022\165\023\164\030\167\001\001\000\002\001" +
    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
    "\000\004\035\112\001\001\000\002\001\001\000\002\001" +
    "\001\000\006\005\113\024\115\001\001\000\002\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\002\001\001\000\006\004\122\005\055" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\004\021\131\001\001\000\004" +
    "\021\156\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\024\010\065\011\061\012\063\013\135" +
    "\014\062\016\070\020\140\022\141\023\134\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\004\021\144\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\004\021\150\001\001\000" +
    "\002\001\001\000\004\021\152\001\001\000\002\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\006\006\160\007\076\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\014\010\172\011\061\012\063\014\062\016\070" +
    "\001\001\000\014\010\171\011\061\012\063\014\062\016" +
    "\070\001\001\000\002\001\001\000\014\010\170\011\061" +
    "\012\063\014\062\016\070\001\001\000\002\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\014\010\202\011\061\012\063" +
    "\014\062\016\070\001\001\000\002\001\001\000\002\001" +
    "\001\000\014\010\205\011\061\012\063\014\062\016\070" +
    "\001\001\000\002\001\001\000\002\001\001\000\014\010" +
    "\210\011\061\012\063\014\062\016\070\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001" });

  /** Access to <code>reduce_goto</code> table. */
  public short[][] reduce_table() {return _reduce_table;}

  /** Instance of action encapsulation class. */
  protected CUP$parser$actions action_obj;

  /** Action encapsulation object initializer. */
  protected void init_actions()
    {
      action_obj = new CUP$parser$actions(this);
    }

  /** Invoke a user supplied parse action. */
  public java_cup.runtime.Symbol do_action(
    int                        act_num,
    java_cup.runtime.lr_parser parser,
    java.util.Stack            stack,
    int                        top)
    throws java.lang.Exception
  {
    /* call code in generated class */
    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
  }

  /** Indicates start state. */
  public int start_state() {return 0;}
  /** Indicates start production. */
  public int start_production() {return 1;}

  /** <code>EOF</code> Symbol index. */
  public int EOF_sym() {return 0;}

  /** <code>error</code> Symbol index. */
  public int error_sym() {return 1;}


  /** User initialization code. */
  public void user_init() throws java.lang.Exception
    {

	if (simple) {
		 lexer = null;
		 lexer_simple.setdebug(debug);
	} else {
		lexer_simple = null;
		lexer.setdebug(debug);
	}


    }

  /** Scan to get the next Symbol. */
  public java_cup.runtime.Symbol scan()
    throws java.lang.Exception
    {

	if (simple) return lexer_simple.next_token(); else
		return lexer.next_token();

    }


  //VARIABLES
  // counter for errors
  /** Counting reported errors.*/
  public int error_count = 0;
  /** Message for Syntax errors. */
  public String syn_err_message = "";
  /** Counting reported warnings.*/
  public int warn_count = 0;
  /** Containing the name of the file we are parsing. Used by action code.*/
  public String filename;
  /** The model we want to store the triples at.*/
  public Model this_model = new Model(true);
  /** The lexer the parser works together with.*/
  Lexer lexer;
  Lexer_Simple lexer_simple;
  /** Output to print feedback. */
  Output Print = new Output();

  RDF_Error e = new RDF_Error();

  /** Time required to parse external namespaces*/
  private long extParsingTime = 0;


  // options that can be setted

  /** The option 'only' - parser will not send the triples to the model. The default setting is 'false'.*/
  boolean only = false;
  /** The only option - parser will not send the triples to the model. The default setting is 'false'.
      By turning the only option on the fetch_all option will be deactivated.*/
  public void setonly(boolean b) { this.only = b;
  				   if (b) this.fetch_all = false;
  }
  public boolean getonly() { return only; }

  /** The option 'triples' - the triples generated by the parser will be send to Output. The default setting is 'false'.*/
  boolean triples = false;
  /** The option 'triples' - the triples generated by the parser will be send to Output. The default setting is 'false'.*/
  public void settriples(boolean b) { this.triples = b; }
  public boolean gettriples() { return triples; }
  /** The option 'simple' - the parser is using the simple scanner. The default setting is 'false'. */
  private boolean simple = false;
  /** The option 'simple' - the parser is using the simple scanner. The default setting is 'false'.*/
  public void setsimple(boolean b) { this.simple = b; }
  public boolean getsimple() { return simple; }

  /** The option 'fetch_all' - all explicit stated namespaces will be fetched and included to teh generated model. The default setting is 'false'. */
  boolean fetch_all = false;
  /** The option 'fetch_all' - all explicit stated namespaces will be fetched and included to teh generated model. The default setting is 'false'.
      By turning the fetch_all option on the only option will be deactivated. */
  public void setfetch_all(boolean b) { this.fetch_all = b;
  					if (b) this.only = false;
  }
  public boolean getfetch_all() { return fetch_all; }
  /** The option 'verbose' - some more informations will be printed to Output. The default setting is 'false'. */
  boolean verbose = false;
  /** The option 'verbose' - some more informations will be printed to Output. The default setting is 'false'. */
  public void setverbose(boolean b) { this.verbose = b; }
  public boolean getverbose() { return verbose; }
  /** The option 'debug' - will be change the corresponding option at the used lexer for printing debugging details. The default setting is 'false'. */
  private boolean debug = false;
  /** The option 'debug' - will be change the corresponding option at the used lexer for printing debugging details. The default setting is 'false'. */
  public void setdebug(boolean b) {
  	this.debug = b;
  }
  public boolean getdebug() { return debug; }

  /** Returns the time required to parse external namespaces*/
  public long getextParsingTime(){
   return extParsingTime;
  }


 /**
 *  Parser called with String or with String and Model.
 */

 	public parser(String input, Model model) {
 		this_model = model;
 		init_parser(input);
 	}

	public parser(String input) {
		init_parser(input);
	}
	private void init_parser(String input) {
	error_count = 0;
	// parser can be called with a Java string containing the rdf descriptions. In this case
	// the input String must start with a "<". This should not happen if the input string re-
	// presents a file or a URL.
	if (input.startsWith("<")) {
		if (verbose) Print.outln("parser called with a string", false);
        	StringReader sr = new StringReader(input);
		lexer = new Lexer(sr);
		lexer_simple = new Lexer_Simple(sr);
	} else { // the input is a file or a URL and we fist test for encoding
		if (verbose) Print.outln("testing for encoding", false);
   		BufferedReader bin = null;
   		FileInputStream ff = null;
   		String encoding = "UTF-8"; // default encoding if nothing differed specified
   		String line = "";
		try {
			if (input.startsWith("file:") || input.startsWith("http://") || input.startsWith("ftp://")) {
				URL ns = new URL(input);
				URLConnection uc = ns.openConnection();
				 bin = new BufferedReader(new InputStreamReader(uc.getInputStream(), encoding));

			} else {
				// encoding by Sofia Alexaki 23. Nov. 2000
		 		ff = new FileInputStream(input);
 				bin = new BufferedReader( new InputStreamReader(ff, encoding));
			}
			while (line.length() <= 0) {
				line = bin.readLine().trim();
			}
			//System.out.println("found: "+line);
			if (line.startsWith("<?xml")) {
				// xml doctype declaration found
				// System.out.println("xml doctype declaration found");
				int i = line.indexOf("encoding");
				if (i > 0) {
					// encoding found in doctype declaration
					String s = line.substring(i).trim();
					s = s.substring(8).trim(); // remove string 'encoding'
					s = s.substring(1).trim(); // remove string '='
					if (s.startsWith("'")) {
						s = s.substring(1); // remove '
						i = s.indexOf("'");
					} else {
						// s starts with "
						s = s.substring(1); // remove "
						i = s.indexOf("\"");
					}
					encoding = s.substring(0,i);
					if (verbose) Print.outln("encoding set to "+encoding, false);

				}
			}
		} catch (Exception ex) {
			e.emit_error(4, 6, ex.toString(), "parser.parser");
			error_count++;
		} // encoding is setted
		if (input.startsWith("file:")) filename = input.substring(5);
		else filename = input;
		if (filename.startsWith("http://") || filename.startsWith("ftp://")) this_model.setBaseURI(filename+"#");
		else this_model.setBaseURI("file:"+filename+"#");
		try {
			if (input.startsWith("file:") || input.startsWith("http://") || input.startsWith("ftp://")) {
				URL ns = new URL(input);
				URLConnection uc = ns.openConnection();
				 bin = new BufferedReader(new InputStreamReader(uc.getInputStream(), encoding));
				 lexer = new Lexer(bin);
				 lexer_simple = new Lexer_Simple(bin);
			} else {
				// encoding by Sofia Alexaki 23. Nov. 2000
			 	ff = new FileInputStream(input);
 				bin = new BufferedReader( new InputStreamReader(ff, encoding));
 				lexer = new Lexer(bin);
 				lexer_simple = new Lexer_Simple(bin);
			}
		} catch (Exception ex) {
			e.emit_error(4, 6, ex.toString(), "parser.parser");
			error_count++;
		}
	}
   }

  void fetch_all(ArrayList ns_list) {
    long start_time = System.currentTimeMillis();
     this_model.fetch_all(ns_list, this);
     long end_time = System.currentTimeMillis();
     //extParsingTime = (double)((end_time-start_time)/1000);
     extParsingTime = end_time-start_time;
  }

  /**
  * Printing a warning and counting them.
  */
  public void report_warning(String message, Object obj) {
	warn_count++;
	report(message, obj);
  }


  /** Report a fatal error.  This method takes a  message string and an
   *  additional object (to be used by specializations implemented in
   *  subclasses).
   *
   * @param message an error message.
   * @param info    an extra object reserved for use by specialized subclasses.
   */
  public void report_fatal_error(String   message, Object   info)
    throws java.lang.Exception {
      /* use the normal error message reporting to put out the message */
      report_error(message, info);

      /* stop parsing (not really necessary since we throw an exception, but) */
      done_parsing();

      /* throw an exception */
      throw new Exception("Can't recover from previous error(s).");
    }

 /** Report a non fatal error (or warning).  This method takes a message
   *  string and an additional object (to be used by specializations
   *  implemented in subclasses).
   *
   * @param message an error message.
   * @param info    an extra object reserved for use by specialized subclasses.
   */
  public void report_error(String message, Object info)
    {
    ++error_count;
    report(message, info);
  }

 public void report(String message, Object info) {
    if (!(message.equals(""))) System.out.println(message);
    StringBuffer m = new StringBuffer("\t");

    if ( info instanceof java_cup.runtime.Symbol ) {
       java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol)info);

       if (s.left >= 0) {
         m.append("in line "+(s.left+1));

         if (s.right >= 0)
           m.append(", column "+(s.right+1));
       }
	m.append(" "+s.value);
     } else {
		if (info != null) m.append(info+" ");
		if (cur_token != null) {
		  if (cur_token.left != -1) {
			m.append("at line " + cur_token.left +
			"(" + cur_token.right + ")" + " of input");
			m.append(" during parsing: "+cur_token.value);
		  }
		}
	}
    System.out.println(m);
 }

  /** This method is called when a syntax error has been detected and recovery
   *  is about to be invoked.
   *
   * @param cur_token the current lookahead Symbol.
   */
  public void syntax_error(Symbol cur_token)
    {
    // report_error("Syntax error", cur_token);
    StringBuffer m = new StringBuffer("");
	if (cur_token != null) {
	  if (cur_token.left != -1) {
		m.append("at line " + cur_token.left +
		"(" + cur_token.right + ")" + " of input");
		m.append(" during parsing: "+cur_token.value);
	  }
	syn_err_message = m.toString();
	} else {
		syn_err_message = "";
	}
    }

}

/** Cup generated class to encapsulate user supplied action code.*/
class CUP$parser$actions {









/*
 *  CHANGE LOG:
 *  Each entry starts with a date, who did the changed and what has been done.
 *  Separated by ':'.
 *
 *  27.02.2002 : Karsten Tolle : RDF WG removed the rdf:aboutEach and rdf:aboutEachPrefix attributes.
 *  01.03.2002 : Karsten Tolle : Report an error instead of a waring for rdf:aboutEach and
 *                               rdf:aboutEachPrefix. The attributes have been removed from
 *                               VRP.Vocabulary.rdf.
 *  08.05.2002 : Karsten Tolle : Bug Fixed - When container elements contain a typed node (this could be
 *			         another container) the counting was not correct.
 *  15.05.2002 : Karsten Tolle : Bug Fixed - PropertyElt are only allowed to contain one typedNode.
 *  16.05.2002 : Karsten Tolle : Enabled to use XML Base.
 *  25.06.2002 : Karsten Tolle : Removed a bug inside the setoptions for 'only' and 'fetch_all'.
 *  05.12.2002 : Karsten Tolle : Added rdf:parseType="Collection".
 *  16.12.2002 : Karsten Tolle : Added a URI check for the rdf attributes rdf:resource, rdf:about
 *					   and rdf:type using java.net.URI (since Java 1.4).
 *  24.12.2002 : Karsten Tolle : Included xml:lang and rdf:datatype for Literals.
 *  23.01.2003 : Karsten Tolle : Changed make_uri - fixed bug with XML Base.
 *  29.01.2003 : Karsten Tolle : Changes due to the latest RDF/XML Syntax Specification (Reviesed)
 *                                therefor changed the methodes ns_enter, prop_lit
 *  30.01.2003 : Karsten Tolle : For rdf:nodeID we now generate the following blank node
 *                               identifier: <URL>#blankNode:<value>
 */


 //
 // VARIABLES
 //
 /**
  * Hash set containing the IDs for RDF:bagID and RDF:ID. Should be unique within each file.
  */
 private HashSet ID_hashset = new HashSet();

 /**
  * Hash map containing hash maps with the prefix and namespaces.
  * The current valid map can be accessed by
  * 'prefix_hashmap.get(map_<deep_count-1>)'.
  */
 private HashMap prefix_hashmap = init_hashmap();


 /**
  * Array list containing all explicit stated namespaces.
  * Entered on 08 of Aug by Karsten Tolle
  */
 public ArrayList ns_list = new ArrayList();


 /**
  * Hash-map containing the attributes and their values.
  * The current valid map can be accessed by 'attr_hashmap.get(map_<deep_count-1>)'.
  */
 private HashMap attr_hashmap = init_hashmap();

 /**
  * Counting how deep inside an element we are.
  */
 private int deep_count = 0;

  /**
  * Hash map containing the valid base uri as specified if
  * specified in xml:base. The current valid base uri can be
  * accessed by 'base_hashmap.get(""+deep_count)'.
  */
 private HashMap base_map = new HashMap();


 // Enters s for the current value for the base.
 private void enter_base(String s) {
    // in case there are attatched fragments they will be deleted
    if (s.indexOf("#") >= 0) s = s.substring(0,s.indexOf("#"));

    // in case a valid base uri exist and string s contains just
    // a path information the new base valid base uri should be the
    // domain of the parent base extended by the given path (see XML Base
    // specification for an example).
    if (s.startsWith("/")) s = get_domain(get_current_base())+s;
    else {
      try { // in case it is not a valid url we print a warning
        URL url = new URL(s);
     } catch(Exception e) {
        System.out.println("Warning! "+e);
     }
    }
    base_map.remove(""+deep_count);
    base_map.put(""+deep_count,s);
 }

 private void remove_base() {
    base_map.remove(""+deep_count);
 }

 private String get_current_base() {
    for (int i = deep_count; i>=0; ) {
      if (base_map.containsKey(""+i)) {
          return base_map.get(""+i).toString();
      }
      i--;
    }
    String s = parser.this_model.getBaseURI();
    if (s.indexOf("#") >= 0) s = s.substring(0,s.indexOf("#"));
    return s;
 }


  /**
  * Hash map containing the language definitions of the xml:lang attribute. The
  * current valid language definition can be accessed by
  * get_current_lang().
  */
 private HashMap lang_map = new HashMap();

 // Enters s for the current value for the language.
 private void enter_lang(String s) {
    lang_map.remove(""+deep_count);
    lang_map.put(""+deep_count,s);
 }

 private void remove_lang() {
    lang_map.remove(""+deep_count);
 }

 private String get_current_lang() {
    for (int i = deep_count; i>=0; ) {
      if (lang_map.containsKey(""+i)) {
          return lang_map.get(""+i).toString();
      }
      i--;
    }
    return "";
 }


 private String genSysID() {
    return get_current_base()+"#"+parser.this_model.genSysID();
 }

 /**
  * For a given reference this method returns the corresponding
  * uri, based on the base uri. This method differs in the case
  * of the attribute rdf:ID.
  */
 private String make_uri(String attribute, String value) {
    boolean id = false;
    if (attribute.equals(rdf.ID) || attribute.equals(rdf.bagID)) id = true;
    String base = get_current_base();
    if (id) { // in case rdf:ID was encountered
        if (value.equals("")) value = base;
        else value = base+"#"+value;
    } else { // for the other attributes (rdf:resource, rdf:about, rdf:bagID, rdf:type)
        if (value.equals("")) value = base;
        if (value.startsWith("#")) value = base+value;
        if (value.startsWith("../")) {
          // in this case we want to use the domain combined with the value removing
          // the leading "../" string.
          // Difficult case if e.g. "../../something" is around
          // need further checks what to do in this cases. !!!
          value = get_domain(base) + value.substring(3);
        }
        if (value.indexOf(":") > 0) { /*we assume to have a scheme inside and
        therefore an absolute URI*/}
        else {
          value = base+"#"+value;
        }
    }
    return value;
 }

 private String get_domain(String uri) {
    String domain = "";
    try {
      URL url = new URL(uri);
      if (url.getProtocol().equals("http")) return url.getProtocol()+"://"+url.getHost();
      else return url.getProtocol()+":"+url.getHost();
    } catch (Exception e) {
      System.out.println("Warning! "+e);
    }
    return domain;
 }

/**
 * To convert the property li in the corresponding _nn property.
 */
 private int li_number = 1;

 private HashMap li_map = new HashMap();

 // Returns the current value and sets the map to the next.
 private int increase_li_map() {
    Integer I = (Integer)li_map.get(""+deep_count);
    int i = I.intValue();
    I = new Integer(i+1);
    li_map.remove(""+deep_count);
    li_map.put(""+deep_count,I);
    return i;
 }

 // Returns the current value and sets the map to the next.
 private int get_li_int() {
    if (li_map.containsKey(""+deep_count)) {
      return increase_li_map();
    } else {
      li_map.put(""+deep_count, new Integer(2));
      return 1;
    }
 }

 private void show_li_map(String s) {
    System.out.println("in show_li_map at "+s);
    for(int i = 0; i<=10; ) {
      if (li_map.containsKey(""+i)) {
          Integer I = (Integer)li_map.get(""+i);
          int j = I.intValue();
          System.out.println("\tli_map deep_count: "+i+" value: "+j);
      }
      i++;
    }
 }

 //Remove all li maps highter than: i.
 private void remove_li_map(int i) {
    Set keyset = li_map.keySet();
    if (keyset.isEmpty()) return;
    String s;
    Object[] ol = keyset.toArray();
    for (int z = 0; z <= keyset.size(); ) {
      s = ol[z].toString();
      z++;
      Integer J = new Integer(s);
      int j = J.intValue();
      if (j>=i) {
        li_map.remove(""+j);
      }
    }
 }

 /**
  * List of prefixes used in a attribute list to check if the prefix
  * exists in the refering prefix_hashmaps.
  */
 private List attr_ns_list = new LinkedList();


 /**
  * PropertyElt_list property elements inside a typedNode. We are
  * parsing bottom up, so we need to send this information to the
  * parent node.
  */
 private List propertyElt_list = new ArrayList();

 /**
  * A stack containing the propertyElt_lists.
  */
 private Stack propertyElt_stack = init_propertyElt_stack();


 /**
  * Counting the created triples.
  */
 private int tripel_count = 1;


 /**
 * Enters the hashmap 'map_0' in a new hashmap and returns this map.
 */
 private HashMap init_hashmap() {
 	HashMap map = new HashMap();
	map.put("map_0", new HashMap());
	return map;
 }

 /**
  * Init the propertyElt_stack by entering an empty array list.
  */
 private Stack init_propertyElt_stack() {
	Stack s = new Stack();
	s.push(new ArrayList());
	return s;
 }
 /**
 * Enters the namespace-prefix in the attribute namespace list.
 * At the end of the attribute list of an element it will be checked
 * if those prefixes exists in the corresponding namespace maps.
 */
 private void attr_ns_enter(Object ns) {
	// conform to the w3c WG all attributes should be qualified.
      String s = ns.toString();
      int i = s.indexOf(":");
	if (i <= 0) emit_warning("The attribute "+ns.toString()+" is unqualified. The W3C WG states that all attribues should be qualified.", "Parser.attr_ns_enter");
	attr_ns_list.add(ns);
 }

 /**
 * Tests if the namespace prefixes in the attr_ns_list are inside
 * the corresponding namespace maps.
 */
 private void attr_ns_prefix_test() {
	int i = attr_ns_list.size();
	--i; 		// first position in a list is '0' and not '1'.
	while (i >= 0) {
		String s = attr_ns_list.get(i).toString();
		int j = s.indexOf(":");
		if (j >= 0) prefix_test(s);
		attr_ns_list.remove(i);		// empty the list
		i--;
	}
 }

 /**
 * Tests if other atributes than ID are specified in the attribut_list.
 * XML attributes except xml:lang are escaped.
 */
 private void attribut_list_test(Object name) {
	HashMap map = attr_hashmap_absolut(name);
	if (map.containsKey(rdf.ID)) map.remove(rdf.ID);
        if (map.containsKey(rdf.datatype)) map.remove(rdf.datatype);
	Collection col = map.keySet();
	for (Iterator it = col.iterator(); it.hasNext(); ) { //remove XML attributes
		String next = it.next().toString();
		if (next.startsWith("xml")) {
                    this.emit_warning("The attribute "+next+" will be ignored!","attribute_list_test");
                    map.remove(next);
            }
	}
	if (! map.isEmpty() ) emit_error(2, 1, "", "attribut_list_test", name);
 }

 /**
 * Enters the ID into the <ID_hashset>. ID should be unique! The hashset
 * will not be used further. Therefore we have the attribute_hashmap.
 */
 private void enter_ID(Object ID) {
        // With the suport of XML Base for RDF/XML we need to
        // take the cuurend valid xml:base value into accout.
        String absolut_id = make_uri(rdf.ID, ID.toString());
	if (!ID_hashset.contains(absolut_id)) ID_hashset.add(absolut_id);
	else emit_error(2, 2, absolut_id, "enter_ID", ID);
 }

 /**
 * Returns the string without " or ' at beginning and end.
 */
 private String cut_quotas(String s) {
	if ((s.startsWith("\"") && s.endsWith("\"")) || (s.startsWith("\'") && s.endsWith("\'"))) {
		int i = s.length();
		s = s.substring(1, --i);
	}
	return s;
 }

 /**
 * Enters a attribute name in the valid map in <attr_hashmap>. In one attribute list the
 * attribute names should be unique! And it is not allowed to mix
 * the following rdf-attributes: ID, about.
 */
 private void enter_attr(Object attr, Object value) {
	String s = "map_"+deep_count;
	HashMap map = (HashMap)attr_hashmap.get(s);
	// Remember this map contains the attributes including their prefix.
	s = value.toString();
	s = cut_quotas(s);
	if (!map.containsKey(attr)) {
		map.put(attr, s);
	}
	else emit_error(2, 3, attr.toString(), "enter_attr", attr);
        if (attr.toString().equals("xml:base")) enter_base(s);
 }

 /**
 * Returns the current valid attribute list.
 */
 private HashMap get_current_attrlist() {
	int i = deep_count;
	--i;
	String s = "map_"+i;
	HashMap map = (HashMap)attr_hashmap.get(s);
	return map;
 }

 /**
 * If qname == {QName} ":" {QName} this method returns 'true' otherwise it will return 'false'.
 */
 private boolean has_prefix(String qname) {
	int i = qname.indexOf(":");
	if (i>0) return true;
	return false;
 }

 /**
 *  If the corresponding namespace is not rdf.NS (as can be found in VRP.Vocabulary.rdf.java) it prints a warning.
 */

 private void rdf_ns(Object name) {
	String ns = get_ns(name);
	if (!ns.equals(rdf.NS)) emit_warning("RDF namespace expected!", "Parser.rdf_ns");
 }

 /**
 * Returns the actual valid attribute list with the absolut path expressions. If an attribute
 * does not have a namespace-prefix, it will inherit the namespace of the element-tag given by
 * 'name'.
 */

 private HashMap attr_hashmap_absolut(Object name) {
	HashMap attr_absolut = new HashMap();
	boolean ia = false; // id, about and nodeID not mixed
	String tag_ns = get_ns(name);
	if (tag_ns.equals("No NS!")) tag_ns = "";
	HashMap map = get_current_attrlist();
	Collection attributes = map.keySet();
	for (Iterator it = attributes.iterator(); it.hasNext(); ) {
		String attr_name = it.next().toString();
		if (attr_name.startsWith("xml")) {
                        /* XML attributes are not generating triples. */
			break;
		}
		String attr_value = map.get(attr_name).toString();
		if (has_prefix(attr_name)) {
			String ns = get_ns(attr_name);
			if (tag_ns.equals("No NS!")) tag_ns = "";
			int i = attr_name.indexOf(":");
			if (i>=0) attr_name=attr_name.substring(++i);
			attr_name = ns+attr_name;
		} else {
			attr_name = tag_ns+attr_name;
		}
		if (attr_name.equals(rdf.ID) ||
		    attr_name.equals(rdf.about) || attr_name.equals(rdf.nodeID)) {
			if (ia)
				emit_error(2, 4, attr_name, "attr_hashmap_absolut", attr_name);
			ia =true;
		}
	      if (!attr_absolut.containsKey(attr_name)) attr_absolut.put(attr_name, attr_value);
	      else emit_error(2, 3, attr_name.toString(), "attr_hashmap_absolut", attr_name);
	}
	URI_check(attr_absolut);
	return attr_absolut;
 }

 /**
 * This Method is called with every element having a start and end tag.
 */
 private void two_names(Object n1, Object n2) {
	name_compare(n1,n2);
	prefix_test(n1);
  	remove_maps();
 }

 /**
 * This Method is called with every element having only a start tag.
 */
 private void one_name(Object n) {
	prefix_test(n);
  	remove_maps();
 }

 /**
 * Tests if an alternative is declared.
 */
 private void alternative_test(Object alt) {
	if (alt == null) emit_error(2, 6, "RDF M&S [6.27]", "alternative_test", "RDF M&S [6.27]");
 }

 /**
 * This Method is called to raise the deep count counter and
 * to enter new maps to <prefix_hashmap> and <attr_hashmap>.
 */
 private void enter_maps() {
	deep_count++;
	String s = "map_"+deep_count;
	prefix_hashmap.put(s, new HashMap());
	attr_hashmap.put(s, new HashMap());
 }

 /**
  * Enters a new list to the propertyElt_stack. Is called with 'parseType="Resource"'.
  */
 private void enter_propertyElt_stack() {
	propertyElt_stack.push(new ArrayList());
 }

 /**
 * Removes the corresponding hashmap at the end of an element out of
 * the <prefix_hashmap> hashmap and <attr_hashmap>.
 */
 private void remove_maps() {
// The last map entered is an empty map, so we have to delete this one and empty the one before.
// Here done by deleting the last two and inserting an empty one.
	String s = "map_"+deep_count;
	prefix_hashmap.remove(s);
	attr_hashmap.remove(s);
        remove_base();
        remove_lang();
	--deep_count;
	s = "map_"+deep_count;
	prefix_hashmap.remove(s);
	attr_hashmap.remove(s);
	prefix_hashmap.put(s, new HashMap());
	attr_hashmap.put(s, new HashMap());
 }

 /**
 * Enters the namespace and the prefix in the map in <prefix_hashmap>. For each
 * new element there will be a new hashmap inside the hashmap
 * <prefix_hashmap> the key for each hashmap is created with
 * the varable <deep_count>.
 */
  private void ns_enter(Object pre, Object ns) {
	String s = "map_"+deep_count;
	HashMap map = (HashMap)prefix_hashmap.get(s);

	if (map.containsKey(pre)) {
		emit_error(2, 7, pre.toString(), "ns_enter", pre);
	} else {
                  s = ns.toString();
		  s = cut_quotas(s);
		  s = s.trim(); // just to be sure
                  if ( (s.startsWith(rdf.NS0) && (! (s.equals(rdf.NS) || s.equals(rdf.NS0)))) ||
                      (s.startsWith(XML.NS) && (! s.equals(XML.NS))) )
                        emit_error(2, 13, s, "parser.ns_enter", ns);
		  // if s does not end with a '#' we want to add it
		  if (s.length() > 0) { if (! s.endsWith("#")) s = s+"#"; }
		  map.put(pre, s);
		  // entered on 08. Aug by Karsten Tolle
		  // for fetching all explicit stated namespaces
		  // we enter them to an array list. The method
		  // fetch_all of the model will be called with this
		  // array list after generating the current model.
		  ns_list.add(s);
	}
 }

 /**
 * Tests if a prefix is defined. Prefix and corresponding namespace URI
 * are saved inside the <prefix_hashmap>.
 */
 private void prefix_test(Object name) {
	String ns = get_ns(name);
	// Returns "No NS!" if prefix is not found in the valid prefix_hashmaps.
	if (ns.equals("No NS!")) {
		String prefix, tag_name;
		tag_name = name.toString();
		int i = tag_name.indexOf(":");
	  	if (i > 0) {
			prefix = tag_name.substring(0,i);
			tag_name = tag_name.substring(++i);
	  	} else {
			prefix = "";
	  	}
		emit_error(2, 8, prefix.toString()+":"+tag_name.toString(), "prefix_test", name);
	}
 }

 /**
 * Transforms the name to the absolut path name by replacing the prefix with the ns.
 */
 private String toabsolut(Object tag_name) {
 	  String s = tag_name.toString();
	  String name, prefix;
	  String NS = get_ns(tag_name);
	  int i = s.indexOf(":");
	  if (i > 0) {
			name = s.substring(++i);
	  } else {
			name = s;
	  }
	  if (NS.equals("No NS!")) return name;
	  name = NS+name;
	  if (name.equals(rdf.li)) {
		name = rdf.NS+"_"+get_li_int();
   	  }
	  return name;
 }

 /**
 * Printing the message to the Output.
 */
 private void outln(String message) {
	parser.Print.outln(message, false);
 }

 /**
 * Printing the error and counting them.
 */
 private void emit_error(int kind, int number, String message, String by, Object token) {
	if (kind == 2) parser.e.emit_error(kind, number, message, "CUP$parser$actions."+by);
	if (kind == 1) parser.e.emit_error(kind, number, parser.syn_err_message, by);
 }

 /**
 * Printing the warning and counting it.
 */
 private void emit_warning(String message, String by) {
	parser.e.emit_warning(message, by);
	//parser.report_warning("Warning: "+message, token);
 }

 /**
 * Comparing two object. If they are not equal it cause an error.
 */
 private void name_compare(Object obj1, Object obj2) {
	if(!obj1.equals(obj2)) {
		emit_error(2, 9, obj1.toString()+" and "+obj2.toString(), "name_compare", obj1);
	}
 }

 /**
 * For the 'rdf:parseType="Literal"' we need to recreate the original text.
 * This method is for the case we are having an element like '<...>...</...>'.
 */
 private String creat_orig_2(Object n1, Object n2, Object lit1, Object lit2) {
	String Text, s;
	String attributes = org_attr();
	Text = "<"+n1.toString()+" "+attributes+">"+lit1.toString()+"</"+n2.toString()+">"+lit2.toString();
	return Text;

 }

 /**
 * For the 'rdf:parseType="Literal"' we need to recreate the original text.
 * This method to recreate the original attribute list.
 */
 private String org_attr() {
	String s, attributes = "";
	int i = deep_count;
	i--;
	s = "map_"+i;
	HashMap map = (HashMap)attr_hashmap.get(s);
	Collection col = map.keySet();
	for (Iterator it = col.iterator(); it.hasNext(); ) {
		String attr_name = it.next().toString();
		String attr_value = "\""+map.get(attr_name).toString()+"\"";
		attributes = attributes+" "+attr_name+"="+attr_value;
	}
	return attributes;
 }

 /**
 * For the 'rdf:parseType="Literal"' we need to recreate the original text.
 * This method is for the case we are having an element like '<.../>'.
 */
 private String creat_orig_1(Object n1, Object lit1) {
	String Text, s;
	String attributes = org_attr();
	Text = "<"+n1.toString()+" "+attributes+"/>"+lit1.toString();
	return Text;

 }

 /**
 * For the 'rdf:parseType="Literal"' we need to recreate the original text.
 * This method is for the case we have only a string.
 */
 private String creat_orig_str(Object str, Object lit1) {
	String Text = "";
	Text = str.toString()+lit1.toString();
	return Text;

 }

 /**
 * Returns the namespace of an QName.
 */
 private String get_ns(Object name) {
	  String prefix = name.toString();
	  int i = prefix.indexOf(":");
	  if (i > 0) {
			prefix = prefix.substring(0,i);
	  } else {
			prefix = "";
	  }
	  i = deep_count;
	  while (i >= 0) {
	  	String s = "map_"+i;
		HashMap map = (HashMap)prefix_hashmap.get(s);
		i--;
	  	if (map.containsKey(prefix)) {
			prefix = map.get(prefix).toString();
			if (prefix.equals("")) {
				prefix = parser.this_model.getBaseURI();
			}
			return prefix;
		} // end if
	  } // end while
	  // if no default NS is defined we use the actual file
	  // changed 17. March 2000
	  if (prefix.equals("")) {
		prefix = parser.this_model.getBaseURI();
		return prefix;
	  }
 	  return "No NS!";
 }


 /**
 *  Triple creation
 */
 private void new_triple(String prop, String subj, Object object) {
        String obj="";
        Literal l = null;
        boolean res = false;
        if (object instanceof Literal) {
            l = (Literal)object;
            obj = l.toString();
        } else {
            res = true;
            obj = object.toString();
        }
	if (! parser.only) {
		if (res) parser.this_model.addStatement(prop, subj, obj);
		else {
                  parser.this_model.addStatement(prop, subj, l);
                }
	}
	if (parser.verbose) {
		parser.Print.out(tripel_count+"", false);
		parser.Print.out(", ", false);
	}
	if (parser.triples) {
		parser.Print.outln("Parser-Triple"+tripel_count+": ("+prop+", "+subj+", "+obj+") ", true);
	}
	tripel_count++;
 }

/**
 * For adding all explicit stated namespaces to the existing model.
 */
 private void at_eof() {
 	if (parser.fetch_all && (! parser.only)) parser.fetch_all(ns_list);
 }

/**
 * For rdf attributes rdf:about, rdf:type, rdf:resource only URIs are allowed.
 */
 private void URI_check(HashMap attr_absolut) {
	int i = 0;
	String value;
	if (attr_absolut.containsKey(rdf.about)) {
		value = attr_absolut.get(rdf.about).toString();
		if (! URI_check_help(value)) emit_error(2, 12, "parser.URI_check", "Invalid value for attribute "+rdf.about+": "+value, null);
	}
	if (attr_absolut.containsKey(rdf.type)) {
		value = attr_absolut.get(rdf.type).toString();
		if (! URI_check_help(value)) emit_error(2, 12, "parser.URI_check", "Invalid value for attribute "+rdf.type+": "+value, null);
	}
	if (attr_absolut.containsKey(rdf.resource)) {
		value = attr_absolut.get(rdf.resource).toString();
		if (! URI_check_help(value)) emit_error(2, 12, "parser.URI_check", "Invalid value for attribute "+rdf.resource+": "+value, null);
	}
 }

 private boolean URI_check_help(String value) {
    if (value.startsWith("#")) {
        //no further '#' allowed
        value = value.substring(1);
        if (value.indexOf("#") >= 0) return false;
        return true;
    }
    try {
        new URI(value);
    } catch (Exception e) {return false;}
    return true;
 }

 /**
 *  Is called by descriptions to create the corresponding statements.
 */

 private String typedNode(Object name) {
	HashMap attr_absolut = attr_hashmap_absolut(name);
	boolean description = false , bagid = false;
	String subj = "anonymos";
	String tag_name = toabsolut(name);
        remove_li_map(deep_count);
	String bagid_value = "";
        if (attr_absolut.containsKey(rdf.nodeID)) {
              subj = get_current_base()+"#"+"blankNode:"+attr_absolut.get(rdf.nodeID).toString();
              attr_absolut.remove(rdf.nodeID);
        }
	if (attr_absolut.containsKey(rdf.ID)) {
                subj = make_uri(rdf.ID, attr_absolut.get(rdf.ID).toString());
                attr_absolut.remove(rdf.ID);
	}
	if (attr_absolut.containsKey(rdf.about)) {
		subj = make_uri(rdf.about, attr_absolut.get(rdf.about).toString());
                attr_absolut.remove(rdf.about);
	}
	if (attr_absolut.containsKey(rdf.bagID)) {
		bagid = true;
		bagid_value = make_uri(rdf.bagID, attr_absolut.get(rdf.bagID).toString());
		subj = bagid_value;
                attr_absolut.remove(rdf.bagID);
	}
	if (subj.equals("anonymos")) {
		subj = genSysID();
	}
	if (tag_name.equals(rdf.Description)) description = true;
      /* The attributes rdf:aboutEach and rdf:aboutEachPrefix have been removed by the RDF
         WG. */
      if (attr_absolut.containsKey(rdf.NS+"aboutEach") ||
	attr_absolut.containsKey(rdf.NS+"aboutEachPrefix")) {
            emit_error(2, 11, "parser.typedNode", " ", null);
	     return subj;
      }
	if (!description) {  // we have a typed Node
			new_triple(rdf.type, subj, tag_name);
	}
	if (attr_absolut.containsKey(rdf.type)) {
                String s = make_uri(rdf.type, attr_absolut.get(rdf.type).toString());
                attr_absolut.remove(rdf.type);
		new_triple(rdf.type, subj, s);
	}
	Collection keys = attr_absolut.keySet();
	for (Iterator it = keys.iterator(); it.hasNext(); ) {
		String key = it.next().toString();
		String v = attr_absolut.get(key).toString();
                Literal l = new_literal(attr_absolut, v);
		new_triple(key, subj, l);
		if (bagid) bagid_create(key, subj, l, bagid_value, get_li_int());
	}
	propertyElt_list = (ArrayList)propertyElt_stack.pop();
	if (!propertyElt_list.isEmpty()) {
		int i = propertyElt_list.size();
		Object r2;
		while (--i >= 0) {
			UpCall E = (UpCall)propertyElt_list.remove(i);
			String p = E.getPredicate();
			r2 = E.getObject();
			new_triple(p, subj, r2);
                        if (E.getReification()) {
                              reify(E.getStatement(), p, subj, r2);
                        }
			if (bagid) bagid_create(p, subj, r2, bagid_value, get_li_int());
		}
	}
	// reenter an empty ArrayList if the stack is empty
	if (propertyElt_stack.empty()) {
            propertyElt_stack.push(propertyElt_list);
        }
	return subj;
 }


 private Literal new_literal(HashMap attr_absolut, String value) {
    Literal l = new Literal(value);
    String lang = this.get_current_lang();
    if (! lang.equals("")) l.setlang(lang);
    if (attr_absolut.containsKey(rdf.datatype)){
        l.settype(attr_absolut.get(rdf.datatype).toString());
    }
    return l;

 }

 /**
  * Generates the triples for a reified statement with the ID 'statement'.
  */
 private void reify(String statement, String pred, String subj, Object obj) {
 	new_triple(rdf.predicate, statement, pred);
	new_triple(rdf.subject, statement, subj);
	new_triple(rdf.object, statement, obj);
	new_triple(rdf.type, statement, rdf.Statement);
 }

 /**
 * Is called when the attribute 'rdf:bagID' is inside the attribute list.
 */
 private void bagid_create(String pred, String subj, Object obj, String bagid_value, int member_nr) {
        // effect of xml:base for the next line???
	String internal = genSysID();
        reify(internal, pred, subj, obj);
	new_triple(rdf.type, bagid_value, rdf.Bag);
	new_triple(rdf.NS+"_"+member_nr, bagid_value, internal);
 }


 /**
 * Called by property elements not having children to create the corresponding statements.
 * 5.14 of RDF/XML Syntax Spec. (Revised) March 25, 2002
 */
private void propAttr(Object name) {
      HashMap attr_absolut = attr_hashmap_absolut(name);
	String bagid_value = "";
	boolean bagid = false, res = true, reify = false;
	String tag_name = toabsolut(name);
	String r2 = "";
	String p = tag_name;

	if (! attr_absolut.isEmpty()) {
  	    if (attr_absolut.containsKey(rdf.resource)) {
                r2 = make_uri(rdf.resource, attr_absolut.get(rdf.resource).toString());
                attr_absolut.remove(rdf.resource);
		if (attr_absolut.containsKey(rdf.ID) || attr_absolut.containsKey(rdf.nodeID)) {
			emit_error(2, 10, "", "propAttr", name);
			attr_absolut.remove(rdf.ID);
		}
	    } else {
		if (attr_absolut.containsKey(rdf.ID)) {
                  r2 = make_uri(rdf.ID, attr_absolut.get(rdf.ID).toString());
                  attr_absolut.remove(rdf.ID);
                  reify = true;
		} else {
                    if (attr_absolut.containsKey(rdf.nodeID)) {
                        r2 = get_current_base()+"#"+"blankNode:"+attr_absolut.get(rdf.nodeID).toString();
                        attr_absolut.remove(rdf.nodeID);
                    } else r2 = genSysID();
		}
	    }
	    if (attr_absolut.containsKey(rdf.bagID)) {
		bagid = true;
                bagid_value = make_uri(rdf.bagID, attr_absolut.get(rdf.bagID).toString());
                attr_absolut.remove(rdf.bagID);
                reify = true;
	    }
	    if (attr_absolut.containsKey(rdf.type)) {
		String s = make_uri(rdf.type, attr_absolut.get(rdf.type).toString());
                attr_absolut.remove(rdf.type);
		new_triple(rdf.type, p, s);
	    }
	    Collection keys = attr_absolut.keySet();
	    for (Iterator it = keys.iterator(); it.hasNext(); ) {
		res = false;
		String key = it.next().toString();
		if (key.startsWith(rdf.NS) && (! (key.equals(rdf.value)))) {
			emit_warning("RDF attributes others than ID, bagID, type and resource will be ignored at this position!", "Parser.propAttr");
		} else {
			String v = attr_absolut.get(key).toString();
                        Literal l = new_literal(attr_absolut, v);
			new_triple(key, r2, l);
			if (bagid) bagid_create(key, r2, l, bagid_value, get_li_int());
		}
	    } // end for
        } // end if
        // the rest has to be done by the element containing this propertyElt
        UpCall E;
        if (reify && (! bagid)) E = new UpCall(p, r2, true, r2);
        else E = new UpCall(p, r2);
        // enter the property information to the stack
        propertyElt_list = (ArrayList)propertyElt_stack.pop();
        propertyElt_list.add(E);
        propertyElt_stack.push(propertyElt_list);
 }

/**
 * Called by property elements having a value as child.
 * since 06. Febr. 2000: The propertyElt_stack contains an empty
 * array list on top. If the value is a literal this empty stack
 * first needs to be deleted.
 * 5.9 and 5.10 of RDF/XML Syntax Spec. (Revised) March 25, 2002
 */
 private void prop_val(Object name, Object value_UC) {
	String tag_name = toabsolut(name);
        UpCall V = (UpCall)value_UC;
        UpCall E;
	boolean res = V.getRes_Lit();
        boolean reify = false;
        String statement_id = rdfID_reify(name);
        if (! statement_id.equals("")) reify = true;
        Object o = V.getObject();
        if (o instanceof Literal) {
          HashMap attr = attr_hashmap_absolut(name);
          if (attr.containsKey(rdf.datatype)) {
              String dt = attr.get(rdf.datatype).toString();
              Literal l = (Literal)o;
              l.settype(dt);
              o = l;
          }
        }
	String subj = "";
	if (V.getPredicate() != null) subj = V.getPredicate();
	if (! res || subj.equals("cont")) propertyElt_stack.pop();
        if (reify) E = new UpCall(tag_name, o, true, statement_id);
	else E = new UpCall(tag_name, o);
	// enter the property information to the stack
	propertyElt_list = (ArrayList)propertyElt_stack.pop();
	propertyElt_list.add(E);
	propertyElt_stack.push(propertyElt_list);
 }

 private String rdfID_reify(Object name) {
        String statement_id = "";
        // The id Attribute is possible and causes a reification.
        HashMap attr_absolut = attr_hashmap_absolut(name);
        if (attr_absolut.containsKey(rdf.ID)) {
                  statement_id = make_uri(rdf.ID, attr_absolut.get(rdf.ID).toString());
                  attr_absolut.remove(rdf.ID);
        }
        Collection keys = attr_absolut.keySet();
        for (Iterator it = keys.iterator(); it.hasNext(); ) {
		String key = it.next().toString();
                if (! key.equals(rdf.datatype)) emit_warning("Attributes others rdf:ID will be ignored at this position! "+key, "Parser.rdfID_reify");
        }
	return statement_id;
 }

 /**
 * Called by property elements having the attribute 'rdf:parseType="Literal"'.
 * 5.11 of RDF/XML Syntax Spec. (Revised) March 25, 2002
 */
 private void prop_lit(Object name, Object literal) {
        String lit_value = literal.toString();
        String lang = this.get_current_lang();
        Literal l = new_literal(attr_hashmap_absolut(name), lit_value);
        // since RDF/XML Syntax Spec. (Revised) 23. Jan. 2003
        l.settype(rdf.XMLLiteral);
	String tag_name = toabsolut(name);
        boolean reify = false;
        String statement_id = rdfID_reify(name);
        if (! statement_id.equals("")) reify = true;
        UpCall E;
        if (reify) E = new UpCall(tag_name, l, true, statement_id);
	else E = new UpCall(tag_name, l);
	// enter the property information to the stack
	propertyElt_list = (ArrayList)propertyElt_stack.pop();
	propertyElt_list.add(E);
	propertyElt_stack.push(propertyElt_list);
 }

 /**
 * Called by property elements having the attribute 'rdf:parseType="Resource"' to
 * create the statements for it.
 * 5.12 of RDF/XML Syntax Spec. (Revised) March 25, 2002
 */
 private String propRes(Object name) {
	HashMap attr_absolut = attr_hashmap_absolut(name);
	boolean description = false, res = true;
	String subj;
	String tag_name = toabsolut(name);
	String prop = tag_name;
        boolean reify = false;
        String statement_id = rdfID_reify(name);
        if (! statement_id.equals("")) reify = true;
        // the syntax here changed a bit since RDF/XML syntax revised
        // (March 25 2002) a blank node is generated anyway
        // if rdf:ID is present the statement is also reified
        subj = genSysID();
	// in the propertyElt_stack are at least 2 arraylists
	// the first will be deleted to the second arraylist we enter
	// the UpCall information
	propertyElt_list = (ArrayList)propertyElt_stack.pop();
	if (!propertyElt_list.isEmpty()) {
		int i = propertyElt_list.size();
		while (--i >= 0) {
			UpCall E = (UpCall)propertyElt_list.remove(i);
			String p = E.getPredicate();
			Object r2 = E.getObject();
			new_triple(p, subj, r2);
		}
	}
        // the rest has to be done by the element containing this propertyElt
        UpCall E;
        if (reify) E = new UpCall(prop, subj, true, statement_id);
        else E = new UpCall(prop, subj);
        propertyElt_list = (ArrayList)propertyElt_stack.pop();
        propertyElt_list.add(E);
        propertyElt_stack.push(propertyElt_list);
	return subj;
 }

 /**
 * Called by property elements having the attribute 'rdf:parseType="Resource"' to
 * create the statements for it.
 */
 private void propCol(Object name, Object des) {
        String prop = toabsolut(name);
	// The rdf:parseType="Collection" was found. We now need to build up
        // a list containing the root nodes of the descriptions or the literals
        // given. For the list blank nodes are used to conntect the nodes. Each
        // blank node has a link to the next node (this means it is a simple
        // linked list). To end the list rdf:nil is used. The blank nodes are of
        // type rdf:List. The connection is done with rdf:first and rdf:rest.

        // The Object des is an ArrayList containing the typed nodes and the
        // Object name is the URI of the property containing the collection.
        ArrayList al = (ArrayList)des;
        String n = name.toString();
        boolean reify = false;
        String statement_id = rdfID_reify(name);
        if (! statement_id.equals("")) reify = true;
        // need to generate a blank node
        String subj, obj;
        String ancs = "";
        subj = genSysID();
        String first_node = subj;
        for (Iterator it = al.iterator();it.hasNext();) {
            obj = it.next().toString();
            new_triple(rdf.type, subj, rdf.List);
            new_triple(rdf.first, subj, obj);
            if (! ancs.equals("")) {
                new_triple(rdf.rest, ancs, subj);
            }
            ancs = subj;
            subj = genSysID();
        }
        UpCall E = null;
        if (ancs.equals("")) {
            E = new UpCall(prop, rdf.nil); // rdf:nil needs to be connected to the parent
        } else {
            new_triple(rdf.rest, ancs, rdf.nil);
            if (! reify) E = new UpCall(prop, first_node);
        }
        // the rest has to be done by the element containing this propertyElt
        propertyElt_list = (ArrayList)propertyElt_stack.pop();
        if (E != null) propertyElt_list.add(E);
        if (reify) {
             E = new UpCall(prop, first_node, true, statement_id);
             propertyElt_list.add(E);
        }
        propertyElt_stack.push(propertyElt_list);
 }

private ArrayList union(Object des2, Object des) {
        ArrayList al;
        if (des == null) {
            al = new ArrayList();
            al.add(0,des2);
            return al;
        }
        // des should be an ArrayList
        al = (ArrayList)des;
        al.add(0,des2);
	return al;
}



private UpCall generate_UpCall(Object o) {
        String s = o.toString();
	Literal l = new Literal(s);
	String lang = get_current_lang();
	if (! lang.equals("")) l.setlang(lang);
	UpCall E = new UpCall(null, l);
	return E;
}


private void xml_lang(Object lang) {
	String s = lang.toString();
	int i = s.indexOf("\"");
	if (i <= 0) i = s.indexOf("'");
	s = s.substring(++i);
	i = s.indexOf("\"");
	if (i <= 0) i = s.indexOf("'");
	s= s.substring(0,i);
	enter_lang(s);
}



 /**
 * Creating the result and output for the parsing prozess.
 */
 public Object result() {
	if (parser.warn_count > 0) outln("There are "+parser.warn_count+" warning(s) occured during prasing.");
	if (parser.error_count == 0) {
		return parser.this_model;
	}
	outln("Found "+parser.error_count+" error(s) during parsing!");
	return null;
 }



//====================================================================================
// END OF ACTION CODE
//====================================================================================




  private final parser parser;

  /** Constructor */
  CUP$parser$actions(parser parser) {
    this.parser = parser;
  }

  /** Method with the actual generated action code. */
  public final java_cup.runtime.Symbol CUP$parser$do_action(
    int                        CUP$parser$act_num,
    java_cup.runtime.lr_parser CUP$parser$parser,
    java.util.Stack            CUP$parser$stack,
    int                        CUP$parser$top)
    throws java.lang.Exception
    {
      /* Symbol object for return from actions */
      java_cup.runtime.Symbol CUP$parser$result;

      /* select the action based on the action number */
      switch (CUP$parser$act_num)
        {
          /*. . . . . . . . . . . . . . . . . . . .*/
          case 62: // xmlAttr ::= XMLATTR EQUAL ATTRIBUTEVALUE 
            {
              Object RESULT = null;
		int xmlleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int xmlright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object xml = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 enter_attr(xml, val); 
              CUP$parser$result = new java_cup.runtime.Symbol(10/*xmlAttr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 61: // langdekl ::= XMLLANG 
            {
              Object RESULT = null;
		int langleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int langright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object lang = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 /* outln("xmllang");
		   methode mit enter_attr fuer literal! */
			xml_lang(lang); 	
		 
              CUP$parser$result = new java_cup.runtime.Symbol(7/*langdekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 60: // nsdekl ::= XMLNS EQUAL ATTRIBUTEVALUE 
            {
              Object RESULT = null;
		int preleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int preright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object pre = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		int nsleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int nsright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object ns = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 /* outln("Prefix: "+pre+" NS: "+ns); */
		   ns_enter(pre, ns);
		   enter_attr("xmlns:"+pre.toString(), ns); 
              CUP$parser$result = new java_cup.runtime.Symbol(12/*nsdekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 59: // xmldekl ::= 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(11/*xmldekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 58: // xmldekl ::= xmlAttr xmldekl 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(11/*xmldekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 57: // xmldekl ::= langdekl xmldekl 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(11/*xmldekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 56: // xmldekl ::= nsdekl xmldekl 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(11/*xmldekl*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 55: // xmldekl_list ::= xmldekl 
            {
              Object RESULT = null;
		 enter_maps();
		   /* outln("xmldekl_list"); */ 
              CUP$parser$result = new java_cup.runtime.Symbol(13/*xmldekl_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 54: // all_attr_list ::= parseResource 
            {
              Object RESULT = null;
		 enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(14/*all_attr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 53: // all_attr_list ::= parseLiteral 
            {
              Object RESULT = null;
		 enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(14/*all_attr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 52: // all_attr_list ::= attributelist 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(14/*all_attr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 51: // literal ::= error 
            {
              Object RESULT = null;
		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object e = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 emit_error(1, 9, "", "parser", e); 
              CUP$parser$result = new java_cup.runtime.Symbol(15/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 50: // literal ::= 
            {
              Object RESULT = null;
		 RESULT = ""; 
              CUP$parser$result = new java_cup.runtime.Symbol(15/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 49: // literal ::= STRING literal 
            {
              Object RESULT = null;
		int strleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int strright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object str = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		int lit1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int lit1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object lit1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = creat_orig_str(str, lit1); 
              CUP$parser$result = new java_cup.runtime.Symbol(15/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 48: // literal ::= ELSTART QNAME attributelist ALELEND literal 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int lit1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int lit1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object lit1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = creat_orig_1(n, lit1);
		       one_name(n); 
              CUP$parser$result = new java_cup.runtime.Symbol(15/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 47: // literal ::= ELSTART QNAME all_attr_list ALEND literal ELEND QNAME ALEND literal 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-7)).value;
		int lit1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left;
		int lit1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right;
		Object lit1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		int lit2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int lit2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object lit2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = creat_orig_2(n1, n2, lit1, lit2);
		       two_names(n1,n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(15/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-8)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 46: // parseCollection ::= PARSETYPECOL 
            {
              Object RESULT = null;
		int ptleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int ptright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object pt = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 prefix_test(pt);
		   enter_propertyElt_stack();
		   RESULT=pt;
              CUP$parser$result = new java_cup.runtime.Symbol(22/*parseCollection*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 45: // parseResource ::= PARSETYPERES 
            {
              Object RESULT = null;
		int ptleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int ptright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object pt = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 prefix_test(pt);
		   enter_propertyElt_stack();
		   RESULT=pt;
              CUP$parser$result = new java_cup.runtime.Symbol(17/*parseResource*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 44: // parseLiteral ::= PARSETYPELIT 
            {
              Object RESULT = null;
		int ptleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int ptright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object pt = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 prefix_test(pt);
		   RESULT=pt; 
              CUP$parser$result = new java_cup.runtime.Symbol(16/*parseLiteral*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 43: // value ::= description2 
            {
              Object RESULT = null;
		int desleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int desright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object des = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = new UpCall(null, des); 
              CUP$parser$result = new java_cup.runtime.Symbol(18/*value*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 42: // value ::= 
            {
              Object RESULT = null;
		 RESULT = generate_UpCall(""); 
              CUP$parser$result = new java_cup.runtime.Symbol(18/*value*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 41: // value ::= STRING 
            {
              Object RESULT = null;
		int strleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int strright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object str = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = generate_UpCall(str); 
              CUP$parser$result = new java_cup.runtime.Symbol(18/*value*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 40: // parsecolattr_list ::= attributes parseCollection attributes 
            {
              Object RESULT = null;
		 attr_ns_prefix_test();
	   enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(23/*parsecolattr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 39: // parseresattr_list ::= attributes parseResource attributes 
            {
              Object RESULT = null;
		 attr_ns_prefix_test();
	   enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(20/*parseresattr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 38: // parselitattr_list ::= attributes parseLiteral attributes 
            {
              Object RESULT = null;
		 attr_ns_prefix_test();
	   enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(19/*parselitattr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 37: // propertyele2 ::= ELSTART QNAME error 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object e = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 emit_error(1, 4, "", "parser", e); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 36: // propertyele2 ::= ELSTART QNAME attributelist ALELEND 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		 propAttr(n);
//		outln("property");
	       one_name(n); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 35: // propertyele2 ::= ELSTART QNAME parsecolattr_list ALEND description ELEND QNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int desleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int desright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object des = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attribut_list_test(n1);
		 propCol(n1,des);
		 two_names(n1,n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 34: // propertyele2 ::= ELSTART QNAME parseresattr_list ALEND propertyele ELEND QNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attribut_list_test(n1);
		 propRes(n1);
		 two_names(n1,n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 33: // propertyele2 ::= ELSTART QNAME parselitattr_list ALEND literal ELEND QNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int litleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int litright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object lit = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attribut_list_test(n1);
		 prop_lit(n1, lit);
		 two_names(n1,n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 32: // propertyele2 ::= ELSTART QNAME attributelist alend value ELEND QNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attribut_list_test(n1);
		 attr_ns_prefix_test();
		 prop_val(n1, val);
		 two_names(n1, n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*propertyele2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 31: // alend ::= ALEND 
            {
              Object RESULT = null;
		 enter_propertyElt_stack(); 
              CUP$parser$result = new java_cup.runtime.Symbol(27/*alend*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 30: // propertyele ::= 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(4/*propertyele*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 29: // propertyele ::= propertyele2 propertyele 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(4/*propertyele*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 28: // attributename ::= RESOURCEATTR 
            {
              Object RESULT = null;
		int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object a = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = a; 
              CUP$parser$result = new java_cup.runtime.Symbol(8/*attributename*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 27: // attributename ::= ATTRIBUTENAME 
            {
              Object RESULT = null;
		int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object a = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = a; 
              CUP$parser$result = new java_cup.runtime.Symbol(8/*attributename*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 26: // attributes ::= error 
            {
              Object RESULT = null;
		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object e = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 emit_error(1, 3, "", "parser", e); 
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 25: // attributes ::= xmlAttr attributes 
            {
              Object RESULT = null;
		 
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 24: // attributes ::= langdekl attributes 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 23: // attributes ::= nsdekl attributes 
            {
              Object RESULT = null;
		 
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 22: // attributes ::= BAGID EQUAL ATTRIBUTEVALUE attributes 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int IDleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int IDright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object ID = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attr_ns_enter(n);
		   enter_attr(n, ID);
	         enter_ID(ID);  
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 21: // attributes ::= IDNAME EQUAL ATTRIBUTEVALUE attributes 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int IDleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int IDright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object ID = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attr_ns_enter(n);
		   enter_attr(n, ID);
		   enter_ID(ID);  
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 20: // attributes ::= attributename EQUAL ATTRIBUTEVALUE attributes 
            {
              Object RESULT = null;
		int attrleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
		int attrright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
		Object attr = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
		int avalleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int avalright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object aval = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 attr_ns_enter(attr);
		   enter_attr(attr, aval); 
              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 19: // attributes ::= 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(6/*attributes*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 18: // attributelist ::= attributes 
            {
              Object RESULT = null;
		 attr_ns_prefix_test();
	   enter_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(9/*attributelist*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 17: // description2 ::= ELSTART QNAME error 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object e = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 emit_error(1, 2, "", "parser", e); 
              CUP$parser$result = new java_cup.runtime.Symbol(3/*description2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 16: // description2 ::= ELSTART QNAME attributelist ALELEND 
            {
              Object RESULT = null;
		int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object n = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		 RESULT = typedNode(n);
		   one_name(n); 
              CUP$parser$result = new java_cup.runtime.Symbol(3/*description2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 15: // description2 ::= ELSTART QNAME attributelist ALEND propertyele ELEND QNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT = typedNode(n1);
		   two_names(n1,n2);
		
              CUP$parser$result = new java_cup.runtime.Symbol(3/*description2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 14: // description ::= description2 
            {
              Object RESULT = null;
		int desleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int desright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object des = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = union(des, null); 
              CUP$parser$result = new java_cup.runtime.Symbol(2/*description*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 13: // description ::= description2 description 
            {
              Object RESULT = null;
		int des2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int des2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object des2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		int desleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int desright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object des = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT = union(des2, des); 
              CUP$parser$result = new java_cup.runtime.Symbol(2/*description*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 12: // element2 ::= rdf 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(26/*element2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 11: // element2 ::= ELSTART XMLQNAME xmldekl_list ALELEND 
            {
              Object RESULT = null;
		 remove_maps(); 
              CUP$parser$result = new java_cup.runtime.Symbol(26/*element2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 10: // element2 ::= ELSTART XMLQNAME xmldekl_list ALEND element ELEND XMLQNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 remove_maps();
	   name_compare(n1, n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(26/*element2*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 9: // element ::= 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(25/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 8: // element ::= element2 element 
            {
              Object RESULT = null;

              CUP$parser$result = new java_cup.runtime.Symbol(25/*element*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 7: // root ::= ELSTART XMLQNAME xmldekl_list ALEND element ELEND XMLQNAME ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 name_compare(n1, n2); 
              CUP$parser$result = new java_cup.runtime.Symbol(24/*root*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 6: // rdf ::= error 
            {
              Object RESULT = null;
		int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object e = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 emit_error(1, 1, "", "parser", e); 
              CUP$parser$result = new java_cup.runtime.Symbol(1/*rdf*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 5: // rdf ::= ELSTART RDFBEGIN xmldekl_list ALEND description ELEND RDFEND ALEND 
            {
              Object RESULT = null;
		int n1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
		int n1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
		Object n1 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
		int n2left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int n2right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object n2 = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 name_compare(n1, n2);
 		   rdf_ns(n1);
		
              CUP$parser$result = new java_cup.runtime.Symbol(1/*rdf*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 4: // begin ::= root 
            {
              Object RESULT = null;
		 RESULT = result();
	     at_eof();
	   
              CUP$parser$result = new java_cup.runtime.Symbol(21/*begin*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 3: // begin ::= XMLSPEC root 
            {
              Object RESULT = null;
		 RESULT = result();
	     at_eof();
	   
              CUP$parser$result = new java_cup.runtime.Symbol(21/*begin*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 2: // begin ::= rdf 
            {
              Object RESULT = null;
		 RESULT = result();
	     at_eof();
	  
              CUP$parser$result = new java_cup.runtime.Symbol(21/*begin*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 1: // $START ::= begin EOF 
            {
              Object RESULT = null;
		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		RESULT = start_val;
              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          /* ACCEPT */
          CUP$parser$parser.done_parsing();
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 0: // begin ::= XMLSPEC rdf 
            {
              Object RESULT = null;
		 RESULT = result();
	     at_eof();
	  
              CUP$parser$result = new java_cup.runtime.Symbol(21/*begin*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /* . . . . . .*/
          default:
            throw new Exception(
               "Invalid action number found in internal parse table");

        }
    }
}

