help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird output of bison (or flex)


From: Tim Van Holder
Subject: Re: Weird output of bison (or flex)
Date: Tue, 6 Jan 2004 08:17:14 +0100

> While the parsing is being done I get weird outputs such as
> <>.<>.<>.<>.<>....<>.<>.
> 
> as much as I could understand, they might be related to 
> reductions/shifts, 
> but I'm really not sure about it - just a hunch "(since the output is 
> different with every input).
> I couldn't find the code which generets these outputs.
> how can I avoid them?
> what do they mean?
> 
> The outputs are printed in stdout.
> I'm using bison 1.35 and 1.28 on LINUX and AIX and it always happens.
> Just one last thing - I'm also using flex, and it might as 
> well be generated 
> from that....

It seems very likely that your flex scanner does not accept
'>', '<' or '.'.  By default, flex echoes any unmatched input
to yyout (usually stdout).
To cover this, place an accept-all rule at the end of your flex rules:

. { /* NOTE: '.', and NOT '*' */
  if (verbose)
    fprintf (stderr, "Unmatched character (%c) in input!\n", *yytext);
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]