Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site uthub.UUCP Path: utzoo!utcsrgv!utai!uthub!thomson From: thomson@uthub.UUCP (Brian Thomson) Newsgroups: net.lang.c Subject: Re: 2 b lalr(1) Message-ID: <164@uthub.UUCP> Date: Wed, 23-May-84 14:05:55 EDT Article-I.D.: uthub.164 Posted: Wed May 23 14:05:55 1984 Date-Received: Wed, 23-May-84 18:41:42 EDT References: <19533@wivax.UUCP> Organization: CSRG, University of Toronto Lines: 20 wivax!mckeeman states: 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. Actually, I believe this would fail in most cases, at least for the IF keyword. If your grammar contains ::= IF THEN .... ::= IF and an may begin with a left parenthesis it will fail to be LALR(1) because of the resulting shift-reduce conflict. 'IF (' is a prefix of a valid procedure call. I don't know of any way to resolve the conflict, do you? -- Brian Thomson, CSRG Univ. of Toronto {linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!uthub!thomson