[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locations suggest
From: |
John W. Millaway |
Subject: |
Re: Locations suggest |
Date: |
Thu, 3 Jan 2002 12:22:39 -0800 (PST) |
> One way to implement the column number might be to every time a newline
> '\n' is encountered, its file position number is recorded. From that file
> position number and the current file position number, the column number can
> be computed.
That will fail when yyin == stdin. Why not just record the column number
instead?
> It is already possible to have an action executed before any scanning takes
> place, and YY_USER_ACTION can be used to record the location after the
> scanning has been done. Perhaps one should add special YY_LOCATION_BEGIN
> and YY_LOCATION_END macros.
To generalize on this a bit, we need a macro that executes just before a return
from a user action. But this is a big of a fish to fry (detecting a return
statement in actions). Instead, I usually define YY_RETURN, and use that
instead of a normal 'return' statement.
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
- Re: Locations suggest, (continued)
- Re: Locations suggest, Akim Demaille, 2002/01/03
- Re: Locations suggest, John W. Millaway, 2002/01/03
- Re: Locations suggest, Akim Demaille, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07
- Re: Locations suggest, Akim Demaille, 2002/01/07
- Re: Locations suggest, Hans Aberg, 2002/01/07
- Re: Locations suggest, Akim Demaille, 2002/01/09
- Re: Locations suggest, Hans Aberg, 2002/01/09
Re: Locations suggest, Hans Aberg, 2002/01/03
Re: Locations suggest -- we're stupid, John W. Millaway, 2002/01/03
Re: Locations suggest -- we're stupid, Nikos Balkanas, 2002/01/03
Re: Locations suggest -- we're stupid, Hans Aberg, 2002/01/04
Re: Locations suggest -- we're stupid, Hans-Bernhard Broeker, 2002/01/04
Mystery: Why does yylineno cause backing up tables?, John W. Millaway, 2002/01/04
Re: Mystery: Why does yylineno cause backing up tables?, Hans Aberg, 2002/01/04
Re: Mystery: Why does yylineno cause backing up tables?, John W. Millaway, 2002/01/04