Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wivax.UUCP Path: utzoo!linus!wivax!mckeeman From: mckeeman@wivax.UUCP Newsgroups: net.lang.c Subject: 2 b lalr(1) Message-ID: <19533@wivax.UUCP> Date: Tue, 22-May-84 12:12:36 EDT Article-I.D.: wivax.19533 Posted: Tue May 22 12:12:36 1984 Date-Received: Wed, 23-May-84 04:16:24 EDT Sender: mckeeman@wivax.UUCP Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 28 > Anyone who is a serious student of programming linguistics, > should realize that a delimiter is neccessary to separate the > expression from the statement in all conditional language-constucts > -- if you want to keep your grammer LALR(1) (almost a given). Curiously enough, LALR(1) does not require a delimiter for most reasonable languages. PLZ/SYS (Snook et al, Springer, 1978) happens to have THEN but allows ' ' ';' ',' TAB CR interchangeably. That is, blank is delimiter enough. What happens is that either the keyword starting the statement, or the pair where an is following is enough to make decisions possible. (I don't know if PLZ/SYS is in fact LALR(1), but I am pretty sure it could be with the usual fiddling around.) Even more interesting, reserved words are not necessary for LALR(1). One can put in a rule ::= IF | THEN | DO ... which will turn the reserved word back into into a grammar and still get the LALR(1) tables in most cases. Now, none of this should be construed as an argument for or against any style of language design or programming. It is just a fact that LALR does not force these decisions on us. /s/ Bill McKeeman.Wang-Inst at CSNet-Relay ...decvax!wivax!mckeeman Wang Institute of Graduate Studies, Tyngsboro, MA 01879