Here's the error Error while running client 'parse'.
java.lang.UnsupportedOperationException: No generator found for file: C:\Users\User\Desktop\Slik\gumtree-main\gumtree-main
at com.github.gumtreediff.gen.TreeGenerators.getTree(TreeGenerators.java:57)
at com.github.gumtreediff.gen.TreeGenerators.getTree(TreeGenerators.java:70)
at com.github.gumtreediff.client.ParseClient.getTreeContext(ParseClient.java:63)
at com.github.gumtreediff.client.ParseClient.run(ParseClient.java:54)
at com.github.gumtreediff.client.Run.startClient(Run.java:94)
at com.github.gumtreediff.client.Run.main(Run.java:128)
despite adding the dependency required to my system and restarting it I am failing to run this simple as Trial for an assignment I am working on. Please Help
The code is as follows import com.github.javaparser.StaticJavaParser;
import com.github.javaparser.ast.CompilationUnit;
public class ParseTree{
public static void main(String[] args) throws Exception {
String code = "public class ParseTrees {\n" +
"public static void main(String[] args) {\n" +
"\tString name = \"Kahyata\";\n" +
"\tSystem.out.println(name);\n" +
"}\n" +
"}";
CompilationUnit cu = StaticJavaParser.parse(code);
// Count tokens
countTokens(cu);
// Generate parse tree
// (implementation depends on your desired output format)
System.out.println("Parse Tree (example):");
// ... (your code to print the parse tree)
}
private static void countTokens(CompilationUnit cu) {
// Implement logic to iterate through the AST and count occurrences of different token types
// (e.g., keywords, identifiers, literals, operators)
}
Here's the error Error while running client 'parse'. java.lang.UnsupportedOperationException: No generator found for file: C:\Users\User\Desktop\Slik\gumtree-main\gumtree-main at com.github.gumtreediff.gen.TreeGenerators.getTree(TreeGenerators.java:57) at com.github.gumtreediff.gen.TreeGenerators.getTree(TreeGenerators.java:70) at com.github.gumtreediff.client.ParseClient.getTreeContext(ParseClient.java:63) at com.github.gumtreediff.client.ParseClient.run(ParseClient.java:54) at com.github.gumtreediff.client.Run.startClient(Run.java:94) at com.github.gumtreediff.client.Run.main(Run.java:128)
despite adding the dependency required to my system and restarting it I am failing to run this simple as Trial for an assignment I am working on. Please Help The code is as follows import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.CompilationUnit;
public class ParseTree{
}