Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #62985

Re: Searching online "indent"

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Searching online "indent"
Date 2015-06-04 23:37 +0100
Organization A noiseless patient Spider
Message-ID <876173nlqg.fsf@bsb.me.uk> (permalink)
References (5 earlier) <beautifier-20150604205721@ram.dialup.fu-berlin.de> <mkqgds$kau$1@speranza.aioe.org> <comments-20150604235147@ram.dialup.fu-berlin.de> <5570CAE3.4090108@verizon.net> <white-space-20150605001713@ram.dialup.fu-berlin.de>

Show all headers | View raw


ram@zedat.fu-berlin.de (Stefan Ram) writes:

> James Kuyper <jameskuyper@verizon.net> writes:
>>           two files can have the same sequence of tokens even if they
>>are commented differently. Therefore, you'll need to make appropriate
>>changes to your description of the desired behavior.
>
>   Thanks for the correction!
>
>>Note: the standard considers comments to be white space, rather than
>
>   I know, I treat this topic in each of my beginner's courses and
>   explain that instead of:
>
> - -65
>
>   one also can write
>
> -/**/-65
>
>   but not
>
> --65
>
>   or show this piece of ASCII-art that I created:
>
>
> white space component
>                                                   .-------------.
> | |----.----------------------------------------->| space       |----.--->| |
>        |                                          '-------------'    ^
>        |                                                             |
>        |                                          .-------------.    |
>        '-------------------------------------.--->| line ending |--->'
>        |                                     ^    '-------------'    |
>        |                                     |                       |
>        v                                     |                       |
>       .-.                                    |                       |
>      ( / )                                   |                       |
>       '-'                                    |                       |
>        |                                     |                       |
>        |     .-.                             |                       |
>        '--->( / )---.------------------------'                       |
>        |     '-'    ^                        |                       |
>        |            |   .---------------.    |                       |
>        |            |   | any character |    |                       |
>        |            '---| except of a   |<---'                       |
>        |                | line ending   |                            |
>        |                '---------------'                            |
>        |                                                             |
>        |                .---------------.                            |
>        |                | any character |                            |
>        |            .---| except "*"    |<--------.                  |
>        |            |   | and "/"       |         |                  |
>        |            |   '---------------'         |                  |
>        |     .-.    v                             |                  |
>        '--->( * )---'-----------------------------'                  |
>              '-'    |            ^                ^                  |
>                     |            |                |                  |
>                     |            |                |                  |
>                     .<-----------.                |                  |
>                     |            |                |                  |
>                     |     .-.    |                |                  |
>                     '--->( / )---'   .------------.                  |
>                     |     '-'        |            |                  |
>                     |                |            |                  |
>                     |                v     .-.    |    .-.           |
>                     '----------------'--->( * )---'---( / )----------'
>                                            '-'         '-'

Consider:

int main(void) /\
* comment *\
/
/\
/ comment\
  comment
{
}

but maybe you deal with joined lines at another layer of processing.

-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Searching online "indent" Ian Collins <ian-news@hotmail.com> - 2015-06-04 15:54 +1200
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 07:22 -0700
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 08:55 -0700
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 09:35 -0700
  Re: Searching online "indent" Etienne Prud'homme <e.e.f.prudhomme@gmail.com> - 2015-06-04 12:59 -0400
    Re: Searching online "indent" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-04 19:43 +0100
      Re: Searching online "indent" Etienne <e.e.f.prudhomme@gmail.com> - 2015-06-04 15:09 -0400
      Re: Searching online "indent" James Kuyper <jameskuyper@verizon.net> - 2015-06-04 16:52 -0400
      Re: Searching online "indent" Morris Dovey <mrdovey@iedu.com> - 2015-06-04 16:37 -0500
        Re: Searching online "indent" James Kuyper <jameskuyper@verizon.net> - 2015-06-04 18:02 -0400
          Re: Searching online "indent" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-04 23:37 +0100
  Re: Searching online "indent" Ian Collins <ian-news@hotmail.com> - 2015-06-05 07:23 +1200

csiph-web