You could use the filter=true grammar option to discard tokens that don't match anything
On Thu, Jun 30, 2011 at 10:36 PM, Bart Kiers <bki...@gmail.com> wrote: > Can you give an example of your input, and explain what line you want to > ignore? > > Regards, > > Bart. > > > On Thu, Jun 30, 2011 at 10:33 PM, Nilo Roberto C Paim <nilop...@gmail.com > >wrote: > > > Hi all, > > > > I'm trying to parse a text file created by an application. There are > lines > > in this text file that I know perfectly their contents and format, and > > these > > lines are correctly parsed. > > > > Otherwise, there are lines that can be recognized by any syntax I can > think > > about. > > > > When I parse the file with my syntax, I'm getting several occurrences of > > "Mismatched input" and "No viable alternative" on the lines that I can't > > recognize. > > > > What I want is simply throw away these invalid lines, as if them would be > > absent from the text file. For my purposes, these lines are "invisibles". > > > > How can I do that, ignoring the lexer/parser errors? > > > > TIA > > > > Nilo - Brasil > > > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > > Unsubscribe: > > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > 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 il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.