At 19:46 5/12/2008, Kenny Leung wrote: >One of the problems lies in parsing something like this: > > {vids=^vids} > >which means a struct named "vids", which is composed of void * >(^v), int, double, and short. > >After the "{", I need to interpret vids as a single token, and >after the "=", I need to interpret the characters as separate >tokens.
Nope, you don't :) Just treat it as one bigger token at the lexer level, and then split it up at the parser level when creating the AST or output. Much simpler. (There are techniques for doing the split at the lexer level, but for something like this I think it's more complicated than it's worth.) List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/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-interest@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---