Menu

#14 "not all input was consumed": parsing of (optional) comma

v1.0 (example)
pending
nobody
None
4
2016-08-02
2013-07-30
No

weird but valid code :-) like

01 filler pic x(01).
   88  weirdo value '1', 'A' 'U',.

--> ',' is always optional in COBOL, it doesn't matter if you have none or 20 of them.

I suggest to simply skip all ','

Simon

1 Attachments

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-09-19

    So where should we look for a fix? I guess it's somewhere in the preprocessing where ',' has to be ingnored?

    Simon

     
  • KrisDS

    KrisDS - 2013-09-19

    CobolParser is already filtering those out (line 374) so the parser doesn't have to see them. My guess is that in your example there is something going wrong with the basic tokenization. It's probably treating ',.' as a single token...

    If you play with the log4j properties a bit to expose the tokenizer stages you should be able to verify this assumption.

     
  • KrisDS

    KrisDS - 2016-08-02
    • status: open --> pending
     

Log in to post a comment.