help-flex
[Top][All Lists]
Advanced

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

Re: [Flex] Getting the absolute input file position


From: Hans Aberg
Subject: Re: [Flex] Getting the absolute input file position
Date: Fri, 15 Jul 2005 13:07:50 +0200

On 15 Jul 2005, at 03:42, address@hidden 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.

Such that I can fopen, fseek, fread a "context" later on,
after the entire parsing and processing is performed.

Because of buffering, you can't use such functions directly. So there seems to be essentially two methods, first, add a byte count in each rule, and second, check out how %option yylineno is implemented, and tweak the skeleton file for your purposes.

Is there a mailing list for GNU flex?

I think this list is as much Flex there is, but strictly speaking, it isn't distributed under a GNU copyright, but a BSD one.

  Hans Aberg






reply via email to

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