public class ClawTranslator extends java.lang.Object implements Translator
| Constructor and Description |
|---|
ClawTranslator()
ClawTranslator ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTransformation(XcodeProgram xcodeml,
Transformation t)
Add transformation in the correct group.
|
void |
finalize(XcodeProgram xcodeml)
Perform last tasks before applying transformations.
|
void |
generateAdditionalTransformation(ClawPragma claw,
XcodeProgram xcodeml,
Xnode stmt)
Generate corresponding additional transformation according to optional
clauses given to the directive.
|
void |
generateTransformation(XcodeProgram xcodeml,
Xnode pragma)
Generate transformation according to the pragma.
|
java.util.Map<java.lang.Class,TransformationGroup> |
getGroups()
Get all transformation groups stored in this translator.
|
int |
getNextTransformationCounter()
Get the next extraction counter value.
|
java.lang.Object |
hasElement(Xnode key)
Get a stored element from a previous transformation.
|
boolean |
isHandledPragma(Xnode pragma)
Check if the given pragma can be handled by the current translator.
|
void |
storeElement(Xnode key,
java.lang.Object value)
Store a Xnode from a transformation for a possible usage in another
transformation.
|
public ClawTranslator()
public void generateTransformation(XcodeProgram xcodeml, Xnode pragma) throws IllegalTransformationException, IllegalDirectiveException
TranslatorgenerateTransformation in interface Translatorxcodeml - Current XcodeML unit.pragma - Pragma that can trigger a transformation.IllegalTransformationException - If transformation cannot be
generated.IllegalDirectiveException - If directive is not formatted
correctly.public void finalize(XcodeProgram xcodeml) throws IllegalTransformationException
Translatorfinalize in interface Translatorxcodeml - Current XcodeML unit.IllegalTransformationException - If translation cannot be finalized.public void addTransformation(XcodeProgram xcodeml, Transformation t) throws IllegalTransformationException
addTransformation in interface Translatorxcodeml - Current translation unit.t - Transformation to be added.IllegalTransformationException - If transformation cannot be added.public boolean isHandledPragma(Xnode pragma)
TranslatorisHandledPragma in interface Translatorpragma - Pragma statement node.public void generateAdditionalTransformation(ClawPragma claw, XcodeProgram xcodeml, Xnode stmt) throws IllegalTransformationException
claw - ClawPragma object that tells encapsulates all
information about the current directives and its
clauses.xcodeml - Current XcodeML program.stmt - Statement on which the transformation is attached.IllegalTransformationException - If transformation cannot be
generated.public java.util.Map<java.lang.Class,TransformationGroup> getGroups()
TranslatorgetGroups in interface TranslatorTranslator.getGroups()public int getNextTransformationCounter()
getNextTransformationCounter in interface Translatorpublic java.lang.Object hasElement(Xnode key)
key - Key to use to retrieve the element.public void storeElement(Xnode key, java.lang.Object value)
key - The element acting as a key.value - The element to be stored.