can I invoke Java functions from Rascal. I want to write RASCAL analyser, but want access CFG nodes by calling a java function. Is this possible in Rascal. To put it simply, can I wrap the existing java application and invoke it from RASCAL
Sure. It works as follows.
IValueFactory)
@javaClass{com.mypackage.MyClass}
java int myFunction(str arg);
package com.mypackage;
public class MyClass {
private final IValueFactor vf;
public MyClass(IValueFactory vf) {
this.vf = vf;
}
IValue myFunction(IString x) {
return vf.integer(-1);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With