L-values vs. Yacc and Lex for 11/12/84 draft of ANSI C

Jeff Lee jeff at gatech.CSNET
Wed Jun 5 06:52:58 AEST 1985


> There is a deficiency in the Yacc/Lex grammar for the 11/12/84 draft of
> ANSI C posted to mod.sources recently.  It has to do with the concept of
> l-values, namely:  statements such as those shown below which are given
> to the parser do not generate syntax errors, requiring semantic
> interpretation to flag these errors.
> 
> 	main()
> 	{
> 		char *foo;
> 
> 		foo = "hello, world"++;
> 		sizeof(int) = 3;
> 	}
> 
> Now I personally would not like to see increment/decrement operators
> used legitimately on arbitrary r-values, as this would affect the
> semantic meaning of those operators.

The deficiency exists in the original grammar as put out by the ANSI
committee, as well as the two put out since then (January and April 30, 1985).
As soon as I see if an item is actually a bug in the grammar I'll post the
April 30, 1985 grammar to the net. See mod.std.c for further information.
Film at 11.
-- 
Jeff Lee
CSNet:	Jeff @ GATech		ARPA:	Jeff%GATech.CSNet @ CSNet-Relay.ARPA
uucp:	...!{akgua,allegra,hplabs,ihnp4,linus,seismo,ulysses}!gatech!jeff



More information about the Comp.sources.bugs mailing list