Eagle Legacy Modernization, LLC

IBMASM Grammar

Main program: IBMASM_Program

 Count  Terminals:
377 IBMASM_Comment: Comment
909 IBMASM_EndOfLine: End of line
234 IBMASM_Label: An identifier
235 IBMASM_Label_Definition: An identifier
147 IBMASM_Literal: A string enclosed in quotes
190 IBMASM_Number: A number
241 IBMASM_Register: An identifier
258 IBMASM_Remark: IBMASM remark
1,593 IBMASM_Spaces: IBMASM spaces
 Count  Statistics(*) Tokens:
97 92% all all all all all 6% IBMASM_DC_Instruction: [IBMASM_Label_Definition] IBMASM_Spaces "DC" IBMASM_Spaces IBMASM_DC_Value IBMASM_Spaces [IBMASM_Remark]
97 (none | 96% | 4%) |   IBMASM_DC_Value: (IBMASM_DC_Address | IBMASM_DC_Length | IBMASM_DC_Literal)
    |   |   IBMASM_DC_Address: "A" '(' IBMASM_Address ')'
93 6% all all all |   |   IBMASM_DC_Length: [IBMASM_Number] ("CL"|"XL") IBMASM_Number IBMASM_Literal
4 all all |   |   IBMASM_DC_Literal: ("B"|"C"|"E"|"F"|"G"|"H"|"P"|"X") IBMASM_Literal
7 none all all all all all 71% IBMASM_DS_Instruction: [IBMASM_Label_Definition] IBMASM_Spaces "DS" IBMASM_Spaces IBMASM_DS_Value IBMASM_Spaces [IBMASM_Remark]
7 (all) |   IBMASM_DS_Value: (IBMASM_DS_storage)
7 all all |   |   IBMASM_DS_storage: [IBMASM_Number] ("F")
1 all IBMASM_CSECT_Directive: "CSECT"
    IBMASM_EJECT_Directive: "EJECT"
