help-flex
[Top][All Lists]
Advanced

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

Re: Feature request - keyword expansion


From: John Millaway
Subject: Re: Feature request - keyword expansion
Date: Wed, 31 Jul 2002 16:08:19 -0700 (PDT)

> %%
> keyword  { return KEYWORD; }
> 
> Therefor I would suggest a set of macors like:
> 
> %key(KeyWord,...)             // Keyword
> %lkey(KeyWord,...)    // Lowercase keyword
> %ukey(KeyWord,...)    // Uppercase keyword
> %olkey(KeyWord,...)   // optional lowercase keyword
> %oukey(KeyWord,...)   // optional upercase keyword


To be clear, what you're suggesting is a macro preprocessor for flex. This
brings several questions to mind: Where will the new rules be inserted? In
which start conditions? With what precedence? Why do you want to separately
distinguish uppercase from lowercase keywords? How do you propose we handle
false positives if we generalize the rules to avoid backing up? Example:

%key(foo,bar)
%%
[abfor]+  ; // false positives are fao, boo, bor,...


-John


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

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