PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Line
Date: Friday, 24 Jan 2020, 11:08:17


    > Message Posted By: Unknown
    >
    > The spec says "Cxref should handle line splices correctly (i.e., a
    > backslash followed immediately by a newline is ignored, but line splices
    > do not nest)." Does this mean that two line splices will not occur
    > consecutively?
    >
    > (e.g.
    > sam/
    > ple/
    > text
    >
    > will not occur.)

[I assume that you meant \ (backslash) rather than
/ (slash) above.]

This snippet could be part of a valid C program and
thus could appear in the input to Cxref.
=====

    > I'm not sure what "nesting line splices" means here. ...

Consider the snippet

  sam\\

  ple

(note the empty line between sam\\ and ple).  The second
backslash is followed by a newline, and thus that pair
of characters is treated as a line splice.  After that
line splice is deleted, the result

  sam\
  ple

appears to contain a line splice, but it does not since
the backslash was not ORIGINALLY followed by a newline.

This is what "line splices do not nest" means.

--Stan-
PREV INDEX NEXT