* Re: [Flex] Getting the absolute input file position
[not found] <1121391757.42d7148d9e6ca@mail.encs.concordia.ca>
@ 2005-07-16 4:33 ` Henrik Sorensen
0 siblings, 0 replies; only message in thread
From: Henrik Sorensen @ 2005-07-16 4:33 UTC (permalink / raw)
To: gcc
On Friday 15 July 2005 03.42, f_plouff@cse.concordia.ca wrote:
> I need to figure out how I can augment the generated file to get
> the absolute input file position within two rules:
> start file position...end file position.
In the pl1gcc project, I have implemented token offsets across multiple input
files for the scanner. Don't expect too much help from Flex though. You will
have to code the beancounting yourself.
I had to extend the YYLTYPE structure:
typedef struct pl1ltype
{
int first_file;
int first_line;
int first_column;
int first_offset;
int last_file;
int last_line;
int last_column;
int last_offset;
} pl1ltype;
#define YYLTYPE pl1ltype
pl1gcc.sourceforge.net
hope this helps you
Henri
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-16 4:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1121391757.42d7148d9e6ca@mail.encs.concordia.ca>
2005-07-16 4:33 ` [Flex] Getting the absolute input file position Henrik Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).