negative matching using Smacc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

negative matching using Smacc

Damien Pollet
Hi,

I'm using SmaCC to parse a line-oriented file format. I'm only
interested in some lines that begin with known keywords, and I want to
ignore all other lines without knowing their format.

At the moment I have a scanner rule like this:
File : ((InterestingLine | JunkLine) <newline>)* ;

but how do I define JunkLine to match anything BUT interesting lines?
--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org