[jflex-users] maximum number of rules
The fast lexer generator for Java
Brought to you by:
lsf37,
steve_rowe
From: Yuval O. <yu...@bl...> - 2009-07-15 04:41:27
|
Hello, I recently created a parser to extract domain names from host names, by converting the public suffix list (http://publicsuffix.org) into a JFlex file of about 4,000 rules. There are so many rules, because each country has slightly different conventions (xxx.com vs. xxx.co.uk, etc). Running JFlex on that file never finished, so I ended up having to partition it into multiple JFlex files. It worked out in this case, as I was able to hash on the last few characters of the domain name and pick the appropriate parser. Is there a better general way to deal with that many rules, or is that a limitation we just have to accept? Thanks, Yuval |