help-flex
[Top][All Lists]
Advanced

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

Re: Defining Rules


From: Tim Van Holder
Subject: Re: Defining Rules
Date: Sat, 13 Sep 2003 18:27:16 +0200

Well you could try something like:

"<"[^%/>][^>/]*">" return HTML_OPEN_TAG;
"<"[^%/>][^>/]*"/>" return HTML_OPEN_CLOSE_TAG;
"</"[^>]*">" return HTML_CLOSE_TAG;

"<>" return EMPTY_TAG;
"</>" return EMPTY_TAG;

"<%=" { BEGIN SCRIPT; ... }
"<%" { BEGIN SCRIPT; ... }

<SCRIPT>{

  ...

 "%>" { BEGIN INITIAL; }

}

[^<]* return TAG_CONTENT;

Now every non-ASP tag is eaten (by the first 5 rules),
the start of ASP tags is detected, and everything else
is eaten as a single TAG_CONTENT token.

Hope this helps.






reply via email to

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