Related articles |
---|
[9 earlier articles] |
Re: Buffered input for a lexer? sabre@nondot.org (Chris Lattner) (2002-03-31) |
Re: Buffered input for a lexer? joachim_d@gmx.de (Joachim Durchholz) (2002-03-31) |
Re: Buffered input for a lexer? cgweav@aol.com (2002-03-31) |
Re: Buffered input for a lexer? bear@sonic.net (Ray Dillinger) (2002-04-10) |
Re: Buffered input for a lexer? bear@sonic.net (Ray Dillinger) (2002-04-10) |
Re: Buffered input for a lexer? cgweav@aol.com (2002-04-13) |
Re: Buffered input for a lexer? ralph@inputplus.co.uk (2002-04-16) |
Re: Buffered input for a lexer? joachim_d@gmx.de (Joachim Durchholz) (2002-04-16) |
Re: Buffered input for a lexer? cgweav@aol.com (2002-04-17) |
Re: Buffered input for a lexer? rhyde@cs.ucr.edu (Randall Hyde) (2002-04-19) |
Re: Buffered input for a lexer? monnier+comp.compilers/news/@RUM.cs.yale.edu (Stefan Monnier) (2002-04-19) |
Re: Buffered input for a lexer? rhyde@cs.ucr.edu (Randall Hyde) (2002-04-20) |
Re: Buffered input for a lexer? joachim_d@gmx.de (Joachim Durchholz) (2002-04-23) |
[2 later articles] |
From: | ralph@inputplus.co.uk |
Newsgroups: | comp.compilers |
Date: | 16 Apr 2002 00:51:26 -0400 |
Organization: | InputPlus Ltd. |
References: | 02-04-061 02-04-081 |
Keywords: | lex, practice |
Posted-Date: | 16 Apr 2002 00:51:26 EDT |
Hi Clayton,
> > And just incidentally, I have *LOTS* of text files (including
> > source code) on my system that don't end with a newline character.
> > It's not rare at all.
>
> I noticed patch (2.5 IIRC) complaining about something like this when
> I hand-modified a big glibc patch to only get the parts that I
> needed. I clipped one patch just before instead of just after the
> last newline in it, and patch howled about a partial line at the end
> of the patch. [snip]
>
> I've recently seen something else complain about a source file of
> some kind that wasn't terminated by a newline, but I don't
> immediately remember what it was (perl?). [snip]
Unix text files have always had lines *terminated*, not separated,
with newlines, e.g. ASCII character 10.
AFAIK it wasn't until EMACS showed its face that Unix text files
started appearing with an unterminated final `line'.
What editor do you use?
> I actually think it would make sense if an editor's language mode
> just did it automatically (terminate all saved source files with a
> single end-of-line in the native syntax of the host system when you
> save the file).
EMACS does have some option or other to always terminate the last line.
It's a shame it isn't on by default.
Cheers,
Ralph.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.