/** * COBOL Processor * * Standalone regex-based processor for COBOL and JCL files. * Follows the markdown-processor.ts pattern: takes (graph, files, allPathSet), * does its own extraction, and writes directly to the graph. * * Pipeline: * 1. Separate programs from copybooks * 2. Build copybook map (name -> content) * 3. For each program: expand COPY statements, then run regex extraction * 4. Map CobolRegexResults to graph nodes and relationships * 5. Optionally process JCL files for job-step cross-references */ import type { KnowledgeGraph } from '../graph/types.js'; interface CobolFile { path: string; content: string; } export interface CobolProcessResult { programs: number; paragraphs: number; sections: number; dataItems: number; calls: number; copies: number; execSqlBlocks: number; execCicsBlocks: number; entryPoints: number; moves: number; fileDeclarations: number; jclJobs: number; jclSteps: number; sqlIncludes: number; execDliBlocks: number; declaratives: number; sets: number; inspects: number; initializes: number; } /** Returns true if the file is a COBOL or copybook file. */ export declare function isCobolFile(filePath: string): boolean; /** Returns true if the file is a JCL file. */ export declare function isJclFile(filePath: string): boolean; /** * Process COBOL and JCL files into the knowledge graph. * * @param graph - The in-memory knowledge graph * @param files - Array of { path, content } for COBOL/JCL files * @param allPathSet - Set of all file paths in the repository * @returns Summary of what was extracted */ export declare const processCobol: (graph: KnowledgeGraph, files: CobolFile[], allPathSet: ReadonlySet) => CobolProcessResult; export {};