java.lang.Object
dev.civl.abc.transform.IF.BaseTransformer
- All Implemented Interfaces:
Transformer
A very basic partial implementation of
Transformer. Implements the
book-keeping methods getCode(), getShortDescription(),
toString(), and provides similar fields. Most implementations of
Transformer can extend this class.-
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the short name of this transformer, e.g., "mpi", or "prune".A brief (one line) description of what this transformer does, suitable for appearing in a help message.newStringLiteralNode(String method, String representation) Produces a newStringLiteralNode.toString()Returns the long name of this transformer, e.g., "MPI Transformer" or "Pruner".Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.civl.abc.transform.IF.Transformer
transform
-
Method Details
-
getCode
Description copied from interface:TransformerReturns the short name of this transformer, e.g., "mpi", or "prune".- Specified by:
getCodein interfaceTransformer- Returns:
- the short name ("code") of this transformer
-
getShortDescription
Description copied from interface:TransformerA brief (one line) description of what this transformer does, suitable for appearing in a help message.- Specified by:
getShortDescriptionin interfaceTransformer- Returns:
- a short description of what this transformer does
-
toString
Description copied from interface:TransformerReturns the long name of this transformer, e.g., "MPI Transformer" or "Pruner". The name is suitable for human consumption.- Specified by:
toStringin interfaceTransformer- Overrides:
toStringin classObject- Returns:
- long name of this transformer
-
newStringLiteralNode
public StringLiteralNode newStringLiteralNode(String method, String representation) throws SyntaxException Description copied from interface:TransformerProduces a newStringLiteralNode.- Specified by:
newStringLiteralNodein interfaceTransformer- Parameters:
method- name of transformer method responsible for producing the new token; used to form theFormationthat will ultimately be used in diagnostic messagerepresentation- the text of the string literal exactly as it would appear in a program source; this must include the surrounding (single or double) quotes- Returns:
- new string literal node
- Throws:
SyntaxException- if therepresentationdoes not conform to the C11 specification of string literals
-