Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.unix Subject: Re: Unix text files Message-ID: <2480@brl-tgr.ARPA> Date: Sun, 27-Oct-85 02:51:35 EST Article-I.D.: brl-tgr.2480 Posted: Sun Oct 27 02:51:35 1985 Date-Received: Tue, 29-Oct-85 01:15:25 EST References: <23@pixel.UUCP> <2235@brl-tgr.ARPA> <2333@flame.warwick.UUCP> <2308@brl-tgr.ARPA> <2339@flame.warwick.UUCP> Organization: Ballistic Research Lab Lines: 31 > "Text consists of an ordered sequence of characters, with lines delimited > by newline characters. Text is normally terminated by a newline. This > newline should be considered to be followed by a (nonexistant) null line. > The null line should not be considered to be part of the text. > "If the last character of the text is not a newline, then consider > the text to be terminated by a newline - null line pair; however, this > newline - null line pair should not be considered to have been part of > the file. > > I *think* that's right... > Kay. Perhaps that is the best interpretation, but it sure is hard to put all that into a formal grammar, whereas the original concept was very simple: file ::= binary_file | text_file binary_file ::= { byte }* byte ::= text_file ::= { text_line }* text_line ::= { text_char }* newline text_char ::= <7-bit ASCII character excluding NUL and newline> newline ::=