Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site arizona.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxl!ihnp4!arizona!budd From: budd@arizona.UUCP (tim budd) Newsgroups: net.lang.st80 Subject: st80 grammar ambiguous Message-ID: <7335@arizona.UUCP> Date: Sat, 14-Jan-84 22:32:50 EST Article-I.D.: arizona.7335 Posted: Sat Jan 14 22:32:50 1984 Date-Received: Sun, 15-Jan-84 20:25:46 EST Organization: CS Dept, U of Arizona, Tucson Lines: 18 Has anybody else noticed that the grammar for smalltalk given in the Goldberg book is ambiguous? The problem is that a message pattern of the keyword type ( (keyword variable)* ) can look an awful lot like the continuation of a previous message. ie, one could write receiver kw1: arg1 kw2: arg2 NextMessage: arg Where NextMessage is the start of the next message description. However, it could also be considered part of the command being given to ``receiver''. This makes writing a parser for ST-80, say using YACC (which is how I discovered this problem) rather difficult. Does anybody know how this problem is avoided in actual systems? --tim budd - university of arizona - {kpno, ucbvax} ! arizona ! budd