Menu

#28 Use of qualified vars (Not working sample code "indexing.cob")

v1.0 (example)
closed-fixed
nobody
None
5
2013-08-09
2013-08-02
No

I'm not sure where the problem is.

Sample at http://opencobol.add1tocobol.com/#does-opencobol-support-isam leads to Line: 168, Char: 45, Token: indexing-record, Message: Not all input was consumed.

Related

Discussion: Missing Support for COBOL 2002 (level 78, EXIT SECTION/PERFORM, length of section names, BASED/ALLOCATE/FREE)

Discussion

  • Simon Sobisch

    Simon Sobisch - 2013-08-08

    The problem was the "qualified" var "splitkey of indexing-record". Fixed that in [r138] by changing dataName to identifier_format2. But the fix is not correct. The attached one is much better.
    I've inspected every occurence of dataName and identifier and replaced them, where necessary. With this patch, Koopa does not look for FUNCTIONs, object references and reference modifications, where not possible.

    Edit: Must be applied after Cobol.kg-ACCEPT.patch

     

    Related

    Commit: [r138]


    Last edit: Simon Sobisch 2013-08-08
  • KrisDS

    KrisDS - 2013-08-08

    I'll try merging your patch tonight.

    Could you list (or point me to a list) where functions, object refs and reference mods are not possible ? Then I'll add unit tests to check that the grammar is indeed not accepting them in these locations.

     
    • Simon Sobisch

      Simon Sobisch - 2013-08-08

      Yay, it's Koopa's Patch week!

      I'd just list everything that I've changed to qualifiedDataName for now. Therefore I suggest to use this as a list (my own tests, the unit-tests and the regression tests are still working).
      It sounds good to have "not allowed" tests, too. You may want to include the test suite of OpenCOBOL which has both "must parse" and "must not parse" unit tests, too, together with lots of samples.

      Simon

      BTW: Don't forget to merge the ACCEPT-Patch before (issue 29), which still has a junit.framework.AssertionFailedError: null at koopa.grammars.cobol.test.AcceptStatementTest.testAcceptStatement_9(AcceptStatementTest.java:92)

       
  • KrisDS

    KrisDS - 2013-08-08

    Patch applied in r140. I added unit tests for every case where you used qualifiedDataName. I also had to do a small fix to the patch, as it no longer allowed FILLER to be used in data descriptors.

     
  • Simon Sobisch

    Simon Sobisch - 2013-08-09
    • summary: Not working sample code "indexing.cob" --> Use of qualified vars (Not working sample code "indexing.cob")
    • status: open --> closed-fixed
     

Log in to post a comment.