help-flex
[Top][All Lists]
Advanced

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

Defining Rules


From: Valter G. Nogueira Jr.
Subject: Defining Rules
Date: Fri, 12 Sep 2003 14:37:33 -0300

As a newbie, I have a newbie question (please be patient)

I am "writing" a scanner for ASP.

My intention is treat every html line as single token and diferentiate just
VBscript tokens, starting with <%, using the following rules:

%x vbs
%%
"<%" {printf("START VBS");BEGIN(vbs);}
"<%=" {printf("VBS-RESPONSE.WRITE");BEGIN(vbs);}
<vbs>"%>" {printf("END VBS");BEGIN(INITIAL);}
.* {ECHO;}
%%

Rules above result in every line been scanned by .* rule and "<%" rule never
gets in.

Thanks,

Valter





reply via email to

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