public interface Translator
Modifier and Type | Method and Description |
---|---|
void |
addTransformation(XcodeProgram xcodeml,
Transformation t)
Add a transformation to the translator.
|
void |
finalize(XcodeProgram xcodeml)
Perform last tasks before applying transformations.
|
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 transformation counter value.
|
boolean |
isHandledPragma(Xnode pragma)
Check if the given pragma can be handled by the current translator.
|
void generateTransformation(XcodeProgram xcodeml, Xnode pragma) throws IllegalDirectiveException, IllegalTransformationException
xcodeml
- Current XcodeML unit.pragma
- Pragma that can trigger a transformation.IllegalDirectiveException
- If directive is not formatted
correctly.IllegalTransformationException
- If transformation cannot be
generated.void addTransformation(XcodeProgram xcodeml, Transformation t) throws IllegalTransformationException
xcodeml
- Current translation unit.t
- Transformation to add.IllegalTransformationException
- If transformation cannot be added.boolean isHandledPragma(Xnode pragma)
pragma
- Pragma statement node.void finalize(XcodeProgram xcodeml) throws IllegalTransformationException
xcodeml
- Current XcodeML unit.IllegalTransformationException
- If translation cannot be finalized.java.util.Map<java.lang.Class,TransformationGroup> getGroups()
int getNextTransformationCounter()