Menu

#12 "not all input was consumed": string concatenation with & (2002-Standard)

v1.0 (example)
closed-fixed
nobody
None
5
2013-09-13
2013-07-30
No

Related

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

Discussion

  • Luis R.

    Luis R. - 2013-09-04

    X"" (alphanumeric hexadecimals) and NX"" (national alphanumeric hexadecimals) type strings can be concatenated with & as well. I've already made some changes to the tokenizer and grammar so they should count as string literals.

     
  • KrisDS

    KrisDS - 2013-09-06

    [r150] has initial support for concatenation expressions. It is based of what I found in the FCD documentation.

    Needs more testing, but already seems to improve the situation quite a bit.

     

    Related

    Commit: [r150]

  • Luis R.

    Luis R. - 2013-09-06

    Yes, much better! I still found one case where the parser failed:

    05         pic x(30)       value "Resident Address" & CRLF.
    
     
  • KrisDS

    KrisDS - 2013-09-08

    Is CRLF a special keyword, or just an ordinary data item ?

     
  • Luis R.

    Luis R. - 2013-09-08

    CRLF is a level-78 constant in the above line.

    Also found this (X"" alphanumeric hexadecimals are concatenateable):

               call staticWINAPI RegisterEventSource
                  using by value     0 size 4
                        by reference EVENT-NAME & x"00"
                  returning ws-event-handle
               end-call
    
     
  • KrisDS

    KrisDS - 2013-09-10

    OK, I updated the logic a bit more. It now covers (and tests) the above cases you mentioned.

    Any more cases you see which need fixing, or can we close this for now ?

     
  • Luis R.

    Luis R. - 2013-09-13

    Couldn't find any others, feel free to close this.

     
  • KrisDS

    KrisDS - 2013-09-13
    • status: open --> closed-fixed
     

Log in to post a comment.