If your parser knows that it's dealing with a statement, you could try
lexical feedback (look up "lexical tie-ins" in the bison docs, and
google "scanner feedback" or "lexical feedback"). The parser sets a flag
to tell the lexer that it's inside a statement, and the lexer then
returns the NL when the flag is set, and discards it otherwise.
I've never had much luck with this, because the lookahead can make it
difficult - the lexer might already have decided what to do before the
parser tells it. Still, might work for you.
-Evan
_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison