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