Installation

To install, simply use the MSI and follow the onscreen instructions.

To add the ANTLR.MSBuild task to your MSBuild document, add the following UsingTask element:
  <UsingTask TaskName="ANTLR.MSBuild.AntlrGrammar"
      AssemblyName = "ANTLR.MSBuild, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d50cc80512acc876" />
You will then be able to use the AntlrGrammar build task just like you'd use any other MSBuild task.

Example Use

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="ANTLR.MSBuild.AntlrGrammar"
      AssemblyName = "ANTLR.MSBuild, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d50cc80512acc876" />
  <Target Name="Build"
    Inputs="ConfigurationParser.g"
    Outputs="ConfigurationParserParser.h;ConfigurationParserParser.cpp;ConfigurationParserLexer.h;ConfigurationParserLexer.cpp">
    <AntlrGrammar 
      Grammar="ConfigurationParser.g"
      RenameToCpp="true" />
  </Target>
</Project>


See the properties of the AntlrGrammar class for more detailed configuration options.

Last edited Jul 11, 2010 at 7:42 PM by billyoneal, version 5

Comments

No comments yet.