1 all IBMASM_END_Directive: "END"
143 all all all IBMASM_EQU_Directive: "EQU" IBMASM_Spaces IBMASM_EQU_What
143 (78% | 22%) |   IBMASM_EQU_What: ('*' | IBMASM_Immediate)
1 all IBMASM_LTORG_Directive: "LTORG"
1 all all all all all IBMASM_USING_Directive: "USING" IBMASM_Spaces '*' ',' IBMASM_Register
1 all all all IBMASM_Format_I: ("SVC") IBMASM_Spaces IBMASM_Immediate
7 all all all IBMASM_Format_R: ("BR"|"SPM") IBMASM_Spaces IBMASM_Register
8 all all all all all IBMASM_Format_RI: ("SLA"|"SLL"|"SLDA"|"SLDL"|"SRA"|"SRL"|"SRDA"|"SRDL") IBMASM_Spaces IBMASM_Register ',' IBMASM_Immediate
31 all all all all all IBMASM_Format_RR: ("ALR"|"AR"|"ADR"|"AER"|"CLR"|"CR"|"CDR"|"CER"|"DR"|"DDR"|"DER"|"HDR"|"HER"|"LCR"|"LCDR"|"LCER"|"LNR"|"LNDR"|"LNER"|"LPR"|"LPDR"|"LPER"|"LR"|"LDR"|"LER"|"LTR"|"LTDR"|"LTER"|"MR"|"MDR"|"MER"|"NR"|"OR"|"SLR"|"SR"|"SDR"|"SER"|"XR"|"BALR"|"BCTR"|"BCR"|"ISK"|"SPM"|"SSK"|"BASR"|"CLCL"|"MVCL") IBMASM_Spaces IBMASM_Register ',' IBMASM_Register
9 all all all all all all all IBMASM_Format_RRS: ("BXH"|"BXLE"|"HIO"|"LPSW"|"LM"|"RDD"|"SIO"|"SSM"|"STM"|"TCH"|"TIO"|"TS"|"WRD"|"CDS"|"CLM"|"CS") IBMASM_Spaces IBMASM_Register ',' IBMASM_Register ',' IBMASM_Address
12 all all all all all all all IBMASM_Format_RSS: ("ICM"|"STCM") IBMASM_Spaces IBMASM_Register ',' IBMASM_Address ',' IBMASM_Address
133 all all all all all IBMASM_Format_RX: ("A"|"AH"|"AD"|"AE"|"AL"|"C"|"CH"|"CD"|"CE"|"CL"|"D"|"DD"|"DE"|"L"|"LH"|"LD"|"LE"|"M"|"MH"|"MD"|"ME"|"N"|"O"|"S"|"SH"|"SD"|"SE"|"SL"|"ST"|"STH"|"STD"|"STE"|"X"|"BAL"|"BC"|"BCT"|"CVB"|"CVD"|"EX"|"IC"|"LA"|"STC"|"BAS") IBMASM_Spaces IBMASM_Register ',' IBMASM_Address
22 all all all IBMASM_Format_S: ("B"|"BE"|"BNE"|"BNH"|"BNL"|"NOP"|"STCK") IBMASM_Spaces IBMASM_Address
10 all all all all all IBMASM_Format_SI: ("CLI"|"MVI"|"NI"|"OI"|"TM"|"XI") IBMASM_Spaces IBMASM_Address ',' IBMASM_Immediate
1 all all all all all all all IBMASM_Format_SII: ("SRP") IBMASM_Spaces IBMASM_Address ',' IBMASM_Immediate ',' IBMASM_Immediate
46 all all all all all IBMASM_Format_SS: ("AP"|"CLC"|"CP"|"DP"|"ED"|"EDMK"|"MP"|"MVC"|"MVN"|"MVO"|"MVZ"|"NC"|"OC"|"PACK"|"SP"|"TR"|"TRT"|"UNPK"|"XC"|"ZAP"|"MVCIN") IBMASM_Spaces IBMASM_Address ',' IBMASM_Address
293 all 8% 4% IBMASM_Address: IBMASM_Label_or_Star [IBMASM_AddressOffset] [IBMASM_AddressSize]
24 all all |   IBMASM_AddressOffset: '+' IBMASM_Number
11 all all all |   IBMASM_AddressSize: '(' IBMASM_Number ')'
293 (6% | 80% | 10% | 4%) |   IBMASM_Label_or_Star: (IBMASM_Address_Equals | IBMASM_Label | IBMASM_Number | '*')
18 all all all |   |   IBMASM_Address_Equals: '=' "X" IBMASM_Literal
147 98% all all all 1% IBMASM_Directive: [IBMASM_Label_Definition] IBMASM_Spaces IBMASM_Direct [IBMASM_Spaces] [IBMASM_Remark]
147 (1% | none | 1% | 97% | 1% | 1%) |   IBMASM_Direct: (IBMASM_CSECT_Directive | IBMASM_EJECT_Directive | IBMASM_END_Directive | IBMASM_EQU_Directive | IBMASM_LTORG_Directive | IBMASM_USING_Directive)
53 (60% | 38% | 2%) IBMASM_Immediate: (IBMASM_Immediate_Data | IBMASM_Number | IBMASM_Address)
32 all all |   IBMASM_Immediate_Data: ("C"|"X") IBMASM_Literal
280 1% all all all 88% IBMASM_Instruction: [IBMASM_Label_Definition] IBMASM_Spaces IBMASM_Instr [IBMASM_Spaces] [IBMASM_Remark]
280 (0% | 3% | 3% | 11% | 3% | 4% | 48% | 8% | 4% | 0% | 16%) |   IBMASM_Instr: (IBMASM_Format_I | IBMASM_Format_R | IBMASM_Format_RI | IBMASM_Format_RR | IBMASM_Format_RRS | IBMASM_Format_RSS | IBMASM_Format_RX | IBMASM_Format_S | IBMASM_Format_SI | IBMASM_Format_SII | IBMASM_Format_SS)
1 (all) IBMASM_Macro: (IBMASM_WTO_Macro)
1 909.00 IBMASM_Program: IBMASM_Line*
909 all all |   IBMASM_Line: IBMASM_LineContents IBMASM_EndOfLine
909 (41% | 31% | 16% | 0% | 11% | 1%) |   IBMASM_LineContents: (IBMASM_Comment | IBMASM_Instruction | IBMASM_Directive | IBMASM_Macro | IBMASM_DC_Instruction | IBMASM_DS_Instruction)
1 all all all all all none IBMASM_WTO_Macro: IBMASM_Spaces "WTO" IBMASM_Spaces IBMASM_WTO_Value IBMASM_Spaces [IBMASM_Remark]
1 (all) |   IBMASM_WTO_Value: (IBMASM_WTO_E)
1 all all all all all all all |   |   IBMASM_WTO_E: "MF" '=' '(' "E" ',' IBMASM_Address ')'

Terminals = 9 (instances=4,184)
Tokens = 44 (instances=4,283)

(*) Statistics are shown in the same order as the Tokens.
Percentages are rounded; 'all' and 'none' mean 100% and 0% before rounding.
For lists, it shows the average number of occurrences, excluding empty lists.