[antlr-interest] TreeParser development: How to build an effective "dont care" rule?
Bryan Ewbank
ewbank at gmail.com
Mon Sep 18 06:06:08 PDT 2006
The rule looks correct; however, I suspect that you have problems where the
rule is used. There must be a rule somewhere else that has one too many
"dontCare" matches in its production.
Perhaps something like a declaration that has an optional initial value?
To help you debug, use the "-trace" option and discover the rule being
processed when the error is detected.
On 9/15/06, luciano mantuaneli <mantu_lists at yahoo.com.br> wrote:
>
> Hi!
> I'm developing a TreeParser, and I wish to know how to create an rule that
> do nothing on matching any token.
> I tried to do this with this rule:
>
> dontCare:
> .
> ;
>
> But, this rule doesn't seems to work properly. Depending on how my
> TreeParser grammar is written, I get the following error message:
>
> <AST>: Mismatched Token: expecting any AST node
>
> My questions:
> 1)My dontCare rule is proper for the task mentioned above?
> 2)Do you know how this error message is related with my dontCare rule?
>
> ------------------------------
> O Yahoo! está de cara nova. Venha conferir <http://br.yahoo.com>!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060918/d0fc6c63/attachment.html
More information about the antlr-interest
mailing list