Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!amdcad!lll-crg!seismo!mcvax!boring!jack From: jack@boring.uucp (Jack Jansen) Newsgroups: net.lang.c Subject: Re: C not LALR(1) Message-ID: <6741@boring.UUCP> Date: Sat, 25-Jan-86 14:20:14 EST Article-I.D.: boring.6741 Posted: Sat Jan 25 14:20:14 1986 Date-Received: Thu, 30-Jan-86 01:38:09 EST References: <10200035@ada-uts.UUCP> Reply-To: jack@mcvax.UUCP (Jack Jansen) Organization: AMOEBA project, CWI, Amsterdam Lines: 26 Summary: Of *course* not, its not even unambiguous! Apparently-To: rnews@mcvax This 'not LALR' business isn't that interesting, since the C syntax has a few ambiguities. How about this one: foo(a,b) int a,b; { int *p; p = &b; a = a/*p; return(a); } Simple, eh? Just returns a/b in a difficult way. But, did you notice that the routine isn't finished yet? END OF COMMENT */+1; return(a); } So, now it is. Anyway, all C compilers I've ever tested this on will see the first /* as comment-open (probably somewhere far in the beginning, in the lexical analyzer or thereabouts), but still, it's not really what you'ld like to have in a language..... -- Jack Jansen, jack@mcvax.UUCP The shell is my oyster.