uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
136 stars 74 forks source link

Call to unknow data element(s - maybe due to redefine?) #20

Closed Reinhard-Prehofer closed 7 years ago

Reinhard-Prehofer commented 7 years ago

Not sure what the error is about - maybe thefiller redefinesis not recognized? Best refer to the attached sample where in particular the declaration of AUSGABE has been shortened. The original contains approx 15 redefines - because of "periodic groups in Adabas". ISSUE13.CBL.txt

Preprocessing file ISSUE13.CBL.
Parsing file ISSUE13.CBL.
Collecting units in file ISSUE13.CBL.
Analyzing program units of compilation unit ISSUE13.
Analyzing identification divisions of compilation unit ISSUE13.
Analyzing environment divisions of compilation unit ISSUE13.
Analyzing data divisions of compilation unit ISSUE13.
Analyzing procedure divisions of compilation unit ISSUE13.
Analyzing statements of compilation unit ISSUE13.
call to unknown data element ausgabe
call to unknown data element T11-DSTINV0DAT12A
call to unknown data element T11-NAMEDSTINV0DAT12A
call to unknown data element T11-ZAKAINV0DAT12A
call to unknown data element T11-BHWNRINV0DAT12A
call to unknown data element T11-SCHLAOKINV0DAT12A
call to unknown data element T11-BDSTINV0DAT12A
call to unknown data element T11-DEBEKOINV0DAT12A
call to unknown data element T11-ASORTSTINV0DAT12A(2)
call to unknown data element T11-ZLISTENINV0DAT12A(2)
call to unknown data element T11-ORTINV0DAT12A
call to unknown data element T11-STRASSEINV0DAT12A
call to unknown data element T11-ZUFEMINV0DAT12A
call to unknown data element T11-WEDSTINV0DAT12A(1)
call to unknown data element T11-WEDSTINV0DAT12A(2)
call to unknown data element T11-WEDSTINV0DAT12A(3)
call to unknown data element T11-WEDSTINV0DAT12A(4)
call to unknown data element T11-WEDSTINV0DAT12A(5)
call to unknown data element T11-BENKZINV0DAT12A
call to unknown data element T11-ZAKANRINV0DAT12A
call to unknown data element T11-DFUINV0DAT12A
call to unknown data element T11-ANGEWENDETINV0DAT12A(1)
call to unknown data element T11-ANGEWENDETINV0DAT12A(2)
call to unknown data element T11-ANGEWENDETINV0DAT12A(3)
call to unknown data element T11-ANGEWENDETINV0DAT12A(4)
call to unknown data element T11-ANGEWENDETINV0DAT12A(5)
call to unknown data element T11-ANGEWENDETINV0DAT12A(6)
call to unknown data element T11-ANGEWENDETINV0DAT12A(7)
call to unknown data element T11-ABRARTINV0DAT12A
call to unknown data element T11-LIWERTEINV0DAT12A(1)
call to unknown data element T11-LINAMEINV0DAT12A(1)
call to unknown data element T11-LINAMEINV0DAT12A(2)
uwol commented 7 years ago

Correct, this is a bug. The problem was, that qualified data names such as T11-DFU IN V0DATA12 were not resolved, correctly.

I made a fix in 67c146f467cc9955ae10f25e4808effc756774c5 and added a unit test based on the snippet provided by you. Thanks for issuing!