Looking for broken code
Rick Kitts
rkitts at netcom.COM
Thu Mar 21 14:55:05 AEST 1991
I am currently fiddline with YACC and LEX and trying to understand
grammars, etc. As an exercise I have written a recognizer for C
declarations, with plans to expand it to understand all of C. Anyway,
I am looking for code which is syntactically correct, but semantically
flawed. For example the following is syntactically correct when fed through
a naked ANSI C grammar, but it is semantically incorrect:
int a[]();
(An array of functions is illegal I believe)
What I want to do is run this through my little program and see how it
barfs :-). Please, if you can, include a description of what exactly
is wrong with the code. Thanks in advance.
---Rick
rkitts at netcom.com
More information about the Comp.lang.c
mailing list