java.lang.Object
dev.civl.abc.transform.IF.BaseTransformer
dev.civl.mc.transform.IF.IOTransformer
- All Implemented Interfaces:
dev.civl.abc.transform.IF.Transformer
public class IOTransformer
extends dev.civl.abc.transform.IF.BaseTransformer
The IO transformer transforms
- all function calls printf(...) into frpintf(stdout, ...)
- all function calls scanf(...) into fscanf(stdin, ...)
- all function calls fopen(...) into $fopen(...)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe code (short name) of this transformer.static final StringThe long name of the transformer.static final StringThe description of this transformer.Fields inherited from class dev.civl.abc.transform.IF.BaseTransformer
astFactory, code, longName, nodeFactory, shortDescription -
Constructor Summary
ConstructorsConstructorDescriptionIOTransformer(dev.civl.abc.ast.IF.ASTFactory astFactory, CIVLConfiguration config) Creates a new instance of IO transformer. -
Method Summary
Methods inherited from class dev.civl.abc.transform.IF.BaseTransformer
getCode, getConfiguration, getShortDescription, newStringLiteralNode, toString
-
Field Details
-
CODE
The code (short name) of this transformer.- See Also:
-
LONG_NAME
The long name of the transformer.- See Also:
-
SHORT_DESCRIPTION
The description of this transformer.- See Also:
-
-
Constructor Details
-
IOTransformer
Creates a new instance of IO transformer.- Parameters:
astFactory- The AST factory to be used.config- The CIVL configuration.inputVariables- The input variables specified from command line.
-
-
Method Details
-
transform
public dev.civl.abc.ast.IF.AST transform(dev.civl.abc.ast.IF.AST ast) throws dev.civl.abc.token.IF.SyntaxException - Throws:
dev.civl.abc.token.IF.SyntaxException
-