Hi,
For the current project I am working on, we need to use a parser.
I convinced everybody here that writing your own parser is evil, because it
takes much longer to write than using a tool conceived for this exact
purpose.
Now we use C# and have some strict coding conventions, enforced using the
Microsoft tools (FxCop and StyleCop).
The problem being the antlr-generated code does not comply with these rules.
But Microsoft thought about the possibility of using generated code with
these tools, and the [GeneratedCode(name, version)] attribute is here for
this purpose. Hurray !
The only problem remaining now is that this attribute cannot be placed
correctly using the C# 2 template.
So I added a line in the C# 2 template (dunno if I done it "The Right Way"
though) :
...
75 <docComment>
*76 <if(actions.(actionScope).generatedVersion)>
77 [GeneratedCode("antlr", @"<actions.(actionScope).generatedVersion>")]
78
79 <endif>
*80 <recognizer>
...
Obviously in bold is what I added.
>From what I have seen this can also be added in the C# 3 template.
BTW, when will there be a release of antlrworks including version 3.1.3 of
antlr ?
I have tried it by myself but must have done something wrong as I get loads
of errors when trying to compile.
Keep up the good work,
Regards.
--
- Always keep in mind that you may be wrong -
--~--~---------~--~----~------------~-------~--~----~
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