You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using Proleap COBOL Parser to analyze COBOL files and extract all CALL and PERFORM statements from the code. I have a method that iterates through a list of statements and handles both CALL and PERFORM instructions. Here is my current code:
privateNodeextractNode(NodebaseNode, List<Statement> statements) {
for (Statementstatement : statements) {
// Handling CALLif (statementinstanceofCallStatementcallStatement) {
ValueStmtprogramValueStmt = callStatement.getProgramValueStmt();
if (programValueStmt != null && programValueStmt.getValue() != null) {
baseNode.getCalls().add(programValueStmt.getValue().toString());
}
}
// Handling PERFORMif (statementinstanceofPerformStatementperformStatement) {
PerformProcedureStatementperformProcedureStatement = performStatement.getPerformProcedureStatement();
if (performProcedureStatement != null) {
for (Callcall : performProcedureStatement.getCalls()) {
baseNode.getPerforms().add(call.getName());
}
}
}
// Retrieve all inner statements from the current statement and call extractNode recursively
}
}
I'm looking for a way to retrieve inner statements within each Statement instance to handle nested structures more effectively. Is there a method in Proleap that allows me to access these inner statements? Or is there an approach you would recommend for parsing and extracting all CALL and PERFORM instructions from deeply nested statements?
Thank you for your time and help!
The text was updated successfully, but these errors were encountered:
Hello,
I'm currently using Proleap COBOL Parser to analyze COBOL files and extract all
CALL
andPERFORM
statements from the code. I have a method that iterates through a list of statements and handles bothCALL
andPERFORM
instructions. Here is my current code:I'm looking for a way to retrieve inner statements within each
Statement
instance to handle nested structures more effectively. Is there a method in Proleap that allows me to access these inner statements? Or is there an approach you would recommend for parsing and extracting allCALL
andPERFORM
instructions from deeply nested statements?Thank you for your time and help!
The text was updated successfully, but these errors were encountered: