[antlr-interest] "<<" character in HTML -'s PCDATA

Balvinder Singh bals1978 at hotmail.com
Wed May 29 10:13:50 PDT 2002



 Hi Sachin,

  give lookahead of 2 in options for lexer like this :

 class HTMLLexer extends Lexer;
 options{
 k=2;
 }

 balvinder




 ----- Original Message -----
> From: "sachin_sawant10" <sachin_sawant10 at yahoo.com>
> To: <antlr-interest at yahoogroups.com>
> Sent: Wednesday, May 29, 2002 6:53 PM
> Subject: [antlr-interest] "<<" character in HTML -'s PCDATA
>
>
> > I am working with HTML grammer given in antlr examples. I want to
> > include "<<" character in PCDATA token.
> >
> > I changed PCDATA rule to -
> >
> > PCDATA
> > : (
> > options {
> > generateAmbigWarnings=false;
> > }
> > : '\r' '\n' {newline();}
> > | '\r' {newline();}
> > | '\n' {newline();}
> > |       "<<"
> > | ~('<'|'\n'|'\r'|'"'|'>')
> > )+
> > ;
> >
> > but I get "lexical nondeterminism" errors.
> >
> > How do I solve this problem?
> >
> > Regards
> >
> > Sachin
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
>
>

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list