01 var-4-1 pic x(01).
88 4-1 value '1'.
Definition for COBOL words can be found in FCD 20xx page 67
Discussion: Missing Support for COBOL 2002 (level 78, EXIT SECTION/PERFORM, length of section names, BASED/ALLOCATE/FREE)
Where is the definition of cobolWord (= where to fix)?
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.
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?
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?
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.
pure numbers aren't allowed in COBOL, you can close both tickets
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.