Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compiler Tools Pccts > Token minimum a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 93 of 134
Post > Topic >>

Token minimum and maximum length

by xvvuslfhiibent@[EMAIL PROTECTED] Mar 3, 2005 at 10:32 AM

Howdy there!

I apologize in advance if this question is too simple or has been
answered before. Is it possible to specify minimum and maximum token
length for antlr tokens? For example, how can you restrict a token to
be between 3 and 7 characters long? I've tried using token
"[a-z]\{3,7\}" and "[a-z]{3,7}" in pccts 1.33 to no avail. The only
solution that I see at the moment is looking at zzlextext, but that's
already too late for my application (I'd like to get a misparse
exception after 7th character).

Thank you in advance for any advice or pointers on this problem. Either
Antlr version (1.33 or 2.7.3) is ok.

Sincerely,
Artie
 




 2 Posts in Topic:
Token minimum and maximum length
xvvuslfhiibent@[EMAIL PRO  2005-03-03 10:32:17 
Re: Token minimum and maximum length
Tomasz Babczynski <t.b  2005-03-04 13:39:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 2:16:57 CDT 2008.