dcsimg
Is inversion broken?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chris_Booth
Posted On:   Friday, December 6, 2002 07:10 AM

I have a lexer specification like WORDCHAR : ~(WSCHAR | NEWLINECHAR) // Why doesn't this work?! ; protected WSCHAR : ' ' | 'f' | ' ' ; protected NEWLINECHAR : ' ' | ' ' ; I don't understand why the lexer-generator says that the subrule cannot be inverted. The documentation says that I can invert subrules of the form (T1|T2|T3...), which appears to match what I want to do. What am I missing? I'm using the Eclipse plugin 2.7.2_03, which I presume is fairly recent.    More>>

I have a lexer specification like

			
WORDCHAR
: ~(WSCHAR | NEWLINECHAR) // Why doesn't this work?!
;

protected
WSCHAR
: ' '
| 'f'
| ' '
;

protected
NEWLINECHAR
: '
'
| '
'
;


I don't understand why the lexer-generator says that the subrule cannot be inverted. The documentation says that I can invert subrules of the form (T1|T2|T3...), which appears to match what I want to do. What am I missing?

I'm using the Eclipse plugin 2.7.2_03, which I presume is fairly recent.

   <<Less
About | Sitemap | Contact