in reply to Re^2: PRD parser problem: How to skip C comments when parsing
in thread PRD parser problem: How to skip C comments when parsing

Did you forget to remove <skip: /\/\/.*\n/> from Prize?

You'll still get an error, though, because your data is invalid based on your definition of Prize. You've previously indicated or implied that the Prize is the rest of the line. You have changed you definition of Prize without adjusting your grammar to compensate. You probably want something like:

Prize: /(?:(?!\n|\/\*|\/\/).)*/

Replies are listed 'Best First'.
Re^4: PRD parser problem: How to skip C comments when parsing
by Hanken (Acolyte) on Jun 10, 2008 at 08:40 UTC
    Hi, ikegami, Thanks for you answer! I replied this post serveral times but it's not showed out along this post. I don't know why ...
    can your fix deal with mutiple lines comments, like the 3rd line of my example?
      Yes. "." matches newlines when the "s" modifier is used.