Hi!
   I am trying to parse some JSP files and i am trying to change the HTMLParser.jj 
code to accomodate this. As mentioned in the FAQ i created the 3rd comment tags  type 
in the void CommentTag() :, TOKEN :, and <WithinCommentN> TOKEN : sections of 
HTMLParser.jj 
Here is it.

void CommentTag() :

{}

{

(<Comment1> ( <CommentText1> )* <CommentEnd1>)

|

(<Comment2> ( <CommentText2> )* <CommentEnd2>)

|

(<Comment3> ( <CommentText3> )* <CommentEnd3>)

}

and the token part has following:

< Comment3: "<%" > : WithinComment3

and withinComment3 is as follows:

<WithinComment3> TOKEN :

{

< CommentText3: (~[">"])+>

| < CommentEnd3: "%>" > : DEFAULT

}

However I get lexical errors when parsing the jsp file which is :

Parse Aborted: Lexical error at line 2, column 96.  Encountered: ">" (62), after
 : ""
Title:
Summary:

and title and summary are not picked up. ANybody has anyidea whats the mistake i am 
commiting. I do not know the parsing language.....

Anyhelp appreciated!

Thanks!
Pinky



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

Reply via email to