Yes, as it is designed so that instead of overloading you basically change the default function pointers to point to something else (which in a sense exactly is what overloading does).
E.g. if you want to install your own error handler for the lexer you set the pointer to point to another func: ... lxr = MyLexerNew(input) lxr->pLexer->rec->reportError = MyReportLexError; ... I would imagine a similar thing can be done with the emitter (although I haven't tried that) Thank you and kind regards, Anders Anders Karlsson | Staff SE II | Sybase Inc, Singapore | ( +65 6571 3125 | * [email protected] -- The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. -- E.W. Dijkstra "Billy O'Neal" <billy.on...@gmai l.com> To Sent by: [email protected] <antlr-interest-b cc [email protected]> Subject [antlr-interest] How can I emit 07/22/2010 10:04 multiple tokens in a lexer rule, AM using the C target? There only seems to be documentation on how to do this using targets with object oriented languages, which merely subclass the `emit` method and wrap a buffer around it. This becomes a problem for the C target of course because A. there are no virtual methods, and B. there is no subclassing, and C. there is no (at least that I can find) `emit` method. Is there a way of accomplishing this with the C target? Billy3 -------------------------------------------------------------- Intern - PreEmptive Solutions, LLC Malware Response Instructor - BleepingComputer.com Analyst, Security Team - TechSupportForum.com 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 [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.
