help-flex
[Top][All Lists]
Advanced

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

Re: Locations suggest -- we're stupid


From: Nikos Balkanas
Subject: Re: Locations suggest -- we're stupid
Date: Sun, 6 Jan 2002 20:47:27 +0200

----- Original Message -----
From: Hans Aberg <address@hidden>
To: Nikos Balkanas <address@hidden>
Cc: John W. Millaway <address@hidden>; <address@hidden>
Sent: Friday, January 04, 2002 12:18 PM
Subject: Re: Locations suggest -- we're stupid



> Even if that optimization is not done, with a Flex newline tracking devise
> in hand, one can use that when developing the lexer, and the go in
optimize
> when the scanning grammar is completed.
>

Could do that provided each time you get a warning you go back remove
yylineno option, and provide your own lineno so that printf's still work.
And once you correct the problem, you have to put them back again.
Personally I care a lot about development time. Each time I process ~300 GB
of input. When a problem surfaces, I correct it on 1 file (~1 MB) and then
test it against the whole input. It takes ~5' to run. My input is
generalized, not structured. The patterns never quite mature completely. My
method carries no penalty in either phase. Once I get a warning, I like to
get down and dirty right away. Furthermore it matters if the total pass
takes 5' or 10'. Once the lexer is 100% mature, I automate it with a cron
job and don't care as much if it takes 5' or 10'.

However, it is a good suggestion. Therefore I'll have to ask again: Using
linenumber, the input filename, a literal string (6-7 chars), and even throw
in the state (for error reporting), do we need anything more? I work on
Unix, using vi as the editor. Columns wouldn't help me, the editor doesn't
support them. On the other hand any editor can find a literal string.

One could say that flex should do it automatically for us. Then it is just a
matter of convenience. Over the years what you describe as "hassle" or
Broeker describes as "nightmare", has become a second nature to me, very
transparent and fast. I consider error reporting more important than the
actual code itself. I like to have absolute control over it. If any
"conveniences" are implemented, I would like to see them completely
separated from the main code, so that the rest of us don't get penalized
(performance wise) for it.

Nikos





reply via email to

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