#24 Parsing: Numeric-Only COBOL words are not supported

v1.0 (example)
closed-fixed
nobody
None
4
2016-07-11
2013-08-02
No

Sample

   01 var-4-1 pic x(01).
     88 4-1 value '1'.

Definition for COBOL words can be found in FCD 20xx page 67

Related

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

Discussion

  • Simon Sobisch

    Simon Sobisch - 2013-08-07

    Where is the definition of cobolWord (= where to fix)?

     
  • KrisDS

    KrisDS - 2013-08-07

    You can find it in Cobol.kg-usercode.

    The usercode file contains some extra code which gets injected into the final parser. I use it to cover the really low-level cases which reside somewhere between parsing and lexing. The definition of cobolWord is one of those.

     
  • Simon Sobisch

    Simon Sobisch - 2013-09-19

    For solving this issue and #30 I've changed grammar\koopa\grammars\cobolPreprocessing\CobolPreprocessing.kg-usercode and grammar\koopa\grammars\cobol\Cobol.kg-usercode, but instead of fixing these issues the change breaks the parsing completely.

    Please have a look at this, changed files attached.
    BTW: Do we really need to have this stuff two times?

    Simon

     
    Last edit: Simon Sobisch 2013-09-19
  • Simon Sobisch

    Simon Sobisch - 2016-07-11

    The patch is old - can you please recheck this and either close both issues or have a look at the provided fix and integrate it if still necessary?

     
  • KrisDS

    KrisDS - 2016-07-11

    Hey Simon,

    Koopa should be allowing cobol words like "4-1". It's just rejecting pure numbers. There is a test for this in LowLevel.stage. I have tested this for issue 30, and will push the test to SVN in a moment.

    Do you have some cases where it is still failing ? If so please share, and I'll take a look. Otherwise I'll close this ticket as well.

    Kris

     
    • Simon Sobisch

      Simon Sobisch - 2016-07-11

      pure numbers aren't allowed in COBOL, you can close both tickets

       
  • KrisDS

    KrisDS - 2016-07-11
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks