Skip to content

Cobrix can't parse multiple INDEX BY identifiers #435

@yruslan

Description

@yruslan

Describe the bug

Given,

      01  ROOT-GROUP.
          05  FLD   OCCURS 7 TIMES
                    INDEXED BY A1
                               A2.
              10  B1  PIC X(1).

Getting

Syntax error in the copybook at line 5: Invalid input 'A2' at position 5:31
za.co.absa.cobrix.cobol.parser.exceptions.SyntaxErrorException: Syntax error in the copybook at line 5: Invalid input 'A2' at position 5:31
	at za.co.absa.cobrix.cobol.parser.antlr.ThrowErrorStrategy.recover(ANTLRParser.scala:38)
	at za.co.absa.cobrix.cobol.parser.antlr.copybookParser.item(copybookParser.java:3240)
	at za.co.absa.cobrix.cobol.parser.antlr.copybookParser.main(copybookParser.java:216)
	at za.co.absa.cobrix.cobol.parser.antlr.ANTLRParser$.parse(ANTLRParser.scala:82)
	at za.co.absa.cobrix.cobol.parser.CopybookParser$.parseTree(CopybookParser.scala:224)

Expected behaviour

This should be parsed well since index variables are ignored for the purpose of data layout anyway.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions