I am currently converting the C++ grammar from a C back-end to a C# back-end. The original C back-end code has support code, support initialization code and utility code. Several versions of the grammar are being developed at the same time; ISO, Microsoft, Test, etc. Each version of the grammar has a different namespace.
The support initialization code was moved to the superclass constructor so that it would be initialized during construction and not appear as a large method in the grammar. The parser was split into multiple files using partial classes with one of the partial classes being the generated parser, and another being the support methods that make calls to the parser code like LA(). This lets generating of the the parser take place as often as needed without touching the code in the other partial class. This also keeps most of the code out of the grammar file. Lastly the utility code was put into a separate namespace with most of the methods being static. This was done because I am working with multiple versions and allows me to have only one copy of most of the support code. Since most of the back-end code is moved out of the grammar, you can use your favorite IDE to edit the code. Eric 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.
