Parent: #2516
Language: High Level Assembler (HLASM) / z/Architecture Assembly
Extensions: .asm, .mac
Lexical Family: positional_anchored (Comments are strictly * in column 1, or .* for macros).
Scoping Situation
HLASM powers CICS User Exits and high-performance mainframe routines.
🚨 Critical Extension Conflict: We currently map .asm to the assembly profile (which targets x86/ARM and expects ; line comments). We must think carefully about resolving this conflict.
- Action Required: We need to use
discriminators in the hlasm profile (e.g., [".cbl", ".jcl", ".bms"]) so the detector routes .asm files to hlasm when in a mainframe repo context.
We need code that covers:
- x (Topology):
func_start targeting CSECT (Control Section) and DSECT (Dummy Section).
- y (CICS/System Bridges):
ipc_rpc_bridges capturing CICS macro calls like DFHEIENT (CICS entry) and DFHEIRET (CICS return).
- z (Macros):
macros capturing MACRO and MEND definitions.
Implementation Requirements
- Follow
how_to_add_a_language.md using the positional_anchored lexical family.
- Implement the extension conflict resolution for
.asm.
- Write
tests/extraction/languages/test_hlasm_strict.py ensuring column-aware parsing doesn't ReDoS on long macros.
Parent: #2516
Language: High Level Assembler (HLASM) / z/Architecture Assembly
Extensions:
.asm,.macLexical Family:
positional_anchored(Comments are strictly*in column 1, or.*for macros).Scoping Situation
HLASM powers CICS User Exits and high-performance mainframe routines.
🚨 Critical Extension Conflict: We currently map
.asmto theassemblyprofile (which targets x86/ARM and expects;line comments). We must think carefully about resolving this conflict.discriminatorsin thehlasmprofile (e.g.,[".cbl", ".jcl", ".bms"]) so the detector routes.asmfiles tohlasmwhen in a mainframe repo context.We need code that covers:
func_starttargetingCSECT(Control Section) andDSECT(Dummy Section).ipc_rpc_bridgescapturing CICS macro calls likeDFHEIENT(CICS entry) andDFHEIRET(CICS return).macroscapturingMACROandMENDdefinitions.Implementation Requirements
how_to_add_a_language.mdusing thepositional_anchoredlexical family..asm.tests/extraction/languages/test_hlasm_strict.pyensuring column-aware parsing doesn't ReDoS on long macros.