register wrote:
This has been discussed before. It is a bug in your grammar which you can solve in one of a number of ways: 1) The best thing to do would be to move the scope up the rule hierarchy so that you cannot call this rule without a scope in place. 2) Protect the code your self. 3) Use a different rule when the same syntax is parsed The problem is that if I change the code generated code to check for the scope size being 0, then then only thing that can be returned is NULL anyway, which means you get a different access violation, or an incorrect value because the fact that the stack was accessed incorrectly was masked from you (in fact one of the examples we give out was suffering this problem and it wasn't noticed until the scopes stopped returning NULL if empty). So, instead the code generator does not give you rope to hang yourself with, but expects that you use the scopes correctly. So, the solution isn't to change teh code generation, but to fix your scope access basically. Jim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
