Talk About Network

Google





Programming > Compiler Tools JavaCC > Newbie question
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 554 of 560
Post > Topic >>

Newbie question

by "Kenneth P. Turvey" <kt-usenet@[EMAIL PROTECTED] > Aug 14, 2008 at 08:42 AM

I'm just evaluating using javacc for a project I'm working on and I've 
run into a small problem.  

Here's the token section of the simple parser I'm playing with:

TOKEN : { 
        <HELP_CMD:      "HELP"                                      > 
    |   <GROUP_CMD:     "GROUP"                                     >
    |   <ARTICLE_CMD:   "ARTICLE"                                   >
    |   <POST_CMD:      "POST"                                      >
    |   <MSG_ID:        "<"(["a"-"z","_", ".","@[EMAIL PROTECTED]
"])+">"             >
    |   <GROUP: ["a"-"z"](["a"-"z","."])+["a"-"z"]                  > 
}

The problem is that the quoted dots seem to be treated as any character 
symbols and not a true dot.  I'm not used to this method of specifying 
regular expressions, so I don't really understand what I'm specifying.  
How does one specify a period?  

Is there a simple tutorial for javacc regular expressions somewhere?  

Thanks.





-- 
Kenneth P. Turvey <kt-usenet@[EMAIL PROTECTED]
>
http://www.electricsenator.net

  Necessity is the plea for every infringement of human freedom. It is
  the argument of tyrants; it is the creed of slaves.
        -- William Pitt
 




 4 Posts in Topic:
Newbie question
"Kenneth P. Turvey&q  2008-08-14 08:42:08 
Re: Newbie question
Olaf Steffen <6uhr@[EM  2008-08-14 12:34:47 
Re: Newbie question
"Kenneth P. Turvey&q  2008-08-14 17:21:41 
Re: Newbie question
Olaf Steffen <6uhr@[EM  2008-08-20 00:24:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
localhost-V2008-12-19 Wed Jan 7 11:53:25 PST 2009.