Module dev.civl.mc

Class IOTransformer

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The code (short name) of this transformer.
    static final String
    The long name of the transformer.
    static final String
    The description of this transformer.

    Fields inherited from class dev.civl.abc.transform.IF.BaseTransformer

    astFactory, code, longName, nodeFactory, shortDescription
  • Constructor Summary

    Constructors
    Constructor
    Description
    IOTransformer(dev.civl.abc.ast.IF.ASTFactory astFactory, CIVLConfiguration config)
    Creates a new instance of IO transformer.
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.civl.abc.ast.IF.AST
    transform(dev.civl.abc.ast.IF.AST ast)
     

    Methods inherited from class dev.civl.abc.transform.IF.BaseTransformer

    getCode, getConfiguration, getShortDescription, newStringLiteralNode, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • IOTransformer

      public IOTransformer(dev.civl.abc.ast.IF.ASTFactory astFactory, CIVLConfiguration config)
      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