use of org.abs_models.common.NotImplementedYetException in project abstools by abstools.
the class ABSTestRunnerCompiler method main.
public static void main(final String... args) {
try {
Absc arguments = Absc.parseArgs(args);
new ABSTestRunnerCompiler().compile(arguments);
} catch (NotImplementedYetException e) {
System.err.println(e.getMessage());
System.exit(1);
} catch (Exception e) {
System.err.println("An error occurred during compilation:\n" + e.getMessage());
// FIXME: switch doesn't work.
if (Arrays.asList(args).contains("-debug")) {
e.printStackTrace();
}
System.exit(1);
}
}
use of org.abs_models.common.NotImplementedYetException in project abstools by abstools.
the class JavaGeneratorHelper method generateBuiltInFnApp.
public static void generateBuiltInFnApp(PrintStream stream, FnApp app) {
FunctionDecl d = (FunctionDecl) app.getDecl();
String name = builtInFunctionJavaName(d.getName());
if (name == null) {
throw new NotImplementedYetException(app, "The built in function '" + d.getName() + "' is not implemented in the Java backend.");
}
// if builtin function returns a non-builtin type, cast the returned value to that type
boolean returnsGeneratedDataType = !JavaBackend.isBuiltinDataType(app.getType());
if (returnsGeneratedDataType)
stream.print("((" + JavaBackend.getQualifiedString(app.getType()) + ")");
stream.print(ABSBuiltInFunctions.class.getName() + "." + name);
String firstArgs = null;
if (Constants.isFunctionalBreakPointFunctionName(d.getModuleDecl().getName() + "." + name))
firstArgs = generateFunctionalBreakPointArgs(app);
generateArgs(stream, firstArgs, app.getParams(), d.getTypes());
if (returnsGeneratedDataType)
stream.print(")");
}
Aggregations