OK, filter=true seems to do the magic.
best regards -- Valery A.Khamenya On Mon, Feb 1, 2010 at 11:43 AM, Valery Khamenya <[email protected]> wrote: > Hi Kirby and all, > >> In this case, I'm pretty sure it's because you don't have a lexer rule... > > OK, I see, thank you! > > Let's try this (pure) lexer grammar: > > *************************** > lexer grammar ANTLRLexer; > options { > language=Python; > k=4; > } > INT: 'int'; > ANY: .; > *************************** > > I expect a token stream in output consisting of single characters and 'int'. > For example: 'inint' ==> ['i', 'n', 'int'] > > When I feed lexer with 'int' it's OK. > When I feed lexer with 'inX' it's gives me: > > "line 1:2 mismatched character u'x' expecting 't' " > > Why there is no rollback from INT rule to ANY by appearance of 'X'? > > How to get the expected? (I thought it is solvable on pure lexer level) > > Thanks in advance, > Valery > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
