[antlr-interest] ANTLR build step problem (using MS Visual Studio 2008, C#)
ek2138761 at googlemail.com
Sun Jan 18 07:57:51 PST 2009
I've just finished integrating an ANTLR step into my C# project and
everything is very nice and neat except for one thing: When I build, the
lexer/parser generation seems to be one step behind the build, even though
it is being done before the C# code is compiled.
For example, starting with a working .G file, I introduce a deliberate
error, in the @members section, e.g. just putting the word "typo"
I then hit F6 and build - everything succeeds.
I then hit build again - I now get the expected error: "Member modifier
'public' must precede the member type and name"
Below are the (hopefully) relevent bits of the vcproj file:
The generated C# lexer/parser files:
The grammar file:
The pre-build step:
-message-format vs2005 "$(ProjectDir)@(Antlr3)"</PreBuildEvent>
I've tried various tweaks to the vcproj file but with no success. The
pre-build step was previously set up as in
but this did not work with spaces in $(ProjectDir). (There may be a solution
to this sub-problem but it's outside of my limited XML knowledge....)
Thanks in advance for any help or information!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest