bhilden@druxj.UUCP (HildenbrandBE) (01/25/85)
I ran across a rather funny problem with YACC and am hoping
that I can get some feedback as to whether this is a bug
or just the breaking of a rule of YACC input syntax.
The problem centers around what follows a left curly brace({).
In the document "YACC-- Yet another Compiler-Compiler" by
Stephen Johnson on page 27 the valid tokens that
are allowed to follow the brace are 'act' which I guess
mean action items.
If my input stream looks like this:
{ action
then YACC generates good relocatable object code.
If my input stream looks like this:
{
action
then the object code generated has negative line numbers, etc.
and fails in the load step.
Having written a parser or two, I am wondering why these two streams
should appear any different to the YACC parser. Certainly it must
be smart enough to ignore white space and EOL characters.
So, have I broken a cardinal sin, or is this YAYACCB ?
Please mail your responses, as I am not a regular reader of
this newsgroup.
Thanks in advance,
Bruce Hildenbrand
ihnp4!druxj!bhilden
p.s.- I hope I've done an adequate job of explaining the problem.