Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmum.UUCP Path: utzoo!watmath!watnot!watmum!gvcormack From: gvcormack@watmum.UUCP (Gordon V. Cormack) Newsgroups: net.lang Subject: Re: Varieties of conditional statement (parsing "if") Message-ID: <296@watmum.UUCP> Date: Fri, 18-Oct-85 08:23:50 EDT Article-I.D.: watmum.296 Posted: Fri Oct 18 08:23:50 1985 Date-Received: Sat, 19-Oct-85 05:59:55 EDT References: <964@vax2.fluke.UUCP> <133@nbires.UUCP> Organization: U of Waterloo, Ontario Lines: 11 > ... discussion of parsing dangling ELSE clauses > In LR parsers, the solution is to indicate which > action is to be taken in the event of a shift-reduce conflict. In LL > parsers, the solution is to indicate which alternative is assumed in the > event of a director-set overlap. Very little complexity is added to the > Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 > ...Simpler is better. Using LR parsers, there is absolutely no need to screw around with shift-reduce conflicts. An LR grammar can easily be written that parses Pascal if statements correctly.