Re: flex for windows

rlb@hoekstra-uitgeverij.nl (Richard Bos)
Wed, 09 Jan 2008 07:06:14 GMT

          From comp.compilers

Related articles
[10 earlier articles]
Re: flex for windows dickey@saltmine.radix.net (Thomas Dickey) (2008-01-06)
Re: flex for windows dickey@saltmine.radix.net (Thomas Dickey) (2008-01-06)
Re: flex for windows agdjh@gasjgdjagjdagdgaj.com (Gary R. Van Sickle) (2008-01-06)
Re: flex for windows tprince@computer.org (Tim Prince) (2008-01-06)
Re: flex for windows DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-01-07)
Re: flex for windows cfc@shell01.TheWorld.com (Chris F Clark) (2008-01-07)
Re: flex for windows rlb@hoekstra-uitgeverij.nl (2008-01-09)
Re: flex for windows monnier@iro.umontreal.ca (Stefan Monnier) (2008-01-21)
| List of all articles for this month |

From: rlb@hoekstra-uitgeverij.nl (Richard Bos)
Newsgroups: comp.compilers,comp.lang.c
Date: Wed, 09 Jan 2008 07:06:14 GMT
Organization: Go wash your mouth.
References: 07-12-040 07-12-043 07-12-047 07-12-053 07-12-056 08-01-013 08-01-023 08-01-027
Keywords: lex, Windows
Posted-Date: 09 Jan 2008 15:38:08 EST

Chris F Clark <cfc@shell01.TheWorld.com> wrote:


> Hans-Peter Diettrich <DrDiettrich1@aol.com> writes:
>
> > Gary R. Van Sickle wrote:
> >
> >> Apparently NP-Hard "\r\n" Vs. "\n" EOL Problem".
> >
> > What's the problem?
> >
> > AFAIK a single "\r" is nowhere used for EOL, so it should be possible to
> > skip \r, and treat \n as EOL.
> >
> > DoDi
> > [That's pretty typical, ignore the \r and look for the \n. But this doesn't
> > have much to do with compilers, as opposed to general Windows programming,
> > any more. -John]
>
> Doesn't MacOS use a single \r to represent EOL rather than single \n?


No. MacOS uses a single ASCII CR as EOL, while Unixen use LF and MS
OSes use CRLF. In a file opened as a text stream in C, though, all of
those will be represented in that text stream as '\n'. (And obviously,
they should also be represented as '\n' in any code-reading tool (as
opposed to, e.g., binary editors) written in ISO C.)


Richard



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.