Differentiating between long and quite similar keywords in lexer
0 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Monday, February 20, 2006 04:44 AM

I was trying to implement a lexer for verilog and found keywords like pulsestyle_onevent and pulsestyle_ondetect. I implemented these as literals in the lexer and made k=15 very high. When tried to implement another rule for identifiers
IDENTIFIER: ('a'..'z'|'A'..'Z'|'_')('a'..'z'|'A'..'Z'|'_'|'$')*
It was taking very long time to compile. I want to use the above two keywords and also the identifier rule. Is there any way by which i can implement the above functionality without using very large value of k?

About | Sitemap | Contact