help-flex
[Top][All Lists]
Advanced

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

Mystery: Why does yylineno cause backing up tables?


From: John W. Millaway
Subject: Mystery: Why does yylineno cause backing up tables?
Date: Fri, 4 Jan 2002 11:41:03 -0800 (PST)

> So maybe the important question should be: *why* is %%yylineno (claimed 
> to be by flex -p) such a performance penalty?

Because it introduces REJECT code. When you set the option yylineno, flex
behaves as if you had used REJECT in your actions. I don't understand why it
must do this. As far as I can see, there are three places where yylineno must
be adjusted:

1. After a token has been matched.
2. When the input buffer is manipulated via unput, yyless, or yymore.
3. When REJECT is used.

Nowhere should the adjustment of yylineo cause backing up, though. Correct?
Perhaps Paxson could shed some light on this.

-John


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com



reply via email to

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