« Return to Thread: Parse part of content (ignore/skip ALL until known tokens are found)

Re: Parse part of content (ignore/skip ALL until known tokens are found)

by ligett :: Rate this Message:

Reply to Author | View in Thread

Hi Chris

Appreciate your response.
That's what I thought.. However I found a work-around - not very graceful and performing I believe but still:

http://www.nabble.com/Newbie-question-td18978334.html#a19008137
and the good resume of this thread here:
http://www.electricsenator.net/2008/08/16/1218875940000.html

Struggling to get this thing work now :)

Regards

J.Chris Findlay wrote:
The way javacc works is that it needs to "understand" everything in the
input, so that leaves 2 choices: - define in some way the random content,
with some switch or other to identify the beginning of the known content,
often by defining a token to indicate the start of the part you want to
keep, and switching lexical states when it's found, and back when it's done,
and another token ~[] to soak up the rest one character at a time.
 - use some other method to extract the known part and hand it off alone to
a javacc parser that only needs to understand that.

 « Return to Thread: Parse part of content (ignore/skip ALL until known tokens are found)