bug-bison
[Top][All Lists]
Advanced

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

Re: RFC: "count_chars" function for locations


From: Frank Heckenbach
Subject: Re: RFC: "count_chars" function for locations
Date: Tue, 15 Feb 2022 22:25:31 +0100

Akim Demaille wrote:

> > Then again, the simple form as given in calc++/scanner.ll (also in
> > the manual) has the same issues:
> > 
> >  # define YY_USER_ACTION  loc.columns (yyleng);
> > 
> > Actually, I used something like this in my own code until I had
> > multi-line tokens, when I extended it to support newlines, unaware
> > of these other issues.
> > 
> > You might want to add at least a comment about these issues in this
> > and other examples, in the manual, and in location.cc.
> 
> I'm not sure what and where to write in location.cc.

Perhaps just a pointer to the new manual section, likewise in
examples/c/lexcalc/scan.l and examples/c++/calc++/scanner.ll before
"#define YY_USER_ACTION", just to make users aware that the
definition of "column" might not be obvious (as I wasn't).

> But how about the appended patch?

I think the explanation is fine.

Regards,
Frank



reply via email to

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