package x2x.translator.pragma;

import java.util.ArrayList;

public class CLAWmapping {

  private int _mappedDimension = 0;
  private ArrayList<String> _mappedVariables = null;
  private ArrayList<String> _mappingVariables = null;


  public CLAWmapping(String pragmaClause){

  }

  public int getMappedDimension(){
    return _mappedDimension;
  }

}

@@ -230,57 +230,776 @@
 l;%0A%0A
-%0A  public CLAWmapping(String pragmaClause)%7B%0A%0A  %7D%0A
+  /**%0A   * loop-extract mapping representation%0A   * @param mappingClause inner part of the mapping clause like%0A   * var_list:mapping_list%0A   */%0A  public CLAWmapping(String mappingClause)%7B%0A    String%5B%5D parts = mappingClause.split(%22:%22);%0A    if(parts.length != 2) %7B%0A      // TODO throw exception mappingClause is wrong%0A    %7D%0A    String%5B%5D vars = parts%5B0%5D.split(%22,%22);%0A    String%5B%5D mappings = parts%5B1%5D.split(%22,%22);%0A    if(vars.length == 0 %7C%7C mappings.length == 0)%7B%0A      // TODO throw exception mappingClause is wrong%0A    %7D%0A    for(String var : vars)%7B%0A      _mappedVariables.add(var);%0A    %7D%0A    for(String mapping : mappings)%7B%0A      _mappedVariables.add(mapping);%0A    %7D%0A    _mappedDimension = _mappingVariables.size();%0A  %7D%0A%0A  /**%0A   * @return the dimension to be mapped%0A   */
 %0A  p

Read mapping clause