...
...
Code Block |
---|
tree grammar MyGrammar; options { language=CSharp2; } @namespace { My.Custom.NameSpace.For.TreeParser } // rest of grammar follows .... |
...
Members blocks vs C# v2 Partial Classes
In addition to the the use of the @members
block to define class members inline within the grammar file, the CSharp2
target also supports the use of the C# v2 partial classes feature. This has the additional advantage that you can use your favourite editor for C# to define class members since ANTLRworks doesn't support syntax highlighting for target languages.
...