XmlAnnotationNodeClasses.grm

// FILE. . . . . /home/hak/ilt/src/ilog/language/syntax/xml/XmlAnnotationNodeClasses.grm
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . 4j4zn71
// STARTED ON. . Sat Apr 12 18:01:09 2008

// Last modified on Fri May 16 17:10:52 2008 by hak

////////////////////////////////////////////////////////////////////////



A $WrapperPath_opt$ stores the sequence of wrappers making up a $WrapperPath$ in an ArrayList called wrapperPath.


%nodeclass WrapperPath_opt
  {
    ArrayList wrapperPath = null;
  }

%nodeclass WrapperPath extends WrapperPath_opt
  {
    // Set wrapperPath to a new list and add to it the XML wrapper
    // (the symbol and its distribution switch):
    void add (String s, boolean b)
      {
	(wrapperPath = new ArrayList()).add(new XmlWrapper(s,b));
      }

    // Set wrapperPath to the specified path, and add to it the XML
    // wrapper (the symbol and its distribution switch):
    void addTo (ArrayList path, String s, boolean b)
      {
	(wrapperPath = path).add(new XmlWrapper(s,b));
      }
  }



A $ChildXmlTree$ has the following fields:
  • cstChildPosition: an int - a CST child position;
  • xmlPath: an IntArrayList - a (possibly null) list of XML subtree positions;
  • hasTerminalValueContent - true indicates terminal value;
  • textInfo - if non-null, an ArrayList of XmlTextInfos giving the arguments of a TEXT special form.


%nodeclass ChildXmlTree
  {
    int cstChildPosition;
    IntArrayList xmlPath = null;    
    boolean hasTerminalValueContent = false;
    ArrayList textInfo = null;
  }



A $XmlChildSpec$ is a $ChildXmlTree$ with the following additional field:
  • wrapperPath, an ArrayList - a (possibly null) list of XmlWrappers.


%nodeclass XmlChildSpec extends ChildXmlTree
  {
    ArrayList wrapperPath = null;
  }



A $XmlTreeRef$ is a $XmlChildSpec$ with the following additional field:
  • attributeName, a String - an attribute name.


%nodeclass XmlTreeRef extends XmlChildSpec
  {
    String attributeName = null;
  }

%nodeclass AttributeName_opt
  {
    String attributeName = null;
  }

%nodeclass AttributeName extends AttributeName_opt
  {
  }

////////////////////////////////////////////////////////////////////////



An $AttributeValue$ is a special case of $XmlTreeRef$. It has a flag hasLiteralValueContent indicating whether it carries a literal value; when this flag is true, then the literal value is in the value field.


%nodeclass AttributeValue extends XmlTreeRef
  {
    boolean hasLiteralValueContent = false;
    String value = null;
    ArrayList textInfo = null;
  }



An $XmlPath_opt$ stores the sequence of numbers making up a $XmlPath$ in an IntArrayList called xmlPath.


%nodeclass XmlPath_opt
  {
    IntArrayList xmlPath = null;
  }

%nodeclass XmlPath extends XmlPath_opt
  {
    // Set xmlPath to a new list and add to it the specififed number.
    void add (int n)
      {
	(xmlPath = new IntArrayList()).add(n);
      }

    // Set xmlPath to the specified path, and add to it the specififed
    // number.
    void addTo (IntArrayList path, int n)
      {
	(xmlPath = path).add(n);
      }
  }

%nodeclass DotOrStar
  {
    boolean isStarred = false;
  }

%nodeclass TextArgument
  {
    XmlTextInfoArg info = null;
  }

%nodeclass TextRef extends TextArgument
  {
  }

%nodeclass TextArguments
  {
    ArrayList textInfo = null;
  }

%nodeclass SpecialForm extends TextArguments
  {
    boolean hasTerminalValueContent = false;
  }

////////////////////////////////////////////////////////////////////////


This file was generated on Thu Mar 25 18:54:18 PDT 2010 from file XmlAnnotationNodeClasses.grm
by the ilog.language.tools.Hilite Java tool written by Hassan Aït-Kaci