Piggybacking on a recent post about import issues, I'm having trouble understanding how everything fits together.
>From the Wiki, I've figured out that lexer grammars can only import lexer grammars, parser grammars can only import parser grammars, and combined grammars can only import lexer or parser grammars, but not combined grammars. If I read this correctly, you can only have a single combined grammar in any grammar you write that imports other grammars and it has to be *the* grammar that imports all the other grammars. Is that correct? Is it also the case that a tokens section is only allowed in a combined grammar? I know it's not allowed in a lexer grammar, but it doesn't seem like it would make sense at all in a parser grammar, so then there can only be one tokens section in any grammar that consists of more than a single file. Again, is that correct? Given these constraints, can somebody provide a decent heuristic for how to break up grammars? I've got a bunch of pieces that need to fit together, but given the constraints on putting them together, I'm not sure where to start. I have some rules that combine parsing with lexing and these can only go in the grammar that imports everything else, but they don't logically belong there. Am I missing something basic here, or is the grammar inheritance system a work in progress that's still a bit too picky to be as useful as it could be? Todd 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 [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 -~----------~----~----~----~------~----~------~--~---
