I set the fileName for ANTLR3_INPUT_STREAM and the file name can be printed out when error occurs. But when the tree parser is involved, the name can't be always printed out (print unknown-source instead sometimes).
I checked the implementation of antlr3baserecognizer.c and I find the name is decided by tnode->token. However, as we have tns->istream->streamName, why not use that attribute? This will ensure the name can be printed out no matter what kind of the current token it is. -- Best wishes, Mu Qiao GnuPG fingerprint: 92B1 B0C4 8D14 F8C4 EFA5 3ACC 30B3 0DE4 17B1 57E9 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.
