anchor.diff:    X-OCCI-Attribute: occi.compute.architechture="x86_64"
     X-OCCI-Attribute: occi.compute.architechture="x86_64", occi.compute.cores=2
   */
  -
  +//TODO output attribute header as JSON
   attribute_header:
     ATTR_HEADER attribute_attrs
   ;
   attribute_attrs:
  -  attribute_attr (',' attribute_attr)*
  +  attribute_attr (COMMA attribute_attr)*
   ;
   
   // ----------------------------------------
  
positive.code:   X-OCCI-Location: http://example.com/compute/123
    X-OCCI-Location: http://example.com/compute/123, http://example.com/compute/123
  */
  
  location_header:
    LOCATION_HEADER location_paths
  ;
  location_paths:
    location_path (',' location_path)*
  ;
  location_path:
    PATH
  
negative.code:       attributes="occi.storage.size occi.storage.state";
        actions="http://schemas.ogf.org/occi/infrastructure/storage/action#resize ...";
  */
  //TODO implement action attribute
  multiple_category_header
    : CATEGORY_HEADER category_header_val (COMMA category_header_val)+
  ;
  category_header returns [String category]
    : CATEGORY_HEADER category_header_val
      {$category = "{\"category\":{" + $category_header_val.category + "}}"; }
  ;
  category_header_val returns [String category]
    : term_attr scheme_attr class_attr (title_attr | rel_attr | location_attr | cat_attributes_attr)*
      {
        $category =
        "\"term\":\"" + $term_attr.term + "\", " +
        "\"scheme\":\"" + $scheme_attr.scheme + "\", " +
        "\"class\":\"" + $class_attr.klass + "\", " +
        "\"title\":\"" + $title_attr.title + "\", "+
        "\"rel\":\"" + $rel_attr.rel + "\", "+
        "\"location\":\"" + $location_attr.location + "\"," +
        "\"attributes\":[" + $cat_attributes_attr.attributes + "]"
      ;}
  ;
  term_attr returns[String term]
    : TOKEN
      {$term = $TOKEN.text;}
  ;
  
  scheme_attr returns[String scheme]
    : CAT_ATTR_SEP SCHEME_ATTR VAL_ASSIGN QUOTE scheme_val QUOTE
      {$scheme = $scheme_val.uri;}
  ;
  scheme_val returns[String uri]
    : URI
      {$uri = $URI.text;}
  ;
  
  class_attr returns[String klass]
    : CAT_ATTR_SEP CLASS_ATTR VAL_ASSIGN QUOTE class_val QUOTE
      {$klass = $class_val.klass;}
  ;
  class_val returns[String klass]
    : CLASS
      {$klass = $CLASS.text;}
  ;
  
  title_attr returns[String title]
    : CAT_ATTR_SEP TITLE_ATTR VAL_ASSIGN QUOTE title_val QUOTE
      {$title = $title_val.title;}
  ;
  title_val returns[String title]
    : TOKEN
      {$title = $TOKEN.text;}
  ;
  
  rel_attr returns[String rel]
    : CAT_ATTR_SEP REL_ATTR VAL_ASSIGN QUOTE rel_val QUOTE
      {$rel = $rel_val.rel;}
  ;
  rel_val returns[String rel]
    : TOKEN
      {$rel = $TOKEN.text;}
  ;
  
  location_attr returns[String location]
    : CAT_ATTR_SEP LOCATION_ATTR VAL_ASSIGN QUOTE location_val QUOTE
      {$location = $location_val.location;}
  
  ;
  location_val returns[String location]
    : TOKEN
      {$location = $TOKEN.text;}
  ;
  
  cat_attributes_attr returns[String attributes]
    : CAT_ATTR_SEP ATTRIBUTES_ATTR VAL_ASSIGN QUOTE attributes_names QUOTE
    {$attributes = $attributes_names.attributes;}
  ;
  attributes_names returns[String attributes]
    : single_attr = attribute_attr_name
      {$attributes = "\"" + $single_attr.attribute_name + "\"";}
  
    | {$attributes="";}
      multi_attr1 = attribute_attr_name
      {$attributes = "\"" + $multi_attr1.attribute_name + "\"";}
  
      ( multi_attr2 = attribute_attr_name
        {$attributes += ", \"" + $multi_attr2.attribute_name + "\"";}
      )+
  ;
  // ----------------------------------------
  // -------------- Link Header -------------
  // ----------------------------------------
  