repo
string
commit
string
message
string
diff
string
antlr/antlrcs
93b0dd9f8a24c30723570691145b36536e223e71
Make sure the project builds if the nuspec file changes
diff --git a/Directory.Build.targets b/Directory.Build.targets index 6c5b093..9447c47 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,8 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <ItemGroup> <None Condition="'$(SignAssembly)' == 'true'" Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> + <ItemGroup Condition="'$(GeneratePackageOnBuild)' == 'true'"> + <!-- Workaround for https://github.com/NuGet/Home/issues/6582 --> + <UpToDateCheckInput Condition="'$(NuspecFile)' != ''" Include="$(NuspecFile)" /> + </ItemGroup> + </Project>
antlr/antlrcs
ef8a3bff56a0b70d54039df44eec6da0f6bbd6cb
Add Antlr3.Test to the set of test assemblies
diff --git a/Antlr3.Test/BaseTest.cs b/Antlr3.Test/BaseTest.cs index a30e089..9579770 100644 --- a/Antlr3.Test/BaseTest.cs +++ b/Antlr3.Test/BaseTest.cs @@ -1,626 +1,626 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace AntlrUnitTests { using System; using System.Collections.Generic; using System.Linq; using Antlr.Runtime; using Antlr.Runtime.JavaExtensions; using Antlr3.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using AntlrTool = Antlr3.AntlrTool; using BindingFlags = System.Reflection.BindingFlags; using CultureInfo = System.Globalization.CultureInfo; using Debugger = System.Diagnostics.Debugger; using Directory = System.IO.Directory; using ErrorManager = Antlr3.Tool.ErrorManager; using FieldInfo = System.Reflection.FieldInfo; using GrammarSemanticsMessage = Antlr3.Tool.GrammarSemanticsMessage; using IANTLRErrorListener = Antlr3.Tool.IANTLRErrorListener; using IList = System.Collections.IList; using IOException = System.IO.IOException; using Label = Antlr3.Analysis.Label; using Message = Antlr3.Tool.Message; using Path = System.IO.Path; using Registry = Microsoft.Win32.Registry; using RegistryKey = Microsoft.Win32.RegistryKey; using RegistryValueOptions = Microsoft.Win32.RegistryValueOptions; using StringBuilder = System.Text.StringBuilder; using StringTemplate = Antlr4.StringTemplate.Template; using StringTemplateGroup = Antlr4.StringTemplate.TemplateGroup; [TestClass] [DeploymentItem(@"Codegen\", "Codegen")] [DeploymentItem(@"Antlr3.Targets.Java.dll", "Targets")] [DeploymentItem(@"Antlr3.Targets.Java.pdb", "Targets")] [DeploymentItem(@"Tool\", "Tool")] public abstract class BaseTest { public readonly string jikes = null; public static readonly string pathSep = System.IO.Path.PathSeparator.ToString(); public readonly string RuntimeJar = Path.Combine( Environment.CurrentDirectory, @"..\..\antlr-runtime-3.3.jar" ); public readonly string Runtime2Jar = Path.Combine( Environment.CurrentDirectory, @"..\..\antlr-2.7.7.jar" ); public readonly string StringTemplateJar = Path.Combine( Environment.CurrentDirectory, @"..\..\stringtemplate-3.2.1.jar" ); private static string javaHome; public string tmpdir; public TestContext TestContext { get; set; } /** If error during parser execution, store stderr here; can't return * stdout and stderr. This doesn't trap errors from running antlr. */ protected string stderrDuringParse; public static readonly string NewLine = Environment.NewLine; [ClassInitialize] public void ClassSetUp( TestContext testContext ) { TestContext = testContext; } public static long currentTimeMillis() { return DateTime.Now.ToFileTime() / 10000; } [TestInitialize] public void setUp() { #if DEBUG string configuration = "Debug"; #else string configuration = "Release"; #endif System.IO.DirectoryInfo currentAssemblyDirectory = new System.IO.FileInfo(typeof(BaseTest).Assembly.Location).Directory; - AntlrTool.ToolPathRoot = Path.Combine(currentAssemblyDirectory.Parent.Parent.Parent.FullName, @"bin\" + configuration); + AntlrTool.ToolPathRoot = Path.Combine(currentAssemblyDirectory.Parent.Parent.Parent.FullName, "bin", configuration, "net40-client"); // new output dir for each test tmpdir = Path.GetFullPath( Path.Combine( Path.GetTempPath(), "antlr-" + currentTimeMillis() ) ); ErrorManager.SetLocale(CultureInfo.GetCultureInfo("en-us")); ErrorManager.SetFormat("antlr"); ErrorManager.ResetErrorState(); StringTemplateGroup.DefaultGroup = new StringTemplateGroup(); // verify token constants in StringTemplate VerifyImportedTokens( typeof( Antlr3.ST.Language.ActionParser ), typeof( Antlr3.ST.Language.ActionLexer ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.ActionParser ), typeof( Antlr3.ST.Language.ActionEvaluator ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.TemplateParser ), typeof( Antlr3.ST.Language.TemplateLexer ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.TemplateParser ), typeof( Antlr3.ST.Language.AngleBracketTemplateLexer ) ); // verify token constants in the ANTLR Tool VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.ANTLRLexer ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.ANTLRTreePrinter ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.AssignTokenTypesWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.CodeGenTreeWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.DefineGrammarItemsWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.TreeToNFAConverter ) ); } [TestCleanup] public void tearDown() { // remove tmpdir if no error. how? if ( TestContext != null && TestContext.CurrentTestOutcome == UnitTestOutcome.Passed ) eraseTempDir(); } private void VerifyImportedTokens( Type source, Type target ) { FieldInfo namesField = source.GetField( "tokenNames", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public ); FieldInfo targetNamesField = target.GetField( "tokenNames", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public ); Assert.IsNotNull( namesField, string.Format( "No tokenNames field was found in grammar {0}.", source.Name ) ); string[] sourceNames = namesField.GetValue( null ) as string[]; string[] targetNames = ( targetNamesField != null ) ? targetNamesField.GetValue( null ) as string[] : null; Assert.IsNotNull( sourceNames, string.Format( "The tokenNames field in grammar {0} was null.", source.Name ) ); for ( int i = 0; i < sourceNames.Length; i++ ) { string tokenName = sourceNames[i]; if ( string.IsNullOrEmpty( tokenName ) || tokenName[0] == '<' ) continue; if ( tokenName[0] == '\'' ) { if ( targetNames != null && targetNames.Length > i ) { // make sure implicit tokens like 'new' that show up in code as T__45 refer to the same token Assert.AreEqual( sourceNames[i], targetNames[i], string.Format( "Implicit token {0} in grammar {1} doesn't match {2} in grammar {3}.", sourceNames[i], source.Name, targetNames[i], target.Name ) ); continue; } else { tokenName = "T__" + i.ToString(); } } FieldInfo sourceToken = source.GetField( tokenName ); FieldInfo targetToken = target.GetField( tokenName ); if ( source != null && target != null ) { int sourceValue = (int)sourceToken.GetValue( null ); int targetValue = (int)targetToken.GetValue( null ); Assert.AreEqual( sourceValue, targetValue, string.Format( "Token {0} with value {1} grammar {2} doesn't match value {3} in grammar {4}.", tokenName, sourceValue, source.Name, targetValue, target.Name ) ); } } } protected AntlrTool newTool(params string[] args) { AntlrTool tool = (args == null || args.Length == 0) ? new AntlrTool() : new AntlrTool(args); tool.SetOutputDirectory( tmpdir ); tool.TestMode = true; return tool; } protected static string JavaHome { get { string home = javaHome; bool debugger = Debugger.IsAttached; if (home == null || debugger) { home = Environment.GetEnvironmentVariable("JAVA_HOME"); if (string.IsNullOrEmpty(home) || !Directory.Exists(home)) { home = CheckForJavaHome(Registry.CurrentUser); if (home == null) home = CheckForJavaHome(Registry.LocalMachine); } if (home != null && !Directory.Exists(home)) home = null; if (!debugger) { javaHome = home; } } return home; } } protected static string CheckForJavaHome(RegistryKey key) { using (RegistryKey subkey = key.OpenSubKey(@"SOFTWARE\JavaSoft\Java Development Kit")) { if (subkey == null) return null; object value = subkey.GetValue("CurrentVersion", null, RegistryValueOptions.None); if (value != null) { using (RegistryKey currentHomeKey = subkey.OpenSubKey(value.ToString())) { if (currentHomeKey == null) return null; value = currentHomeKey.GetValue("JavaHome", null, RegistryValueOptions.None); if (value != null) return value.ToString(); } } } return null; } protected string ClassPath { get { return Path.GetFullPath( RuntimeJar ) + Path.PathSeparator + Path.GetFullPath( Runtime2Jar ) + Path.PathSeparator + Path.GetFullPath( StringTemplateJar ); } } protected string Compiler { get { return Path.Combine( Path.Combine( JavaHome, "bin" ), "javac.exe" ); } } protected string Jvm { get { return Path.Combine( Path.Combine( JavaHome, "bin" ), "java.exe" ); } } protected bool compile( string fileName ) { //String compiler = "javac"; string compiler = Compiler; string classpathOption = "-classpath"; if ( jikes != null ) { compiler = jikes; classpathOption = "-bootclasspath"; } string inputFile = Path.Combine(tmpdir, fileName); string[] args = new string[] { /*compiler,*/ "-d", tmpdir, classpathOption, tmpdir+pathSep+ClassPath, inputFile }; string cmdLine = compiler + " -d " + tmpdir + " " + classpathOption + " " + '"'+tmpdir + pathSep + ClassPath+'"' + " " + fileName; //System.out.println("compile: "+cmdLine); //File outputDir = new File( tmpdir ); try { System.Diagnostics.Process process = System.Diagnostics.Process.Start( new System.Diagnostics.ProcessStartInfo( compiler, '"' + string.Join( "\" \"", args ) + '"' ) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, RedirectStandardError = true, WorkingDirectory = tmpdir } ); //Process process = // Runtime.getRuntime().exec( args, null, outputDir ); StreamVacuum stdout = new StreamVacuum( process.StandardOutput, inputFile ); StreamVacuum stderr = new StreamVacuum( process.StandardError, inputFile ); stdout.start(); stderr.start(); process.WaitForExit(); if ( stdout.ToString().Length > 0 ) { Console.Error.WriteLine( "compile stdout from: " + cmdLine ); Console.Error.WriteLine( stdout ); } if ( stderr.ToString().Length > 0 ) { Console.Error.WriteLine( "compile stderr from: " + cmdLine ); Console.Error.WriteLine( stderr ); } int ret = process.ExitCode; return ret == 0; } catch ( Exception e ) { Console.Error.WriteLine( "can't exec compilation" ); e.PrintStackTrace( Console.Error ); return false; } } /** Return true if all is ok, no errors */ protected bool antlr( string fileName, string grammarFileName, string grammarStr, bool debug ) { bool allIsWell = true; mkdir( tmpdir ); writeFile( tmpdir, fileName, grammarStr ); try { List<string> options = new List<string>(); options.Add( "-testmode" ); if ( debug ) { options.Add( "-debug" ); } options.Add( "-o" ); options.Add( tmpdir ); options.Add( "-lib" ); options.Add( tmpdir ); options.Add( Path.Combine( tmpdir, grammarFileName ) ); options.Add("-language"); options.Add("Java"); //String[] optionsA = new String[options.size()]; //options.toArray( optionsA ); string[] optionsA = options.ToArray(); /* final ErrorQueue equeue = new ErrorQueue(); ErrorManager.setErrorListener(equeue); */ AntlrTool antlr = new AntlrTool( optionsA ); antlr.Process(); IANTLRErrorListener listener = ErrorManager.GetErrorListener(); if ( listener is ErrorQueue ) { ErrorQueue equeue = (ErrorQueue)listener; if ( equeue.errors.Count > 0 ) { allIsWell = false; Console.Error.WriteLine( "antlr reports errors from [" + string.Join(", ", options) + ']' ); for ( int i = 0; i < equeue.errors.Count; i++ ) { Message msg = (Message)equeue.errors[i]; Console.Error.WriteLine( msg ); } Console.Out.WriteLine( "!!!\ngrammar:" ); Console.Out.WriteLine( grammarStr ); Console.Out.WriteLine( "###" ); } } } catch ( Exception e ) { allIsWell = false; Console.Error.WriteLine( "problems building grammar: " + e ); e.PrintStackTrace( Console.Error ); } return allIsWell; } protected string execLexer( string grammarFileName, string grammarStr, string lexerName, string input, bool debug ) { bool compiled = rawGenerateAndBuildRecognizer( grammarFileName, grammarStr, null, lexerName, debug ); Assert.IsTrue(compiled); writeFile(tmpdir, "input", input); return rawExecRecognizer( null, null, lexerName, null, null, false, false, false, debug ); } protected string execParser( string grammarFileName, string grammarStr, string parserName, string lexerName, string startRuleName, string input, bool debug ) { bool compiled = rawGenerateAndBuildRecognizer( grammarFileName, grammarStr, parserName, lexerName, debug ); Assert.IsTrue(compiled); writeFile(tmpdir, "input", input); bool parserBuildsTrees = grammarStr.IndexOf( "output=AST" ) >= 0 || grammarStr.IndexOf( "output = AST" ) >= 0; bool parserBuildsTemplate = grammarStr.IndexOf( "output=template" ) >= 0 || grammarStr.IndexOf( "output = template" ) >= 0; return rawExecRecognizer( parserName, null, lexerName, startRuleName, null, parserBuildsTrees, parserBuildsTemplate, false, debug ); } protected string execTreeParser( string parserGrammarFileName, string parserGrammarStr, string parserName, string treeParserGrammarFileName, string treeParserGrammarStr, string treeParserName, string lexerName, string parserStartRuleName, string treeParserStartRuleName, string input ) { return execTreeParser( parserGrammarFileName, parserGrammarStr, parserName, treeParserGrammarFileName, treeParserGrammarStr, treeParserName, lexerName, parserStartRuleName, treeParserStartRuleName, input, false ); } protected string execTreeParser( string parserGrammarFileName, string parserGrammarStr, string parserName, string treeParserGrammarFileName, string treeParserGrammarStr, string treeParserName, string lexerName, string parserStartRuleName, string treeParserStartRuleName, string input, bool debug ) { // build the parser bool compiled = rawGenerateAndBuildRecognizer( parserGrammarFileName, parserGrammarStr, parserName, lexerName, debug ); Assert.IsTrue(compiled); // build the tree parser compiled = rawGenerateAndBuildRecognizer( treeParserGrammarFileName, treeParserGrammarStr, treeParserName, lexerName, debug ); Assert.IsTrue(compiled); writeFile( tmpdir, "input", input ); bool parserBuildsTrees = parserGrammarStr.IndexOf( "output=AST" ) >= 0 || parserGrammarStr.IndexOf( "output = AST" ) >= 0; bool treeParserBuildsTrees = treeParserGrammarStr.IndexOf( "output=AST" ) >= 0 || treeParserGrammarStr.IndexOf( "output = AST" ) >= 0; bool parserBuildsTemplate = parserGrammarStr.IndexOf( "output=template" ) >= 0 || parserGrammarStr.IndexOf( "output = template" ) >= 0; return rawExecRecognizer( parserName, treeParserName, lexerName, parserStartRuleName, treeParserStartRuleName, parserBuildsTrees, parserBuildsTemplate, treeParserBuildsTrees, debug ); } /** Return true if all is well */ protected bool rawGenerateAndBuildRecognizer( string grammarFileName, string grammarStr, string parserName, string lexerName, bool debug ) { bool allIsWell = antlr( grammarFileName, grammarFileName, grammarStr, debug ); if (!allIsWell) return false; if ( lexerName != null ) { bool ok; if ( parserName != null ) { ok = compile( parserName + ".java" ); if ( !ok ) { allIsWell = false; } } ok = compile( lexerName + ".java" ); if ( !ok ) { allIsWell = false; } } else { bool ok = compile( parserName + ".java" ); if ( !ok ) { allIsWell = false; } } return allIsWell; } protected string rawExecRecognizer( string parserName, string treeParserName, string lexerName, string parserStartRuleName, string treeParserStartRuleName, bool parserBuildsTrees, bool parserBuildsTemplate, bool treeParserBuildsTrees, bool debug ) { stderrDuringParse = null; WriteRecognizerAndCompile(parserName, treeParserName, lexerName, parserStartRuleName, treeParserStartRuleName, parserBuildsTrees, parserBuildsTemplate, treeParserBuildsTrees, debug); return execRecognizer(); } public string execRecognizer() { try { string inputFile = Path.GetFullPath(Path.Combine(tmpdir, "input")); string[] args = new string[] { /*"java",*/ "-classpath", tmpdir+pathSep+ClassPath, "Test", inputFile }; //String cmdLine = "java -classpath " + CLASSPATH + pathSep + tmpdir + " Test " + Path.GetFullPath( Path.Combine( tmpdir, "input" ) ); //System.out.println("execParser: "+cmdLine); System.Diagnostics.Process process = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(Jvm, '"' + string.Join("\" \"", args) + '"') { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, RedirectStandardError = true, WorkingDirectory = tmpdir }); //Process process = // Runtime.getRuntime().exec( args, null, new File( tmpdir ) ); StreamVacuum stdoutVacuum = new StreamVacuum(process.StandardOutput, inputFile); StreamVacuum stderrVacuum = new StreamVacuum(process.StandardError, inputFile); stdoutVacuum.start(); stderrVacuum.start(); process.WaitForExit(); stdoutVacuum.join(); stderrVacuum.join(); string output = null; diff --git a/Antlr3.sln b/Antlr3.sln index 0f9dd7a..75d005e 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,237 +1,237 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject .travis.yml = .travis.yml Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.CodeGenerator.nuspec = build\prep\Antlr3.CodeGenerator.nuspec build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\push-antlr.ps1 = build\prep\push-antlr.ps1 build\prep\push-st3.ps1 = build\prep\push-st3.ps1 build\prep\push-st4.ps1 = build\prep\push-st4.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec build\prep\version.ps1 = build\prep\version.ps1 EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU + {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml index c94c9fa..388ed03 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,23 @@ version: 1.0.{build} os: Visual Studio 2017 configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: +- vstest.console /logger:Appveyor "C:\projects\antlrcs\Antlr3.Test\bin\%CONFIGURATION%\net45\AntlrUnitTests.dll" - vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\net45\Antlr4.Test.StringTemplate.dll" - dotnet vstest /Framework:".NETCoreApp,Version=v2.0" /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\netcoreapp2.0\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z
antlr/antlrcs
d37c1c41575224788169f8ee75d39e70b929ff4b
Remove obsolete documentation PublishingProcess.txt
diff --git a/Antlr3.sln b/Antlr3.sln index 0f9dd7a..d5a091d 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,237 +1,236 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject .travis.yml = .travis.yml Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml - PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.CodeGenerator.nuspec = build\prep\Antlr3.CodeGenerator.nuspec build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\push-antlr.ps1 = build\prep\push-antlr.ps1 build\prep\push-st3.ps1 = build\prep\push-st3.ps1 build\prep\push-st4.ps1 = build\prep\push-st4.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec build\prep\version.ps1 = build\prep\version.ps1 EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/PublishingProcess.txt b/PublishingProcess.txt deleted file mode 100644 index 1ed0595..0000000 --- a/PublishingProcess.txt +++ /dev/null @@ -1,5 +0,0 @@ -1. Rebuild solution -2. Compress existing files in the bootstrap directory -3. Copy fresh build files to the bootstrap directory -4. Rebuild solution -5. Copy fresh build files to the bootstrap directory
antlr/antlrcs
bf4f5bf7ba603acefbfaac77ae9d7fabac7bb9b5
Save source files with characters over U+007F as UTF-8 with BOM
diff --git a/Antlr4.Test.StringTemplate/TestRenderers.cs b/Antlr4.Test.StringTemplate/TestRenderers.cs index 68ef39a..85fb44d 100644 --- a/Antlr4.Test.StringTemplate/TestRenderers.cs +++ b/Antlr4.Test.StringTemplate/TestRenderers.cs @@ -1,390 +1,390 @@ -/* +/* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using System.Collections.Generic; using Antlr4.StringTemplate; using Microsoft.VisualStudio.TestTools.UnitTesting; using CultureInfo = System.Globalization.CultureInfo; using DateTime = System.DateTime; using DateTimeOffset = System.DateTimeOffset; using Path = System.IO.Path; [TestClass] public class TestRenderers : BaseTest { [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererForGroup() { string templates = "dateThing(created) ::= \"datetime: <created>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = "datetime: 07/05/2005 00:00"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithFormat() { string templates = "dateThing(created) ::= << date: <created; format=\"yyyy.MM.dd\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: 2005.07.05 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat() { string templates = "dateThing(created) ::= << datetime: <created; format=\"short\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " datetime: 07/05/2005 00:00 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat2() { string templates = "dateThing(created) ::= << datetime: <created; format=\"full\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " datetime: Tuesday, 05 July 2005 00:00:00 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat3() { string templates = "dateThing(created) ::= << date: <created; format=\"date:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: Jul 5, 2005 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat4() { string templates = "dateThing(created) ::= << time: <created; format=\"time:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " time: 12:00:00 AM "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithPrintfFormat() { string templates = "foo(x) ::= << <x; format=\"{0,6}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndList() { string template = "The names: <names; format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TERTOMSRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparator() { string template = "The names: <names; separator=\" and \", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TER and TOM and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparatorAndNull() { string template = "The names: <names; separator=\" and \", null=\"n/a\", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); List<string> names = new List<string>(); names.Add("ter"); names.Add(null); names.Add("sriram"); st.Add("names", names); string expecting = "The names: TER and N/A and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithTemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <(t()); format=\"cap\"> >>\n" + "t() ::= <<ack>>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithSubtemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <({ack}); format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap_emptyValue() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", ""); string expecting = " ";//FIXME: why not two spaces? string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_url_encode() { string templates = "foo(x) ::= << <x; format=\"url-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a b"); string expecting = " a+b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a<b> &\t\b"); string expecting = " a&lt;b&gt; &amp;\t\b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode_null() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", null); string expecting = " "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestNumberRendererWithPrintfFormat() { //string templates = "foo(x,y) ::= << <x; format=\"%d\"> <y; format=\"%2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); string expecting = " -2100 3.142 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestInstanceofRenderer() { string templates = "numberThing(x,y,z) ::= \"numbers: <x>, <y>; <z>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("numberThing"); st.Add("x", -2100); st.Add("y", 3.14159); st.Add("z", "hi"); string expecting = "numbers: -2100, 3.14159; hi"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestLocaleWithNumberRenderer() { //string templates = "foo(x,y) ::= << <x; format=\"%,d\"> <y; format=\"%,2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0:#,#}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); - // Polish uses ' ' (ASCII 160) for ',' and ',' for '.' - string expecting = " -2 100 3,142 "; // Ê + // Polish uses ' ' (ASCII 160) for ',' and ',' for '.' + string expecting = " -2 100 3,142 "; // Ê string result = st.Render(new CultureInfo("pl")); Assert.AreEqual(expecting, result); } } }
antlr/antlrcs
3d5eb5b49629d88b28f4695fcfbbc74c7ae19ca7
Fix TemplateGroupFile._url support for non-Windows systems
diff --git a/Antlr4.StringTemplate/TemplateGroupFile.cs b/Antlr4.StringTemplate/TemplateGroupFile.cs index 85946e6..b034acf 100644 --- a/Antlr4.StringTemplate/TemplateGroupFile.cs +++ b/Antlr4.StringTemplate/TemplateGroupFile.cs @@ -1,226 +1,220 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using System.Linq; using System.Runtime.CompilerServices; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Extensions; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using Console = System.Console; using Encoding = System.Text.Encoding; using ErrorType = Antlr4.StringTemplate.Misc.ErrorType; using Exception = System.Exception; using File = System.IO.File; using FileNotFoundException = System.IO.FileNotFoundException; using Path = System.IO.Path; using Uri = System.Uri; using UriFormatException = System.UriFormatException; + using UriKind = System.UriKind; using Utility = Antlr4.StringTemplate.Misc.Utility; /** The internal representation of a single group file (which must end in * ".stg"). If we fail to find a group file, look for it via the * CLASSPATH as a resource. */ public class TemplateGroupFile : TemplateGroup { /// <summary> /// Records how the user "spelled" the file name they wanted to load. /// The URI is the key field here for loading content. If they use the /// constructor with a URI argument, this field is <see langword="null"/>. /// </summary> private readonly string _fileName; /// <summary> /// Where to find the group file; non-null. /// </summary> private readonly Uri _url; private bool _alreadyLoaded = false; /** Load a file relative to current dir or from root or via CLASSPATH. */ public TemplateGroupFile(string fileName) : this(fileName, '<', '>') { } public TemplateGroupFile(string fileName, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { if (fileName == null) throw new ArgumentNullException("fileName"); try { if (!fileName.EndsWith(GroupFileExtension)) throw new ArgumentException("Group file names must end in .stg: " + fileName); if (!File.Exists(fileName)) throw new FileNotFoundException(string.Format("No such group file: {0}", fileName)); - this._url = new Uri(fileName); + if (!Uri.TryCreate(Path.GetFullPath(fileName), UriKind.Absolute, out _url)) + { + _url = new Uri("file://" + fileName.Replace('\\', '/')); + } + this._fileName = fileName; if (Verbose) Console.WriteLine("STGroupFile({0}) == file {1}", fileName, Path.GetFullPath(fileName)); } catch (Exception e) { e.PreserveStackTrace(); if (!e.IsCritical()) ErrorManager.InternalError(null, "can't Load group file " + fileName, e); throw; } } public TemplateGroupFile(string fullyQualifiedFileName, Encoding encoding) : this(fullyQualifiedFileName, encoding, '<', '>') { } public TemplateGroupFile(string fullyQualifiedFileName, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : this(fullyQualifiedFileName, delimiterStartChar, delimiterStopChar) { if (encoding == null) throw new ArgumentNullException("encoding"); this.Encoding = encoding; } /// <summary> /// Pass in a URL with the location of a group file. E.g., /// TemplateGroup g = new TemplateGroupFile("file:///org/foo/templates/g.stg", Encoding.UTF8, '&lt;', '&gt;'); /// </summary> public TemplateGroupFile(Uri url, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { if (url == null) throw new ArgumentNullException("url"); if (encoding == null) throw new ArgumentNullException("encoding"); this._url = url; this.Encoding = encoding; this._fileName = null; } public override bool IsDefined(string name) { if (!_alreadyLoaded) Load(); return base.IsDefined(name); } public override void Unload() { lock (this) { base.Unload(); _alreadyLoaded = false; } } protected override CompiledTemplate Load(string name) { if (!_alreadyLoaded) Load(); return RawGetTemplate(name); } public override void Load() { if (_alreadyLoaded) return; // do before actual load to say we're doing it // no prefix since this group file is the entire group, nothing lives // beneath it. _alreadyLoaded = true; if (Verbose) Console.WriteLine("loading group file " + _url.LocalPath); LoadGroupFile("/", _url.LocalPath); if (Verbose) Console.WriteLine("found {0} templates in {1} = {2}", CompiledTemplates.Count, _url.ToString(), CompiledTemplates); } public override string Show() { if (!_alreadyLoaded) Load(); return base.Show(); } public override string Name { get { return Path.GetFileNameWithoutExtension(FileName); } } public override string FileName { get { return _fileName ?? _url.Segments.Last(); } } public override Uri RootDirUri { get { - //System.out.println("url of "+fileName+" is "+url.toString()); - string parent = Path.GetDirectoryName(_url.ToString()); - try - { - return new Uri(parent); - } - catch (UriFormatException mue) - { - ErrorManager.RuntimeError(null, ErrorType.INVALID_TEMPLATE_NAME, mue, parent); - } - - return null; + return new Uri(_url, "."); } } } }
antlr/antlrcs
3f8cca823b9501d94ef1b3e97f3bfcff7466aa24
Add Travis CI build for StringTemplate 4
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0250460 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: csharp +dist: trusty +mono: none +dotnet: 2.0.0 +script: + - dotnet test Antlr4.Test.StringTemplate -f netcoreapp2.0 diff --git a/Antlr3.sln b/Antlr3.sln index dcdd02f..0f9dd7a 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,236 +1,237 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject + .travis.yml = .travis.yml Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.CodeGenerator.nuspec = build\prep\Antlr3.CodeGenerator.nuspec build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\push-antlr.ps1 = build\prep\push-antlr.ps1 build\prep\push-st3.ps1 = build\prep\push-st3.ps1 build\prep\push-st4.ps1 = build\prep\push-st4.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec build\prep\version.ps1 = build\prep\version.ps1 EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index b6868ab..6f08c16 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,115 +1,115 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>$(STVersion)</Version> <FileVersion>$(STFileVersion)</FileVersion> <InformationalVersion>$(STInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(ANTLRInformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <ItemGroup> <Reference Include="System.Xaml" /> </ItemGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> - <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> + <LanguageTargets Condition="Exists('$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets')">$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index a3464ed..4a1f727 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,46 +1,46 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <ANTLRVersion>3.5.0.2</ANTLRVersion> <ANTLRFileVersion>3.5.2.0</ANTLRFileVersion> <ANTLRInformationalVersion>3.5.2-dev</ANTLRInformationalVersion> <STVersion>4.0.7.0</STVersion> <STFileVersion>4.0.9.0</STFileVersion> <STInformationalVersion>4.0.9-dev</STInformationalVersion> </PropertyGroup> <PropertyGroup> - <SignAssembly>true</SignAssembly> + <SignAssembly Condition="'$(OS)' != 'Unix'">true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <BootstrapBuild Condition="'$(BootstrapBuild)' == '' AND Exists('$(MSBuildThisFileDirectory)NuGet.config')">True</BootstrapBuild> </PropertyGroup> <ItemGroup Condition="'$(BootstrapBuild)' != 'true'"> <PackageReference Include="Antlr3.CodeGenerator" Version="3.5.2-beta1" /> </ItemGroup> <ItemGroup Condition="'$(BootstrapBuild)' == 'true'"> <PackageReference Include="Antlr3.CodeGenerator" Version="$(ANTLRInformationalVersion)" /> </ItemGroup> </Project>
antlr/antlrcs
564d1ca80900d9adfcdf09879c896b53a4ad3621
Allow null TemplateFrame argument to TemplateRuntimeMessage
diff --git a/Antlr4.StringTemplate/Misc/TemplateRuntimeMessage.cs b/Antlr4.StringTemplate/Misc/TemplateRuntimeMessage.cs index 9c9649c..50f2b02 100644 --- a/Antlr4.StringTemplate/Misc/TemplateRuntimeMessage.cs +++ b/Antlr4.StringTemplate/Misc/TemplateRuntimeMessage.cs @@ -1,131 +1,131 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Misc { using Exception = System.Exception; using StringBuilder = System.Text.StringBuilder; /** Used to track errors that occur in the Template interpreter. */ public class TemplateRuntimeMessage : TemplateMessage { /** Where error occurred in bytecode memory */ private readonly int ip = -1; private readonly TemplateFrame _frame; public TemplateRuntimeMessage(ErrorType error, int ip) : this(error, ip, null) { } public TemplateRuntimeMessage(ErrorType error, int ip, TemplateFrame frame) : this(error, ip, frame, null) { } public TemplateRuntimeMessage(ErrorType error, int ip, TemplateFrame frame, object arg) : this(error, ip, frame, null, arg, null) { } public TemplateRuntimeMessage(ErrorType error, int ip, TemplateFrame frame, Exception e, object arg) : this(error, ip, frame, e, arg, null) { } public TemplateRuntimeMessage(ErrorType error, int ip, TemplateFrame frame, Exception e, object arg, object arg2) - : base(error, frame.Template, e, arg, arg2) + : base(error, frame?.Template, e, arg, arg2) { this.ip = ip; this._frame = frame; } public TemplateRuntimeMessage(ErrorType error, int ip, TemplateFrame frame, Exception e, object arg, object arg2, object arg3) - : base(error, frame.Template, e, arg, arg2, arg3) + : base(error, frame?.Template, e, arg, arg2, arg3) { this.ip = ip; this._frame = frame; } public TemplateFrame Frame { get { return _frame; } } public Interval SourceInterval { get { if (ip < 0 || Self == null || Self.impl == null || Self.impl.sourceMap == null || ip >= Self.impl.sourceMap.Length) return null; return Self.impl.sourceMap[ip]; } } /** Given an ip (code location), get it's range in source template then * return it's template line:col. */ public virtual string GetSourceLocation() { Interval interval = SourceInterval; if (interval == null) return null; // get left edge and get line/col int i = interval.Start; Coordinate loc = Utility.GetLineCharPosition(Self.impl.Template, i); return loc.ToString(); } public override string ToString() { StringBuilder buf = new StringBuilder(); string loc = null; if (_frame != null) { loc = GetSourceLocation(); buf.Append("context ["); buf.Append(_frame.GetEnclosingInstanceStackString()); buf.Append("]"); } if (loc != null) buf.Append(" " + loc); buf.Append(" " + base.ToString()); return buf.ToString(); } } }
antlr/antlrcs
dd967148105125732db6ad98c1ce911e9c515002
Move back to the non-preview AppVeyor build of Visual Studio 2017
diff --git a/appveyor.yml b/appveyor.yml index 0452c36..39e224c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ version: 1.0.{build} -os: Visual Studio 2017 Preview +os: Visual Studio 2017 configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: - vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\net45\Antlr4.Test.StringTemplate.dll" - dotnet vstest /Framework:FrameworkCore10 /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\netcoreapp1.0\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z
antlr/antlrcs
47c8270887d5164cbe2189ded9d969ddf7f4f3ec
Use globbing for ANTLR files in all projects except Antlr3.Runtime.Test
diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 6529765..842425a 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,91 +1,85 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>$(ANTLRVersion)</Version> <FileVersion>$(ANTLRFileVersion)</FileVersion> <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> - <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> - <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> - <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> - <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> - <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> - <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 67bbb93..43f575b 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,393 +1,384 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>$(ANTLRVersion)</Version> <FileVersion>$(ANTLRFileVersion)</FileVersion> <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard2.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> - <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> - <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Condition="'$(TargetFramework)' != 'netstandard2.0'" Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 217301f..c6ef291 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,83 +1,79 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>$(STVersion)</Version> <FileVersion>$(STFileVersion)</FileVersion> <InformationalVersion>$(STInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(ANTLRInformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> - <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> - <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> - <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> - <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index c310e3c..a3464ed 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,48 +1,46 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <ANTLRVersion>3.5.0.2</ANTLRVersion> <ANTLRFileVersion>3.5.2.0</ANTLRFileVersion> <ANTLRInformationalVersion>3.5.2-dev</ANTLRInformationalVersion> <STVersion>4.0.7.0</STVersion> <STFileVersion>4.0.9.0</STFileVersion> <STInformationalVersion>4.0.9-dev</STInformationalVersion> </PropertyGroup> <PropertyGroup> - <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> - <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <BootstrapBuild Condition="'$(BootstrapBuild)' == '' AND Exists('$(MSBuildThisFileDirectory)NuGet.config')">True</BootstrapBuild> </PropertyGroup> <ItemGroup Condition="'$(BootstrapBuild)' != 'true'"> <PackageReference Include="Antlr3.CodeGenerator" Version="3.5.2-beta1" /> </ItemGroup> <ItemGroup Condition="'$(BootstrapBuild)' == 'true'"> <PackageReference Include="Antlr3.CodeGenerator" Version="$(ANTLRInformationalVersion)" /> </ItemGroup> </Project> diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index e007826..460dabe 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,143 +1,144 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>$(ANTLRVersion)</Version> <FileVersion>$(ANTLRFileVersion)</FileVersion> <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
b5ebf31f4ddb810ba583507f0affa462c610742c
Prepare for next development iteration
diff --git a/Directory.Build.props b/Directory.Build.props index b2aef47..e0bf037 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,44 +1,44 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <ANTLRVersion>3.5.0.2</ANTLRVersion> <ANTLRFileVersion>3.5.2.0</ANTLRFileVersion> - <ANTLRInformationalVersion>3.5.2-beta1</ANTLRInformationalVersion> + <ANTLRInformationalVersion>3.5.2-dev</ANTLRInformationalVersion> <STVersion>4.0.7.0</STVersion> <STFileVersion>4.0.9.0</STFileVersion> - <STInformationalVersion>4.0.9-beta1</STInformationalVersion> + <STInformationalVersion>4.0.9-dev</STInformationalVersion> </PropertyGroup> <PropertyGroup> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <BootstrapBuild Condition="'$(BootstrapBuild)' == '' AND Exists('$(MSBuildThisFileDirectory)NuGet.config')">True</BootstrapBuild> </PropertyGroup> <ItemGroup Condition="'$(BootstrapBuild)' == 'true'"> <PackageReference Include="Antlr3.CodeGenerator" Version="$(ANTLRInformationalVersion)" /> </ItemGroup> </Project> diff --git a/build/Validation/DotnetValidation.csproj b/build/Validation/DotnetValidation.csproj index ba34e38..809a958 100644 --- a/build/Validation/DotnetValidation.csproj +++ b/build/Validation/DotnetValidation.csproj @@ -1,33 +1,33 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>net20;net30;net35;net40;net45;netcoreapp1.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks> <EnableDefaultNoneItems>False</EnableDefaultNoneItems> <Antlr4UseCSharpGenerator>True</Antlr4UseCSharpGenerator> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <DefineConstants>$(DefineConstants);LEGACY_PCL</DefineConstants> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> </When> </Choose> <ItemGroup> - <PackageReference Include="Antlr3" Version="3.5.2-beta1" /> + <PackageReference Include="Antlr3" Version="3.5.2-dev" /> </ItemGroup> <ItemGroup> <None Include="NuGet.config" /> </ItemGroup> </Project> diff --git a/build/prep/version.ps1 b/build/prep/version.ps1 index 55f94b7..e8252a8 100644 --- a/build/prep/version.ps1 +++ b/build/prep/version.ps1 @@ -1,2 +1,2 @@ -$AntlrVersion = "3.5.2-beta1" -$STVersion = "4.0.9-beta1" +$AntlrVersion = "3.5.2-dev" +$STVersion = "4.0.9-dev"
antlr/antlrcs
5479b70317f09be425ebdb8e39ef56c788c8035c
Add scripts for pushing packages to NuGet
diff --git a/Antlr3.sln b/Antlr3.sln index 86a33e2..dcdd02f 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,232 +1,236 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.CodeGenerator.nuspec = build\prep\Antlr3.CodeGenerator.nuspec build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 + build\prep\push-antlr.ps1 = build\prep\push-antlr.ps1 + build\prep\push-st3.ps1 = build\prep\push-st3.ps1 + build\prep\push-st4.ps1 = build\prep\push-st4.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec + build\prep\version.ps1 = build\prep\version.ps1 EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index ac3d083..cf05ec9 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,258 +1,257 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger, [switch]$NoValidate ) -$AntlrVersion = "3.5.2-dev" -$STVersion = "4.0.9-dev" +. .\version.ps1 # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Make sure we don't have a stray config file from the bootstrap build If (Test-Path '..\..\NuGet.config') { Remove-Item '..\..\NuGet.config' } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # Build Antlr3.CodeGenerator so we can use it for the boostrap build .\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package prior to bootstrap, Aborting!") exit 1 } # build the project again with the new bootstrap files copy -force '..\..\NuGet.config.bootstrap' '..\..\NuGet.config' .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") Remove-Item '..\..\NuGet.config' exit 1 } Remove-Item '..\..\NuGet.config' # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\net40\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\net40\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.dll" ".\Tool" copy "..\..\bin\$BuildConfig\net40\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\net40\Rules\Antlr3.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\net40\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\net40\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\net35-client\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\net35-client\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\net35-client\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\net35-client\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\net35-client\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\net35-client\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } # Validate the build If (-not $NoValidate) { git 'clean' '-dxf' '..\Validation' dotnet 'run' '--project' '..\Validation\DotnetValidation.csproj' '--framework' 'netcoreapp1.1' if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit $LASTEXITCODE } git 'clean' '-dxf' '..\Validation' .\NuGet.exe 'restore' '..\Validation' &$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '..\Validation\DotnetValidation.sln' if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net20\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net30\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net35\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net40\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\portable40-net40+sl5+win8+wp8+wpa81\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net45\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } } diff --git a/build/prep/push-antlr.ps1 b/build/prep/push-antlr.ps1 new file mode 100644 index 0000000..45b9deb --- /dev/null +++ b/build/prep/push-antlr.ps1 @@ -0,0 +1,35 @@ +param ( + [string]$Source = 'https://www.nuget.org/' +) + +. .\version.ps1 + +If ($AntlrVersion.EndsWith('-dev')) { + $host.ui.WriteErrorLine("Cannot push development version '$AntlrVersion' to NuGet.") + Exit 1 +} + +$packages = @( + 'Antlr3.Runtime' + 'Antlr3.Runtime.Debug' + 'Antlr3.CodeGenerator' + 'Antlr3') + +# Make sure all packages exist before pushing any packages +ForEach ($package in $packages) { + If (-not (Test-Path ".\nuget\$package.$AntlrVersion.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet package: $JarPath") + exit 1 + } + + If (-not (Test-Path ".\nuget\$package.$AntlrVersion.symbols.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet symbols package: $JarPath") + exit 1 + } +} + +$nuget = '.\NuGet.exe' + +ForEach ($package in $packages) { + &$nuget 'push' ".\nuget\$package.$AntlrVersion.nupkg" -Source $Source +} diff --git a/build/prep/push-st3.ps1 b/build/prep/push-st3.ps1 new file mode 100644 index 0000000..e654194 --- /dev/null +++ b/build/prep/push-st3.ps1 @@ -0,0 +1,32 @@ +param ( + [string]$Source = 'https://www.nuget.org/' +) + +. .\version.ps1 + +If ($AntlrVersion.EndsWith('-dev')) { + $host.ui.WriteErrorLine("Cannot push development version '$AntlrVersion' to NuGet.") + Exit 1 +} + +$packages = @( + 'StringTemplate3') + +# Make sure all packages exist before pushing any packages +ForEach ($package in $packages) { + If (-not (Test-Path ".\nuget\$package.$AntlrVersion.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet package: $JarPath") + exit 1 + } + + If (-not (Test-Path ".\nuget\$package.$AntlrVersion.symbols.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet symbols package: $JarPath") + exit 1 + } +} + +$nuget = '.\NuGet.exe' + +ForEach ($package in $packages) { + &$nuget 'push' ".\nuget\$package.$AntlrVersion.nupkg" -Source $Source +} diff --git a/build/prep/push-st4.ps1 b/build/prep/push-st4.ps1 new file mode 100644 index 0000000..01775e5 --- /dev/null +++ b/build/prep/push-st4.ps1 @@ -0,0 +1,33 @@ +param ( + [string]$Source = 'https://www.nuget.org/' +) + +. .\version.ps1 + +If ($STVersion.EndsWith('-dev')) { + $host.ui.WriteErrorLine("Cannot push development version '$STVersion' to NuGet.") + Exit 1 +} + +$packages = @( + 'StringTemplate4' + 'StringTemplate4.Visualizer') + +# Make sure all packages exist before pushing any packages +ForEach ($package in $packages) { + If (-not (Test-Path ".\nuget\$package.$STVersion.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet package: $JarPath") + exit 1 + } + + If (-not (Test-Path ".\nuget\$package.$STVersion.symbols.nupkg")) { + $host.ui.WriteErrorLine("Couldn't locate NuGet symbols package: $JarPath") + exit 1 + } +} + +$nuget = '.\NuGet.exe' + +ForEach ($package in $packages) { + &$nuget 'push' ".\nuget\$package.$STVersion.nupkg" -Source $Source +} diff --git a/build/prep/version.ps1 b/build/prep/version.ps1 new file mode 100644 index 0000000..e8252a8 --- /dev/null +++ b/build/prep/version.ps1 @@ -0,0 +1,2 @@ +$AntlrVersion = "3.5.2-dev" +$STVersion = "4.0.9-dev"
antlr/antlrcs
88f9ca4de1723ba722b15dfc49ff5722b9a4212f
Define the version numbers in the top-level Directory.Build.props
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index e7d6c94..969f36f 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,94 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System.Windows.Forms" /> <Reference Include="WindowsBase" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Update="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Update="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 751f028..6529765 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,91 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index e86ebb7..d24481d 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <Import Project="../Directory.Build.props" /> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <IntermediateOutputPath Condition="'$(TargetFramework)' != ''">obj\$(TargetFramework)\$(Configuration)\</IntermediateOutputPath> <OutputPath Condition="'$(TargetFramework)' != ''">$(MSBuildThisFileDirectory)..\bin\$(Configuration)\$(TargetFramework)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index f92a39e..1890e7d 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,50 +1,50 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 6275dc0..67bbb93 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,393 +1,393 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard2.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Condition="'$(TargetFramework)' != 'netstandard2.0'" Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index e46525e..b6868ab 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,115 +1,115 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>4.0.7.0</Version> - <FileVersion>4.0.9.0</FileVersion> - <InformationalVersion>4.0.9-dev</InformationalVersion> + <Version>$(STVersion)</Version> + <FileVersion>$(STFileVersion)</FileVersion> + <InformationalVersion>$(STInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> - <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(ANTLRInformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <ItemGroup> <Reference Include="System.Xaml" /> </ItemGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 33f95c8..217301f 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,83 +1,83 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>4.0.7.0</Version> - <FileVersion>4.0.9.0</FileVersion> - <InformationalVersion>4.0.9-dev</InformationalVersion> + <Version>$(STVersion)</Version> + <FileVersion>$(STFileVersion)</FileVersion> + <InformationalVersion>$(STInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> - <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(ANTLRInformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index 1be151a..a8b5cf4 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,39 +1,39 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>4.0.6.9004</Version> - <FileVersion>4.0.6.9004</FileVersion> - <InformationalVersion>4.0.6.9004-dev</InformationalVersion> + <Version>$(STVersion)</Version> + <FileVersion>$(STFileVersion)</FileVersion> + <InformationalVersion>$(STInformationalVersion)</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> </ItemGroup> </When> </Choose> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 40499dc..da24b93 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>netstandard2.0;net40</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netstandard2.0'"> <ItemGroup> <PackageReference Include="Microsoft.Build.Framework" Version="14.3" /> <PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3" /> </ItemGroup> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" /> </ItemGroup> </When> </Choose> <ItemGroup> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index f4034fb..e0bf037 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,34 +1,44 @@ <?xml version="1.0" encoding="utf-8"?> <Project> + <PropertyGroup> + <ANTLRVersion>3.5.0.2</ANTLRVersion> + <ANTLRFileVersion>3.5.2.0</ANTLRFileVersion> + <ANTLRInformationalVersion>3.5.2-dev</ANTLRInformationalVersion> + + <STVersion>4.0.7.0</STVersion> + <STFileVersion>4.0.9.0</STFileVersion> + <STInformationalVersion>4.0.9-dev</STInformationalVersion> + </PropertyGroup> + <PropertyGroup> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <BootstrapBuild Condition="'$(BootstrapBuild)' == '' AND Exists('$(MSBuildThisFileDirectory)NuGet.config')">True</BootstrapBuild> </PropertyGroup> <ItemGroup Condition="'$(BootstrapBuild)' == 'true'"> - <PackageReference Include="Antlr3.CodeGenerator" Version="3.5.2-dev" /> + <PackageReference Include="Antlr3.CodeGenerator" Version="$(ANTLRInformationalVersion)" /> </ItemGroup> </Project> diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index 4de84b9..c774128 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20;net40-client;netstandard2.0</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index 740504f..80c3707 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 1b10d5f..e007826 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,143 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj index aefbb1f..b631e5c 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -1,62 +1,62 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20;net40-client;portable40-net40+sl5+win8+wp8+wpa81;netstandard1.1</TargetFrameworks> <RootNamespace>Antlr.Runtime</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> - <Version>3.5.0.2</Version> - <FileVersion>3.5.2.0</FileVersion> - <InformationalVersion>3.5.2-dev</InformationalVersion> + <Version>$(ANTLRVersion)</Version> + <FileVersion>$(ANTLRFileVersion)</FileVersion> + <InformationalVersion>$(ANTLRInformationalVersion)</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.1'"> <PropertyGroup> <DefineConstants>$(DefineConstants);PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <DefineConstants>$(DefineConstants);PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> </When> </Choose> </Project> \ No newline at end of file
antlr/antlrcs
3f68c2e79be258f716568683471dcfaf41610e12
Allow a dictionary to define values for 'keys' and 'values'
diff --git a/Antlr4.StringTemplate/Misc/MapModelAdaptor.cs b/Antlr4.StringTemplate/Misc/MapModelAdaptor.cs index 569de5b..02f40c6 100644 --- a/Antlr4.StringTemplate/Misc/MapModelAdaptor.cs +++ b/Antlr4.StringTemplate/Misc/MapModelAdaptor.cs @@ -1,65 +1,65 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Misc { using IDictionary = System.Collections.IDictionary; public class MapModelAdaptor : IModelAdaptor { public virtual object GetProperty(Interpreter interpreter, TemplateFrame frame, object o, object property, string propertyName) { object value; IDictionary map = (IDictionary)o; if (property == null) value = map[TemplateGroup.DefaultKey]; - else if (property.Equals("keys")) - value = map.Keys; - else if (property.Equals("values")) - value = map.Values; else if (map.Contains(property)) value = map[property]; else if (map.Contains(propertyName)) value = map[propertyName]; // if can't find the key, try ToString version + else if (property.Equals("keys")) + value = map.Keys; + else if (property.Equals("values")) + value = map.Values; else value = map[TemplateGroup.DefaultKey]; // not found, use default if (object.ReferenceEquals(value, TemplateGroup.DictionaryKey)) { value = property; } return value; } } } diff --git a/Antlr4.Test.StringTemplate/TestDictionaries.cs b/Antlr4.Test.StringTemplate/TestDictionaries.cs index 5405633..f0f4131 100644 --- a/Antlr4.Test.StringTemplate/TestDictionaries.cs +++ b/Antlr4.Test.StringTemplate/TestDictionaries.cs @@ -139,514 +139,590 @@ namespace Antlr4.Test.StringTemplate { string templates = "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(type,w,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("w", "L"); st.Add("type", "double"); // double not in typeInit map st.Add("name", "x"); string expecting = "double x = ;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictMissingDefaultValueIsEmptyForNullKey() { string templates = "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(type,w,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("w", "L"); st.Add("type", null); // double not in typeInit map st.Add("name", "x"); string expecting = " x = ;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictHiddenByFormalArg() { string templates = "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(typeInit,type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("type", "int"); st.Add("name", "x"); string expecting = "int x = ;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictEmptyValueAndAngleBracketStrings() { string templates = "typeInit ::= [\"int\":\"0\", \"float\":, \"double\":<<0.0L>>] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("type", "float"); st.Add("name", "x"); string expecting = "float x = ;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictDefaultValue() { string templates = "typeInit ::= [\"int\":\"0\", default:\"null\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("type", "UserRecord"); st.Add("name", "x"); string expecting = "UserRecord x = null;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictNullKeyGetsDefaultValue() { string templates = "typeInit ::= [\"int\":\"0\", default:\"null\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); // missing or set to null: st.Add("type", null); st.Add("name", "x"); string expecting = " x = null;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictEmptyDefaultValue() { string templates = "typeInit ::= [\"int\":\"0\", default:] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); ErrorBuffer errors = new ErrorBuffer(); TemplateGroupFile group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); group.Listener = errors; group.Load(); string expected = "[test.stg 1:33: missing value for key at ']']"; string result = errors.Errors.ToListString(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictDefaultValueIsKey() { string templates = "typeInit ::= [\"int\":\"0\", default:key] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("type", "UserRecord"); st.Add("name", "x"); string expecting = "UserRecord x = UserRecord;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictWithoutIteration() { string templates = "t2(adr,line2={<adr.zip> <adr.city>}) ::= <<" + newline + "<adr.firstname> <adr.lastname>" + newline + "<line2>" + newline + ">>"; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("t2"); st.Add("adr", new Dictionary<string, string>() { {"firstname","Terence"}, {"lastname","Parr"}, {"zip","99999"}, {"city","San Francisco"}, }); string expecting = "Terence Parr" + newline + "99999 San Francisco"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictWithoutIteration2() { string templates = "t2(adr,line2={<adr.zip> <adr.city>}) ::= <<" + newline + "<adr.firstname> <adr.lastname>" + newline + "<line2>" + newline + ">>"; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("t2"); st.Add("adr", new Dictionary<string, string>() { {"firstname","Terence"}, {"lastname","Parr"}, {"zip","99999"}, {"city","San Francisco"}, }); st.Add("line2", new Template("<adr.city>, <adr.zip>")); string expecting = "Terence Parr" + newline + "San Francisco, 99999"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictWithoutIteration3() { string templates = "t2(adr,line2={<adr.zip> <adr.city>}) ::= <<" + newline + "<adr.firstname> <adr.lastname>" + newline + "<line2>" + newline + ">>" + newline + "t3(adr) ::= <<" + newline + "<t2(adr=adr,line2={<adr.city>, <adr.zip>})>" + newline + ">>" + newline; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("t3"); st.Add("adr", new Dictionary<string, string>() { {"firstname","Terence"}, {"lastname","Parr"}, {"zip","99999"}, {"city","San Francisco"}, }); string expecting = "Terence Parr" + newline + "San Francisco, 99999"; string result = st.Render(); Assert.AreEqual(expecting, result); } /** * Test that a map can have only the default entry. */ [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictDefaultStringAsKey() { string templates = "typeInit ::= [\"default\":\"foo\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("var"); st.Add("type", "default"); st.Add("name", "x"); string expecting = "default x = foo;"; string result = st.Render(); Assert.AreEqual(expecting, result); } /** * Test that a map can return a <b>string</b> with the word: default. */ [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictDefaultIsDefaultString() { string templates = "map ::= [default: \"default\"] " + newline + "t() ::= << <map.(\"1\")> >>" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("t"); string expecting = " default "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictViaEnclosingTemplates() { string templates = "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "intermediate(type,name) ::= \"<var(type,name)>\"" + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template st = group.GetInstanceOf("intermediate"); st.Add("type", "int"); st.Add("name", "x"); string expecting = "int x = 0;"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDictViaEnclosingTemplates2() { string templates = "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "intermediate(stuff) ::= \"<stuff>\"" + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; writeFile(tmpdir, "test.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg")); Template interm = group.GetInstanceOf("intermediate"); Template var = group.GetInstanceOf("var"); var.Add("type", "int"); var.Add("name", "x"); interm.Add("stuff", var); string expecting = "int x = 0;"; string result = interm.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestAccessDictionaryFromAnonymousTemplate() { string dir = tmpdir; string g = "a() ::= <<[<[\"foo\",\"a\"]:{x|<if(values.(x))><x><endif>}>]>>\n" + "values ::= [\n" + " \"a\":false,\n" + " default:true\n" + "]\n"; writeFile(dir, "g.stg", g); TemplateGroup group = new TemplateGroupFile(Path.Combine(dir, "g.stg")); Template st = group.GetInstanceOf("a"); string expected = "[foo]"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestAccessDictionaryFromAnonymousTemplateInRegion() { string dir = tmpdir; string g = "a() ::= <<[<@r()>]>>\n" + "@a.r() ::= <<\n" + "<[\"foo\",\"a\"]:{x|<if(values.(x))><x><endif>}>\n" + ">>\n" + "values ::= [\n" + " \"a\":false,\n" + " default:true\n" + "]\n"; writeFile(dir, "g.stg", g); TemplateGroup group = new TemplateGroupFile(Path.Combine(dir, "g.stg")); Template st = group.GetInstanceOf("a"); string expected = "[foo]"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestStringsInDictionary() { string templates = "auxMap ::= [\n" + " \"E\": \"electric <field>\",\n" + " \"I\": \"in <field> between\",\n" + " \"F\": \"<field> force\",\n" + " default: \"<field>\"\n" + "]\n" + "\n" + "makeTmpl(type, field) ::= <<\n" + "<auxMap.(type)>\n" + ">>\n" + "\n" + "top() ::= <<\n" + " <makeTmpl(\"E\", \"foo\")>\n" + " <makeTmpl(\"F\", \"foo\")>\n" + " <makeTmpl(\"I\", \"foo\")>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("top"); Assert.IsNotNull(st); string expecting = " electric <field>" + newline + " <field> force" + newline + " in <field> between"; Assert.AreEqual(expecting, st.Render()); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestTemplatesInDictionary() { string templates = "auxMap ::= [\n" + " \"E\": {electric <field>},\n" + " \"I\": {in <field> between},\n" + " \"F\": {<field> force},\n" + " default: {<field>}\n" + "]\n" + "\n" + "makeTmpl(type, field) ::= <<\n" + "<auxMap.(type)>\n" + ">>\n" + "\n" + "top() ::= <<\n" + " <makeTmpl(\"E\", \"foo\")>\n" + " <makeTmpl(\"F\", \"foo\")>\n" + " <makeTmpl(\"I\", \"foo\")>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("top"); Assert.IsNotNull(st); string expecting = " electric foo" + newline + " foo force" + newline + " in foo between"; Assert.AreEqual(expecting, st.Render()); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDictionaryBehaviorTrue() { string templates = "d ::= [\n" + " \"x\" : true,\n" + " default : false,\n" + "]\n" + "\n" + "t() ::= <<\n" + "<d.(\"x\")><if(d.(\"x\"))>+<else>-<endif>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("t"); string expected = "true+"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDictionaryBehaviorFalse() { string templates = "d ::= [\n" + " \"x\" : false,\n" + " default : false,\n" + "]\n" + "\n" + "t() ::= <<\n" + "<d.(\"x\")><if(d.(\"x\"))>+<else>-<endif>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("t"); string expected = "false-"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDictionaryBehaviorEmptyTemplate() { string templates = "d ::= [\n" + " \"x\" : {},\n" + " default : false,\n" + "]\n" + "\n" + "t() ::= <<\n" + "<d.(\"x\")><if(d.(\"x\"))>+<else>-<endif>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("t"); string expected = "+"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDictionaryBehaviorEmptyList() { string templates = "d ::= [\n" + " \"x\" : [],\n" + " default : false,\n" + "]\n" + "\n" + "t() ::= <<\n" + "<d.(\"x\")><if(d.(\"x\"))>+<else>-<endif>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("t"); string expected = "-"; string result = st.Render(); Assert.AreEqual(expected, result); } /// <summary> /// This is a regression test for antlr/stringtemplate4#114. Before the fix the following test would return /// %hi%. /// </summary> /// <seealso href="https://github.com/antlr/stringtemplate4/issues/114">dictionary value using &lt;% %&gt; is broken</seealso> [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDictionaryBehaviorNoNewlineTemplate() { string templates = "d ::= [\n" + " \"x\" : <%hi%>\n" + "]\n" + "\n" + "t() ::= <<\n" + "<d.x>\n" + ">>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg"); Template st = group.GetInstanceOf("t"); string expected = "hi"; string result = st.Render(); Assert.AreEqual(expected, result); } + + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestDictionarySpecialValues() + { + string templates = @" +t(id) ::= << +<identifier.(id)> +>> + +identifier ::= [ + ""keyword"" : ""@keyword"", + default : key +] +"; + + writeFile(tmpdir, "t.stg", templates); + var group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); + + // try with mapped values + var template = group.GetInstanceOf("t").Add("id", "keyword"); + Assert.AreEqual("@keyword", template.Render()); + + // try with non-mapped values + template = group.GetInstanceOf("t").Add("id", "nonkeyword"); + Assert.AreEqual("nonkeyword", template.Render()); + + // try with non-mapped values that might break (Substring here guarantees unique instances) + template = group.GetInstanceOf("t").Add("id", "_default".Substring(1)); + Assert.AreEqual("default", template.Render()); + + template = group.GetInstanceOf("t").Add("id", "_keys".Substring(1)); + Assert.AreEqual("keyworddefault", template.Render()); + + template = group.GetInstanceOf("t").Add("id", "_values".Substring(1)); + Assert.AreEqual("@keywordkey", template.Render()); + } + + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestDictionarySpecialValuesOverride() + { + string templates = @" +t(id) ::= << +<identifier.(id)> +>> + +identifier ::= [ + ""keyword"" : ""@keyword"", + ""keys"" : ""keys"", + ""values"" : ""values"", + default : key +] +"; + + writeFile(tmpdir, "t.stg", templates); + var group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); + + // try with mapped values + var template = group.GetInstanceOf("t").Add("id", "keyword"); + Assert.AreEqual("@keyword", template.Render()); + + // try with non-mapped values + template = group.GetInstanceOf("t").Add("id", "nonkeyword"); + Assert.AreEqual("nonkeyword", template.Render()); + + // try with non-mapped values that might break (Substring here guarantees unique instances) + template = group.GetInstanceOf("t").Add("id", "_default".Substring(1)); + Assert.AreEqual("default", template.Render()); + + template = group.GetInstanceOf("t").Add("id", "_keys".Substring(1)); + Assert.AreEqual("keys", template.Render()); + + template = group.GetInstanceOf("t").Add("id", "_values".Substring(1)); + Assert.AreEqual("values", template.Render()); + } } }
antlr/antlrcs
5fdba2d5872c35b30453c2031fa3830e928ca49f
Add a netstandard2.0 build of Antlr3 and dependencies
diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj +++ b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj index 6f30a58..a6a71f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 60c9e45..e86ebb7 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,50 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <Import Project="../Directory.Build.props" /> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <IntermediateOutputPath Condition="'$(TargetFramework)' != ''">obj\$(TargetFramework)\$(Configuration)\</IntermediateOutputPath> <OutputPath Condition="'$(TargetFramework)' != ''">$(MSBuildThisFileDirectory)..\bin\$(Configuration)\$(TargetFramework)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <Private>false</Private> + </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index ea1c3b8..6275dc0 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,388 +1,393 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;net40-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard2.0</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'netstandard2.0'"> + <PropertyGroup> + <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> + </PropertyGroup> + </When> </Choose> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> + <ProjectReference Condition="'$(TargetFramework)' != 'netstandard2.0'" Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Codegen/CodeGenerator.cs b/Antlr3/Codegen/CodeGenerator.cs index dd75455..62f1337 100644 --- a/Antlr3/Codegen/CodeGenerator.cs +++ b/Antlr3/Codegen/CodeGenerator.cs @@ -1,1358 +1,1358 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Codegen { using System.Collections.Generic; using System.Linq; using Antlr3.Analysis; using Antlr3.Extensions; using Antlr3.Grammars; -#if DEBUG +#if DEBUG && !NETSTANDARD using Antlr4.StringTemplate.Visualizer.Extensions; #endif using Activator = System.Activator; using ANTLRLexer = Antlr3.Grammars.ANTLRLexer; using ANTLRParser = Antlr3.Grammars.ANTLRParser; using AntlrTool = Antlr3.AntlrTool; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using ArgumentOutOfRangeException = System.ArgumentOutOfRangeException; using AttributeScope = Antlr3.Tool.AttributeScope; using BitSet = Antlr3.Misc.BitSet; using CLSCompliant = System.CLSCompliantAttribute; using CommonToken = Antlr.Runtime.CommonToken; using DFA = Antlr3.Analysis.DFA; using DFAOptimizer = Antlr3.Analysis.DFAOptimizer; using DFAState = Antlr3.Analysis.DFAState; using ErrorManager = Antlr3.Tool.ErrorManager; using Exception = System.Exception; using File = System.IO.File; using FileNotFoundException = System.IO.FileNotFoundException; using Grammar = Antlr3.Tool.Grammar; using GrammarAST = Antlr3.Tool.GrammarAST; using GrammarType = Antlr3.Tool.GrammarType; using IIntSet = Antlr3.Misc.IIntSet; using Interval = Antlr3.Misc.Interval; using IntervalSet = Antlr3.Misc.IntervalSet; using IOException = System.IO.IOException; using ITemplateWriter = Antlr4.StringTemplate.ITemplateWriter; using IToken = Antlr.Runtime.IToken; using Label = Antlr3.Analysis.Label; using LookaheadSet = Antlr3.Analysis.LookaheadSet; using NFAState = Antlr3.Analysis.NFAState; using Path = System.IO.Path; using RecognitionException = Antlr.Runtime.RecognitionException; using Regex = System.Text.RegularExpressions.Regex; using Rule = Antlr3.Tool.Rule; using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers; using Stopwatch = System.Diagnostics.Stopwatch; using StringTemplate = Antlr4.StringTemplate.Template; using TemplateGroup = Antlr4.StringTemplate.TemplateGroup; using ToolTemplateGroupFile = Antlr3.Tool.ToolTemplateGroupFile; using TextWriter = System.IO.TextWriter; using TimeSpan = System.TimeSpan; using Antlr3.Misc; /** ANTLR's code generator. * * Generate recognizers derived from grammars. Language independence * achieved through the use of TemplateGroup objects. All output * strings are completely encapsulated in the group files such as Java.stg. * Some computations are done that are unused by a particular language. * This generator just computes and sets the values into the templates; * the templates are free to use or not use the information. * * To make a new code generation target, define X.stg for language X * by copying from existing Y.stg most closely releated to your language; * e.g., to do CSharp.stg copy Java.stg. The template group file has a * bunch of templates that are needed by the code generator. You can add * a new target w/o even recompiling ANTLR itself. The language=X option * in a grammar file dictates which templates get loaded/used. * * Some language like C need both parser files and header files. Java needs * to have a separate file for the cyclic DFA as ANTLR generates bytecodes * directly (which cannot be in the generated parser Java file). To facilitate * this, * * cyclic can be in same file, but header, output must be searpate. recognizer * is in outptufile. */ public class CodeGenerator { /** When generating SWITCH statements, some targets might need to limit * the size (based upon the number of case labels). Generally, this * limit will be hit only for lexers where wildcard in a UNICODE * vocabulary environment would generate a SWITCH with 65000 labels. */ public static readonly int DefaultMaxSwitchCaseLabels = 300; public static readonly int DefaultMinSwitchAlts = 3; public static readonly int DefaultMaxAcyclicDfaStatesInline = 60; public static int MaxSwitchCaseLabels = DefaultMaxSwitchCaseLabels; public static int MinSwitchAlts = DefaultMinSwitchAlts; public static int MaxAcyclicDfaStatesInline = DefaultMaxAcyclicDfaStatesInline; #if DEBUG public static bool LaunchTemplateInspector = false; #endif public bool GenerateSwitchesWhenPossible = true; /** Which grammar are we generating code for? Each generator * is attached to a specific grammar. */ private readonly Grammar _grammar; /** What language are we generating? */ private readonly string _language; /** The target specifies how to write out files and do other language * specific actions. */ private readonly Target _target; private static readonly Dictionary<string, Target> _targets = new Dictionary<string, Target>(); /** Where are the templates this generator should use to generate code? */ private TemplateGroup _templates; /** The basic output templates without AST or templates stuff; this will be * the templates loaded for the language such as Java.stg *and* the Dbg * stuff if turned on. This is used for generating syntactic predicates. */ private TemplateGroup baseTemplates; private StringTemplate recognizerST; private StringTemplate outputFileST; private StringTemplate headerFileST; /** Used to create unique labels */ private int uniqueLabelNumber = 1; /** A reference to the ANTLR tool so we can learn about output directories * and such. */ private readonly AntlrTool tool; /** Generate debugging event method calls */ private bool debug; /** Create a Tracer object and make the recognizer invoke this. */ private bool trace; /** Track runtime parsing information about decisions etc... * This requires the debugging event mechanism to work. */ private bool profile; private int lineWidth = 72; /** I have factored out the generation of acyclic DFAs to separate class */ private readonly ACyclicDFACodeGenerator _acyclicDFAGenerator; /** I have factored out the generation of cyclic DFAs to separate class */ /* public CyclicDFACodeGenerator cyclicDFAGenerator = new CyclicDFACodeGenerator(this); */ public static readonly string VocabFileExtension = ".tokens"; private const string vocabFilePattern = "<tokens:{it|<it.name>=<it.type>\n}>" + "<literals:{it|<it.name>=<it.type>\n}>"; public CodeGenerator( AntlrTool tool, Grammar grammar, string language ) { if (tool == null) throw new ArgumentNullException("tool"); if (grammar == null) throw new ArgumentNullException("grammar"); this.tool = tool; this._grammar = grammar; this._language = language; _acyclicDFAGenerator = new ACyclicDFACodeGenerator( this ); _target = LoadLanguageTarget( language, tool.TargetsDirectory ); } #region Properties public Grammar Grammar { get { return _grammar; } } public string Language { get { return _language; } } public Target Target { get { return _target; } } [CLSCompliant(false)] public TemplateGroup BaseTemplates { get { return baseTemplates; } } [CLSCompliant(false)] public StringTemplate RecognizerST { get { return outputFileST; } } [CLSCompliant(false)] public TemplateGroup Templates { get { return _templates; } } public string VocabFileName { get { return GetVocabFileName(); } } [CLSCompliant(false)] public bool Debug { get { return debug; } set { debug = value; } } [CLSCompliant(false)] public bool Profile { get { return profile; } set { profile = value; if ( profile ) { // requires debug events Debug = true; } } } [CLSCompliant(false)] public bool Trace { get { return trace; } set { trace = value; } } #endregion public static Target LoadLanguageTarget( string language, string targetsDirectory ) { lock (_targets) { Target target; if (!_targets.TryGetValue(language, out target)) { // first try to load the target via a satellite DLL string assembly = "Antlr3.Targets." + language + ".dll"; string[] paths = { targetsDirectory }; System.Reflection.Assembly targetAssembly = null; System.Type targetType = null; string targetName = "Antlr3.Targets." + language + "Target"; foreach (string path in paths) { string filename = System.IO.Path.Combine(path, assembly); if (System.IO.File.Exists(filename)) { try { targetAssembly = System.Reflection.Assembly.LoadFrom(filename); targetType = targetAssembly.GetType(targetName, false); } catch { } } } // then try to load from the current file if (targetType == null) { targetType = System.Type.GetType(targetName); if (targetType == null) { ErrorManager.Error(ErrorManager.MSG_CANNOT_CREATE_TARGET_GENERATOR, targetName); return null; } } target = (Target)Activator.CreateInstance(targetType); _targets[language] = target; } return target; } } /** load the main language.stg template group file */ public virtual void LoadTemplates( string language ) { string outputOption = (string)this._grammar.GetOption("output") ?? string.Empty; LoadTemplates(tool, language, _grammar.type, outputOption, debug, out baseTemplates, out _templates); } private static readonly Dictionary<string, TemplateGroup> _coreTemplates = new Dictionary<string, TemplateGroup>(); #if AGGREGATE_TEMPLATE_GROUPS private static readonly Dictionary<string, Dictionary<string, TemplateGroup>> _languageBaseTemplates = new Dictionary<string, Dictionary<string, TemplateGroup>>(); #endif private static readonly Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>> _languageTemplates = new Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>>(ObjectReferenceEqualityComparer<TemplateGroup>.Default); private sealed class ObjectReferenceEqualityComparer<T> : EqualityComparer<T> where T : class { private static readonly ObjectReferenceEqualityComparer<T> _default = new ObjectReferenceEqualityComparer<T>(); private ObjectReferenceEqualityComparer() { } public static new ObjectReferenceEqualityComparer<T> Default { get { return _default; } } public override bool Equals(T x, T y) { return object.ReferenceEquals(x, y); } public override int GetHashCode(T obj) { return RuntimeHelpers.GetHashCode(obj); } } private static void LoadTemplates(AntlrTool tool, string language, GrammarType grammarType, string outputOption, bool debug, out TemplateGroup baseTemplates, out TemplateGroup templates) { // first load main language template TemplateGroup coreTemplates = GetOrCacheTemplateGroup(tool, language, null, null); baseTemplates = coreTemplates; outputOption = outputOption ?? string.Empty; // dynamically add subgroups that act like filters to apply to // their supergroup. E.g., Java:Dbg:AST:ASTParser::ASTDbg. if (outputOption.Equals("AST")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", dbgTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } TemplateGroup astDbgTemplates = GetOrCacheTemplateGroup(tool, language, "ASTDbg", astParserTemplates); templates = astDbgTemplates; } else { TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", coreTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } templates = astParserTemplates; } } else if (outputOption.Equals("template")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup stTemplates = GetOrCacheTemplateGroup(tool, language, "ST", dbgTemplates); templates = stTemplates; } else { templates = GetOrCacheTemplateGroup(tool, language, "ST", coreTemplates); } } else if (debug && grammarType != GrammarType.Lexer) { templates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = templates; } else { templates = coreTemplates; } } private static TemplateGroup GetOrCacheTemplateGroup(AntlrTool tool, string language, string name, TemplateGroup superGroup) { if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group; if (_coreTemplates.TryGetValue(language, out group)) return group; } else { Dictionary<string, TemplateGroup> languageTemplates; if (_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { TemplateGroup group; if (languageTemplates.TryGetValue(name, out group)) return group; } } string[] templateDirectories = { tool.TemplatesDirectory, Path.Combine(tool.TemplatesDirectory, language) }; return CacheTemplateGroup(templateDirectories, language, name, superGroup); } #if AGGREGATE_TEMPLATE_GROUPS private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { TemplateGroup baseTemplateGroup; if (string.IsNullOrEmpty(name)) { _coreTemplates.TryGetValue(language, out baseTemplateGroup); } else { Dictionary<string, TemplateGroup> baseTemplates; if (!_languageBaseTemplates.TryGetValue(language, out baseTemplates)) { baseTemplates = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = baseTemplates; } baseTemplates.TryGetValue(name, out baseTemplateGroup); } if (baseTemplateGroup == null) { baseTemplateGroup = CacheBaseTemplateGroup(templateDirectories, language, name); } if (superGroup == null) return baseTemplateGroup; TemplateGroup group = new TemplateGroup(); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; group.ImportTemplates(baseTemplateGroup); group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> languageTemplates; if (!_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { languageTemplates = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = languageTemplates; } languageTemplates[name] = group; return group; } private static TemplateGroup CacheBaseTemplateGroup(string[] templateDirectories, string language, string name) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name)) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; Dictionary<string, TemplateGroup> groups; if (!_languageBaseTemplates.TryGetValue(language, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = groups; } groups[name] = group; return group; } } #else private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); #if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; #endif group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); #if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; #endif group.IterateAcrossValues = true; group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> groups; if (!_languageTemplates.TryGetValue(superGroup, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = groups; } groups[name] = group; return group; } } #endif internal static string FindTemplateFile(string[] templateDirectories, string fileName) { foreach (var directory in templateDirectories) { string templateFileName = Path.Combine(directory, fileName); if (File.Exists(templateFileName)) return templateFileName; } throw new FileNotFoundException(); } /** Given the grammar to which we are attached, walk the AST associated * with that grammar to create NFAs. Then create the DFAs for all * decision points in the grammar by converting the NFAs to DFAs. * Finally, walk the AST again to generate code. * * Either 1 or 2 files are written: * * recognizer: the main parser/lexer/treewalker item * header file: language like C/C++ need extern definitions * * The target, such as JavaTarget, dictates which files get written. */ public virtual StringTemplate GenRecognizer() { //JSystem.@out.println("### generate "+grammar.name+" recognizer"); // LOAD OUTPUT TEMPLATES LoadTemplates( _language ); if ( _templates == null ) { return null; } // CREATE NFA FROM GRAMMAR, CREATE DFA FROM NFA if ( ErrorManager.DoNotAttemptAnalysis() ) { return null; } _target.PerformGrammarAnalysis( this, _grammar ); // some grammar analysis errors will not yield reliable DFA if ( ErrorManager.DoNotAttemptCodeGen() ) { return null; } // OPTIMIZE DFA DFAOptimizer optimizer = new DFAOptimizer( _grammar ); optimizer.Optimize(); // OUTPUT FILE (contains recognizerST) outputFileST = _templates.GetInstanceOf( "outputFile" ); // HEADER FILE if ( _templates.IsDefined( "headerFile" ) ) { headerFileST = _templates.GetInstanceOf( "headerFile" ); } else { // create a dummy to avoid null-checks all over code generator headerFileST = new StringTemplate( _templates, string.Empty ); // it normally sees this from outputFile headerFileST.Add("cyclicDFAs", null); headerFileST.impl.Name = "dummy-header-file"; } bool filterMode = _grammar.GetOption( "filter" ) != null && _grammar.GetOption( "filter" ).Equals( "true" ); bool canBacktrack = _grammar.composite.RootGrammar.atLeastOneBacktrackOption || _grammar.SyntacticPredicates != null || filterMode; // TODO: move this down further because generating the recognizer // alters the model with info on who uses predefined properties etc... // The actions here might refer to something. // The only two possible output files are available at this point. // Verify action scopes are ok for target and dump actions into output // Templates can say <actions.parser.header> for example. var actions = _grammar.Actions; VerifyActionScopesOkForTarget( actions ); // translate $x::y references TranslateActionAttributeReferences( actions ); StringTemplate gateST = _templates.GetInstanceOf( "actionGate" ); if ( filterMode ) { // if filtering, we need to set actions to execute at backtracking // level 1 not 0. gateST = _templates.GetInstanceOf( "filteringActionGate" ); } _grammar.SetSynPredGateIfNotAlready( gateST ); headerFileST.SetAttribute( "actions", actions ); outputFileST.SetAttribute( "actions", actions ); headerFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); outputFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); headerFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); headerFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); outputFileST.SetAttribute( "backtracking", canBacktrack ); headerFileST.SetAttribute( "backtracking", canBacktrack ); // turn on memoize attribute at grammar level so we can create ruleMemo. // each rule has memoize attr that hides this one, indicating whether // it needs to save results string memoize = (string)_grammar.GetOption( "memoize" ); outputFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); headerFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); outputFileST.SetAttribute( "trace", trace ); headerFileST.SetAttribute( "trace", trace ); outputFileST.SetAttribute( "profile", profile ); headerFileST.SetAttribute( "profile", profile ); // RECOGNIZER if ( _grammar.type == GrammarType.Lexer ) { recognizerST = _templates.GetInstanceOf( "lexer" ); outputFileST.SetAttribute( "LEXER", true ); headerFileST.SetAttribute( "LEXER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } else if ( _grammar.type == GrammarType.Parser || _grammar.type == GrammarType.Combined ) { recognizerST = _templates.GetInstanceOf( "parser" ); outputFileST.SetAttribute( "PARSER", true ); headerFileST.SetAttribute( "PARSER", true ); } else { recognizerST = _templates.GetInstanceOf( "treeParser" ); outputFileST.SetAttribute( "TREE_PARSER", true ); headerFileST.SetAttribute( "TREE_PARSER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } outputFileST.SetAttribute( "recognizer", recognizerST ); headerFileST.SetAttribute( "recognizer", recognizerST ); outputFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); headerFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); string targetAppropriateFileNameString = _target.GetTargetStringLiteralFromString( _grammar.FileName ); outputFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); headerFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); outputFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyInformationalVersion ); headerFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyInformationalVersion ); outputFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); headerFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); { // GENERATE RECOGNIZER // Walk the AST holding the input grammar, this time generating code // Decisions are generated by using the precomputed DFAs // Fill in the various templates with data CodeGenTreeWalker gen = new CodeGenTreeWalker( new Antlr.Runtime.Tree.CommonTreeNodeStream( _grammar.Tree ) ); try { gen.grammar_( _grammar, recognizerST, outputFileST, headerFileST ); } catch ( RecognitionException re ) { ErrorManager.Error( ErrorManager.MSG_BAD_AST_STRUCTURE, re ); } } GenTokenTypeConstants( recognizerST ); GenTokenTypeConstants( outputFileST ); GenTokenTypeConstants( headerFileST ); if ( _grammar.type != GrammarType.Lexer ) { GenTokenTypeNames( recognizerST ); GenTokenTypeNames( outputFileST ); GenTokenTypeNames( headerFileST ); } // Now that we know what synpreds are used, we can set into template HashSet<string> synpredNames = null; if ( _grammar.synPredNamesUsedInDFA.Count > 0 ) { synpredNames = _grammar.synPredNamesUsedInDFA; } outputFileST.SetAttribute( "synpreds", synpredNames ); headerFileST.SetAttribute( "synpreds", synpredNames ); // all recognizers can see Grammar object recognizerST.SetAttribute( "grammar", _grammar ); // do not render templates to disk if errors occurred if (ErrorManager.GetErrorState().errors > 0) return null; -#if DEBUG +#if DEBUG && !NETSTANDARD if (CodeGenerator.LaunchTemplateInspector) { outputFileST.Visualize(); if (_templates.IsDefined("headerFile")) headerFileST.Visualize(); } #endif // WRITE FILES try { _target.GenRecognizerFile( tool, this, _grammar, outputFileST ); if ( _templates.IsDefined( "headerFile" ) ) { StringTemplate extST = _templates.GetInstanceOf( "headerFileExtension" ); _target.GenRecognizerHeaderFile( tool, this, _grammar, headerFileST, extST.Render() ); } // write out the vocab interchange file; used by antlr, // does not change per target StringTemplate tokenVocabSerialization = GenTokenVocabOutput(); string vocabFileName = VocabFileName; if ( vocabFileName != null ) { Write( tokenVocabSerialization, vocabFileName ); } //JSystem.@out.println(outputFileST.getDOTForDependencyGraph(false)); } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe ); } /* JSystem.@out.println("num obj.prop refs: "+ ASTExpr.totalObjPropRefs); JSystem.@out.println("num reflection lookups: "+ ASTExpr.totalReflectionLookups); */ return outputFileST; } /** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected virtual void VerifyActionScopesOkForTarget( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; if ( !_target.IsValidActionScope( _grammar.type, scope ) ) { // get any action from the scope to get error location var scopeActions = action.Value; GrammarAST actionAST = scopeActions.Values.Cast<GrammarAST>().First(); ErrorManager.GrammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE, _grammar, actionAST.Token, scope, _grammar.GrammarTypeString ); } } } /** Actions may reference $x::y attributes, call translateAction on * each action and replace that action in the Map. */ protected virtual void TranslateActionAttributeReferences( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; var scopeActions = action.Value; TranslateActionAttributeReferencesForSingleScope( null, scopeActions ); } } /** Use for translating rule @init{...} actions that have no scope */ protected internal virtual void TranslateActionAttributeReferencesForSingleScope( Rule r, IDictionary<string,object> scopeActions ) { string ruleName = null; if ( r != null ) { ruleName = r.Name; } foreach ( var scopeAction in scopeActions.ToArray() ) { string name = scopeAction.Key; object action = scopeAction.Value; GrammarAST actionAST = action as GrammarAST; IList<object> chunks = TranslateAction( ruleName, actionAST ); scopeActions[name] = chunks; // replace with translation } } /** Error recovery in ANTLR recognizers. * * Based upon original ideas: * * Algorithms + Data Structures = Programs by Niklaus Wirth * * and * * A note on error recovery in recursive descent parsers: * http://portal.acm.org/citation.cfm?id=947902.947905 * * Later, Josef Grosch had some good ideas: * Efficient and Comfortable Error Recovery in Recursive Descent Parsers: * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip * * Like Grosch I implemented local FOLLOW sets that are combined at run-time * upon error to avoid parsing overhead. */ public virtual void GenerateLocalFollow( GrammarAST referencedElementNode, string referencedElementName, string enclosingRuleName, int elementIndex ) { if (elementIndex < 0) { throw new ArgumentOutOfRangeException("elementIndex", "elementIndex cannot be less than zero."); } /* JSystem.@out.println("compute FOLLOW "+grammar.name+"."+referencedElementNode.toString()+ " for "+referencedElementName+"#"+elementIndex +" in "+ enclosingRuleName+ " line="+referencedElementNode.getLine()); */ NFAState followingNFAState = referencedElementNode.followingNFAState; LookaheadSet follow = null; if ( followingNFAState != null ) { // compute follow for this element and, as side-effect, track // the rule LOOK sensitivity. follow = _grammar.First( followingNFAState ); } if ( follow == null ) { ErrorManager.InternalError( "no follow state or cannot compute follow" ); follow = new LookaheadSet(); } if ( follow.Member( Label.EOF ) ) { // TODO: can we just remove? Seems needed here: // compilation_unit : global_statement* EOF // Actually i guess we resync to EOF regardless follow.Remove( Label.EOF ); } //JSystem.@out.println(" "+follow); IList<int> tokenTypeList = null; ulong[] words = null; if ( follow.TokenTypeSet == null ) { words = new ulong[1]; tokenTypeList = new List<int>(); } else { BitSet bits = BitSet.Of( follow.TokenTypeSet ); words = bits.ToPackedArray(); tokenTypeList = follow.TokenTypeSet.ToList(); } // use the target to convert to hex strings (typically) string[] wordStrings = new string[words.Length]; for ( int j = 0; j < words.Length; j++ ) { ulong w = words[j]; wordStrings[j] = _target.GetTarget64BitStringFromValue( w ); } recognizerST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); outputFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); headerFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); } // L O O K A H E A D D E C I S I O N G E N E R A T I O N /** Generate code that computes the predicted alt given a DFA. The * recognizerST can be either the main generated recognizerTemplate * for storage in the main parser file or a separate file. It's up to * the code that ultimately invokes the codegen.g grammar rule. * * Regardless, the output file and header file get a copy of the DFAs. */ public virtual StringTemplate GenLookaheadDecision( StringTemplate recognizerST, DFA dfa ) { StringTemplate decisionST; // If we are doing inline DFA and this one is acyclic and LL(*) // I have to check for is-non-LL(*) because if non-LL(*) the cyclic // check is not done by DFA.verify(); that is, verify() avoids // doesStateReachAcceptState() if non-LL(*) if ( dfa.CanInlineDecision ) { decisionST = _acyclicDFAGenerator.GenFixedLookaheadDecision( Templates, dfa ); } else { // generate any kind of DFA here (cyclic or acyclic) dfa.CreateStateTables( this ); outputFileST.SetAttribute( "cyclicDFAs", dfa ); headerFileST.SetAttribute( "cyclicDFAs", dfa ); decisionST = _templates.GetInstanceOf( "dfaDecision" ); string description = dfa.NFADecisionStartState.Description; description = _target.GetTargetStringLiteralFromString( description ); if ( description != null ) { decisionST.SetAttribute( "description", description ); } decisionST.SetAttribute( "decisionNumber", dfa.NfaStartStateDecisionNumber ); } return decisionST; } /** A special state is huge (too big for state tables) or has a predicated * edge. Generate a simple if-then-else. Cannot be an accept state as * they have no emanating edges. Don't worry about switch vs if-then-else * because if you get here, the state is super complicated and needs an * if-then-else. This is used by the new DFA scheme created June 2006. */ public virtual StringTemplate GenerateSpecialState( DFAState s ) { StringTemplate stateST; stateST = _templates.GetInstanceOf( "cyclicDFAState" ); stateST.SetAttribute( "needErrorClause", true ); stateST.SetAttribute( "semPredState", s.IsResolvedWithPredicates ); stateST.SetAttribute( "stateNumber", s.StateNumber ); stateST.SetAttribute( "decisionNumber", s.Dfa.DecisionNumber ); bool foundGatedPred = false; StringTemplate eotST = null; for ( int i = 0; i < s.NumberOfTransitions; i++ ) { Transition edge = (Transition)s.GetTransition( i ); StringTemplate edgeST; if ( edge.Label.Atom == Label.EOT ) { // this is the default clause; has to held until last edgeST = _templates.GetInstanceOf( "eotDFAEdge" ); stateST.RemoveAttribute( "needErrorClause" ); eotST = edgeST; } else { edgeST = _templates.GetInstanceOf( "cyclicDFAEdge" ); StringTemplate exprST = GenLabelExpr( _templates, edge, 1 ); edgeST.SetAttribute( "labelExpr", exprST ); } edgeST.SetAttribute( "edgeNumber", i + 1 ); edgeST.SetAttribute( "targetStateNumber", edge.Target.StateNumber ); // stick in any gated predicates for any edge if not already a pred if ( !edge.Label.IsSemanticPredicate ) { DFAState t = (DFAState)edge.Target; SemanticContext preds = t.GetGatedPredicatesInNFAConfigurations(); if ( preds != null ) { foundGatedPred = true; StringTemplate predST = preds.GenExpr( this, Templates, t.Dfa ); edgeST.SetAttribute( "predicates", predST.Render() ); } } if ( edge.Label.Atom != Label.EOT ) { stateST.SetAttribute( "edges", edgeST ); } } if ( foundGatedPred ) { // state has >= 1 edge with a gated pred (syn or sem) // must rewind input first, set flag. stateST.SetAttribute( "semPredState", foundGatedPred ); } if ( eotST != null ) { stateST.SetAttribute( "edges", eotST ); } return stateST; } /** Generate an expression for traversing an edge. */ protected internal virtual StringTemplate GenLabelExpr( TemplateGroup templates, Transition edge, int k ) { Label label = edge.Label; if ( label.IsSemanticPredicate ) { return GenSemanticPredicateExpr( templates, edge ); } if ( label.IsSet ) { return GenSetExpr( templates, label.Set, k, true ); } // must be simple label StringTemplate eST = templates.GetInstanceOf( "lookaheadTest" ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( label.Atom ) ); eST.SetAttribute( "atomAsInt", label.Atom ); eST.SetAttribute( "k", k ); return eST; } protected internal virtual StringTemplate GenSemanticPredicateExpr( TemplateGroup templates, Transition edge ) { DFA dfa = ( (DFAState)edge.Target ).Dfa; // which DFA are we in Label label = edge.Label; SemanticContext semCtx = label.SemanticContext; return semCtx.GenExpr( this, templates, dfa ); } /** For intervals such as [3..3, 30..35], generate an expression that * tests the lookahead similar to LA(1)==3 || (LA(1)>=30&amp;&amp;LA(1)&lt;=35) */ public virtual StringTemplate GenSetExpr( TemplateGroup templates, IIntSet set, int k, bool partOfDFA ) { if ( !( set is IntervalSet ) ) { throw new ArgumentException( "unable to generate expressions for non IntervalSet objects" ); } IntervalSet iset = (IntervalSet)set; if ( iset.Intervals == null || iset.Intervals.Count == 0 ) { StringTemplate emptyST = new StringTemplate( templates, "" ); emptyST.impl.Name = "empty-set-expr"; return emptyST; } string testSTName = "lookaheadTest"; string testRangeSTName = "lookaheadRangeTest"; string testSetSTName = "lookaheadSetTest"; string varSTName = "lookaheadVarName"; if (!partOfDFA) { testSTName = "isolatedLookaheadTest"; testRangeSTName = "isolatedLookaheadRangeTest"; testSetSTName = "isolatedLookaheadSetTest"; varSTName = "isolatedLookaheadVarName"; } StringTemplate setST = templates.GetInstanceOf( "setTest" ); // If the SetTest template exists, separate the ranges: // flatten the small ones into one list and make that a range, // and leave the others as they are. if (templates.IsDefined(testSetSTName)) { // Flatten the IntervalSet into a list of integers. StringTemplate sST = templates.GetInstanceOf(testSetSTName); int rangeNumber2 = 1; foreach (Interval I in iset.Intervals) { int a = I.a; int b = I.b; // Not flattening the large ranges helps us avoid making a // set that contains 90% of Unicode when we could just use // a simple range like (LA(1)>=123 && LA(1)<=65535). // This flattens all ranges of length 4 or less. if (b - a < 4) { for (int i = a; i <= b; i++) { sST.Add("values", GetTokenTypeAsTargetLabel(i)); sST.Add("valuesAsInt", i); } } else { StringTemplate eST = templates.GetInstanceOf(testRangeSTName); eST.Add("lower", GetTokenTypeAsTargetLabel(a)); eST.Add("lowerAsInt", a); eST.Add("upper", GetTokenTypeAsTargetLabel(b)); eST.Add("upperAsInt", b); eST.Add("rangeNumber", rangeNumber2); eST.Add("k", k); setST.Add("ranges", eST); rangeNumber2++; } } sST.Add("k", k); setST.Add("ranges", sST); return setST; } int rangeNumber = 1; foreach ( Interval I in iset.Intervals ) { int a = I.a; int b = I.b; StringTemplate eST; if ( a == b ) { eST = templates.GetInstanceOf( testSTName ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "atomAsInt", a ); //eST.setAttribute("k",Utils.integer(k)); } else { eST = templates.GetInstanceOf( testRangeSTName ); eST.SetAttribute( "lower", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "lowerAsInt", a ); eST.SetAttribute( "upper", GetTokenTypeAsTargetLabel( b ) ); eST.SetAttribute( "upperAsInt", b ); eST.SetAttribute( "rangeNumber", rangeNumber ); } eST.SetAttribute( "k", k ); setST.SetAttribute( "ranges", eST ); rangeNumber++; } return setST; } // T O K E N D E F I N I T I O N G E N E R A T I O N /** Set attributes tokens and literals attributes in the incoming * code template. This is not the token vocab interchange file, but * rather a list of token type ID needed by the recognizer. */ protected virtual void GenTokenTypeConstants( StringTemplate code ) { // make constants for the token types foreach (var token in _grammar.composite.TokenIDToTypeMap.OrderBy(i => i.Value)) { if (token.Value == Label.EOF || token.Value >= Label.MIN_TOKEN_TYPE) code.SetAttribute("tokens.{name,type}", token.Key, token.Value); } } /** Generate a token names table that maps token type to a printable * name: either the label like INT or the literal like "begin". */ protected virtual void GenTokenTypeNames( StringTemplate code ) { for ( int t = Label.MIN_TOKEN_TYPE; t <= _grammar.MaxTokenType; t++ ) { string tokenName = _grammar.GetTokenDisplayName( t ); if ( tokenName != null ) { tokenName = _target.GetTargetStringLiteralFromString( tokenName, true ); code.SetAttribute( "tokenNames", tokenName ); } } } /** Get a meaningful name for a token type useful during code generation. * Literals without associated names are converted to the string equivalent * of their integer values. Used to generate x==ID and x==34 type comparisons * etc... Essentially we are looking for the most obvious way to refer * to a token type in the generated code. If in the lexer, return the * char literal translated to the target language. For example, ttype=10 * will yield '\n' from the getTokenDisplayName method. That must * be converted to the target languages literals. For most C-derived * languages no translation is needed. */ public virtual string GetTokenTypeAsTargetLabel( int ttype ) { if ( _grammar.type == GrammarType.Lexer ) { string name = _grammar.GetTokenDisplayName( ttype ); return _target.GetTargetCharLiteralFromANTLRCharLiteral( this, name ); } return _target.GetTokenTypeAsTargetLabel( this, ttype ); } /** Generate a token vocab file with all the token names/types. For example: * ID=7 * FOR=8 * 'for'=8 * * This is independent of the target language; used by antlr internally */ protected virtual StringTemplate GenTokenVocabOutput() { StringTemplate vocabFileST = new StringTemplate( vocabFilePattern ); // "define" literals arg vocabFileST.Add("literals", null); vocabFileST.Add("tokens", null); vocabFileST.impl.Name = "vocab-file"; // make constants for the token names foreach ( string tokenID in _grammar.TokenIDs ) { int tokenType = _grammar.GetTokenType( tokenID ); if ( tokenType >= Label.MIN_TOKEN_TYPE ) { vocabFileST.SetAttribute( "tokens.{name,type}", tokenID, tokenType ); } diff --git a/Antlr3/Tool/Strip.cs b/Antlr3/Tool/Strip.cs index f25a959..676f3d7 100644 --- a/Antlr3/Tool/Strip.cs +++ b/Antlr3/Tool/Strip.cs @@ -1,317 +1,318 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Tool { using System.Collections.Generic; - using ANTLRFileStream = Antlr.Runtime.ANTLRFileStream; + using ANTLRStringStream = Antlr.Runtime.ANTLRStringStream; using ANTLRReaderStream = Antlr.Runtime.ANTLRReaderStream; using ANTLRLexer = Antlr3.Grammars.ANTLRLexer; using ANTLRParser = Antlr3.Grammars.ANTLRParser; + using File = System.IO.File; using ICharStream = Antlr.Runtime.ICharStream; using CommonTree = Antlr.Runtime.Tree.CommonTree; using Console = System.Console; using IToken = Antlr.Runtime.IToken; using TokenRewriteStream = Antlr.Runtime.TokenRewriteStream; using ITreeAdaptor = Antlr.Runtime.Tree.ITreeAdaptor; using TreeWizard = Antlr.Runtime.Tree.TreeWizard; /** A basic action stripper. */ public class Strip { protected string filename; protected TokenRewriteStream tokens; protected bool tree_option = false; protected string[] args; #if BUILD_STRIPTOOL public static void Main( string[] args ) { Strip s = new Strip( args ); s.ParseAndRewrite(); Console.Out.WriteLine( s.tokens ); } #endif public Strip( string[] args ) { this.args = args; } public virtual TokenRewriteStream GetTokenStream() { return tokens; } public virtual void ParseAndRewrite() { ProcessArgs( args ); ICharStream input = null; if ( filename != null ) { - input = new ANTLRFileStream( filename ); + input = new ANTLRStringStream( File.ReadAllText(filename), filename ); } else { input = new ANTLRReaderStream( Console.In, ANTLRReaderStream.InitialBufferSize, ANTLRReaderStream.ReadBufferSize ); } // BUILD AST ANTLRLexer lex = new ANTLRLexer( input ); tokens = new TokenRewriteStream( lex ); ANTLRParser g = new ANTLRParser( tokens ); Grammar grammar = new Grammar(); var r = g.grammar_( grammar ); CommonTree t = (CommonTree)r.Tree; if ( tree_option ) Console.Out.WriteLine( t.ToStringTree() ); Rewrite( g.TreeAdaptor, t, g.TokenNames ); } public virtual void Rewrite( ITreeAdaptor adaptor, CommonTree t, string[] tokenNames ) { TreeWizard wiz = new TreeWizard( adaptor, tokenNames ); // ACTIONS STUFF wiz.Visit( t, ANTLRParser.ACTION, ( tree ) => { ACTION( tokens, (CommonTree)tree ); } ); // ^('@' id ACTION) rule actions wiz.Visit( t, ANTLRParser.AMPERSAND, ( tree ) => { CommonTree a = (CommonTree)t; CommonTree action = null; if (a.ChildCount == 2) { action = (CommonTree)a.GetChild(1); } else if (a.ChildCount == 3) { action = (CommonTree)a.GetChild(2); } if ( action.Type == ANTLRParser.ACTION ) { tokens.Delete( a.TokenStartIndex, a.TokenStopIndex ); KillTrailingNewline( tokens, action.TokenStopIndex ); } } ); wiz.Visit( t, ANTLRParser.ACTION, ( tree ) => { } ); // wipe rule arguments wiz.Visit( t, ANTLRParser.ARG, ( tree ) => { CommonTree a = (CommonTree)t; a = (CommonTree)a.GetChild( 0 ); tokens.Delete( a.Token.TokenIndex ); KillTrailingNewline( tokens, a.Token.TokenIndex ); } ); // wipe rule return declarations wiz.Visit( t, ANTLRParser.RET, ( tree ) => { CommonTree a = (CommonTree)t; CommonTree ret = (CommonTree)a.GetChild( 0 ); tokens.Delete( a.Token.TokenIndex, ret.Token.TokenIndex ); } ); // comment out semantic predicates wiz.Visit( t, ANTLRParser.SEMPRED, ( tree ) => { CommonTree a = (CommonTree)t; tokens.Replace( a.Token.TokenIndex, "/*" + a.Text + "*/" ); } ); // comment out semantic predicates wiz.Visit( t, ANTLRParser.GATED_SEMPRED, ( tree ) => { CommonTree a = (CommonTree)t; string text = tokens.ToString( a.TokenStartIndex, a.TokenStopIndex ); tokens.Replace( a.TokenStartIndex, a.TokenStopIndex, "/*" + text + "*/" ); } ); // comment scope specs wiz.Visit( t, ANTLRParser.SCOPE, ( tree ) => { CommonTree a = (CommonTree)t; tokens.Delete( a.TokenStartIndex, a.TokenStopIndex ); KillTrailingNewline( tokens, a.TokenStopIndex ); } ); // args r[x,y] -> ^(r [x,y]) wiz.Visit( t, ANTLRParser.ARG_ACTION, ( tree ) => { CommonTree a = (CommonTree)t; if ( a.Parent.Type == ANTLRParser.RULE_REF ) tokens.Delete( a.TokenStartIndex, a.TokenStopIndex ); } ); #if false // what is this token type in the C# ported version of the V3 grammar? // ^('=' id ^(RULE_REF [arg])), ... wiz.Visit( t, ANTLRParser.LABEL_ASSIGN, ( tree ) => { CommonTree a = (CommonTree)t; if ( !a.HasAncestor( ANTLRParser.OPTIONS ) ) { // avoid options CommonTree child = (CommonTree)a.GetChild( 0 ); // kill "id=" tokens.Delete( a.token.TokenIndex ); tokens.Delete( child.token.TokenIndex ); } } ); #endif #if false // what is this token type in the C# ported version of the V3 grammar? // ^('+=' id ^(RULE_REF [arg])), ... wiz.Visit( t, ANTLRParser.LIST_LABEL_ASSIGN, ( tree ) => { CommonTree a = (CommonTree)t; CommonTree child = (CommonTree)a.GetChild( 0 ); // kill "id+=" tokens.Delete( a.token.TokenIndex ); tokens.Delete( child.token.TokenIndex ); } ); #endif // AST STUFF wiz.Visit( t, ANTLRParser.REWRITE, ( tree ) => { CommonTree a = (CommonTree)t; CommonTree child = (CommonTree)a.GetChild( 0 ); int stop = child.TokenStopIndex; if ( child.Type == ANTLRParser.SEMPRED ) { CommonTree rew = (CommonTree)a.GetChild( 1 ); stop = rew.TokenStopIndex; } tokens.Delete( a.Token.TokenIndex, stop ); KillTrailingNewline( tokens, stop ); } ); wiz.Visit( t, ANTLRParser.ROOT, ( tree ) => { tokens.Delete( ( (CommonTree)t ).Token.TokenIndex ); } ); wiz.Visit( t, ANTLRParser.BANG, ( tree ) => { tokens.Delete( ( (CommonTree)t ).Token.TokenIndex ); } ); } public static void ACTION( TokenRewriteStream tokens, CommonTree t ) { CommonTree parent = (CommonTree)t.Parent; int ptype = parent.Type; if ( ptype == ANTLRParser.SCOPE || // we have special rules for these ptype == ANTLRParser.AMPERSAND ) { return; } //Console.Out.WriteLine( "ACTION: " + t.Text ); CommonTree root = (CommonTree)t.GetAncestor( ANTLRParser.RULE ); if ( root != null ) { CommonTree rule = (CommonTree)root.GetChild( 0 ); //Console.Out.WriteLine( "rule: " + rule ); if ( Rule.GetRuleType( rule.Text ) == RuleType.Parser ) { tokens.Delete( t.TokenStartIndex, t.TokenStopIndex ); KillTrailingNewline( tokens, t.Token.TokenIndex ); } } } private static void KillTrailingNewline( TokenRewriteStream tokens, int index ) { IList<IToken> all = tokens.GetTokens(); IToken tok = all[index]; IToken after = all[index + 1]; string ws = after.Text; if ( ws.StartsWith( "\n" ) ) { //Console.Out.WriteLine( "killing WS after action" ); if ( ws.Length > 1 ) { int space = ws.IndexOf( ' ' ); int tab = ws.IndexOf( '\t' ); if ( ws.StartsWith( "\n" ) && space >= 0 || tab >= 0 ) { return; // do nothing if \n + indent } // otherwise kill all \n ws = ws.Replace( "\n", "" ); tokens.Replace( after.TokenIndex, ws ); } else { tokens.Delete( after.TokenIndex ); } } } public virtual void ProcessArgs( string[] args ) { if ( args == null || args.Length == 0 ) { Help(); return; } for ( int i = 0; i < args.Length; i++ ) { if ( args[i].Equals( "-tree" ) ) tree_option = true; else { if ( args[i][0] != '-' ) { // Must be the grammar file filename = args[i]; } } } } private static void Help() { Console.Error.WriteLine( "usage: java org.antlr.tool.Strip [args] file.g" ); Console.Error.WriteLine( " -tree print out ANTLR grammar AST" ); } } } diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index 75b6ebf..4de84b9 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net20;net40-client</TargetFrameworks> + <TargetFrameworks>net20;net40-client;netstandard2.0</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
c85040f7d39877fb3ecc3b04d860873d92fb33e6
Add a net40-client build of the tool and dependencies
diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj +++ b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj index d2086db..6f30a58 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 1085148..60c9e45 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,42 +1,50 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <Import Project="../Directory.Build.props" /> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> - <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> + <IntermediateOutputPath Condition="'$(TargetFramework)' != ''">obj\$(TargetFramework)\$(Configuration)\</IntermediateOutputPath> + <OutputPath Condition="'$(TargetFramework)' != ''">$(MSBuildThisFileDirectory)..\bin\$(Configuration)\$(TargetFramework)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> </Choose> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 58ca2d8..ea1c3b8 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,382 +1,388 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> - <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> </Choose> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 671e767..e46525e 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,104 +1,115 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + + <ItemGroup> + <Reference Include="System.Xaml" /> + </ItemGroup> + </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index d81a06b..33f95c8 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,76 +1,83 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/Antlr3.props b/AntlrBuildTask/Antlr3.props index f7891c7..2924108 100644 --- a/AntlrBuildTask/Antlr3.props +++ b/AntlrBuildTask/Antlr3.props @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" ?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> </PropertyGroup> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>.</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\tools\net40</AntlrBuildTaskPath> <!-- Path to the ANTLR tool itself --> - <AntlrToolPath>..\tools\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(AntlrBuildTaskPath)\Antlr3.exe</AntlrToolPath> </PropertyGroup> </Project> diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 9c26f8c..4d30682 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,42 +1,41 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> - <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net40'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" /> </ItemGroup> </When> </Choose> <ItemGroup> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index 64ed1c0..75b6ebf 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,43 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net20</TargetFrameworks> + <TargetFrameworks>net20;net40-client</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> + <Choose> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + <ItemGroup> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index 4ac9891..740504f 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,29 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFrameworks>net35-client</TargetFrameworks> + <TargetFrameworks>net35-client;net40-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> </Choose> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/build/prep/Antlr3.CodeGenerator.nuspec b/build/prep/Antlr3.CodeGenerator.nuspec index 9dd26d2..b562b46 100644 --- a/build/prep/Antlr3.CodeGenerator.nuspec +++ b/build/prep/Antlr3.CodeGenerator.nuspec @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3.CodeGenerator</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2010 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> </metadata> <files> <!-- Tools --> - <file src="..\..\bin\$Configuration$\Antlr3.exe" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.pdb" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.exe.config" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.Runtime.Debug.dll" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.Runtime.Debug.pdb" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.Runtime.dll" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr3.Runtime.pdb" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr4.StringTemplate.dll" target="tools"/> - <file src="..\..\bin\$Configuration$\Antlr4.StringTemplate.pdb" target="tools"/> - <file src="..\..\bin\$Configuration$\Codegen\Templates\*.stg" target="tools\Codegen\Templates"/> - <file src="..\..\bin\$Configuration$\Codegen\Templates\CSharp2\*.stg" target="tools\Codegen\Templates\CSharp2"/> - <file src="..\..\bin\$Configuration$\Codegen\Templates\CSharp3\*.stg" target="tools\Codegen\Templates\CSharp3"/> - <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp2.dll" target="tools\Targets"/> - <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp2.pdb" target="tools\Targets"/> - <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp3.dll" target="tools\Targets"/> - <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp3.pdb" target="tools\Targets"/> - <file src="..\..\bin\$Configuration$\Tool\Templates\**\*.stg" target="tools\Tool\Templates"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.exe" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.pdb" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.exe.config" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.Runtime.Debug.dll" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.Runtime.Debug.pdb" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.Runtime.dll" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr3.Runtime.pdb" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr4.StringTemplate.dll" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Antlr4.StringTemplate.pdb" target="tools\net40"/> + <file src="..\..\bin\$Configuration$\net40-client\Codegen\Templates\*.stg" target="tools\net40\Codegen\Templates"/> + <file src="..\..\bin\$Configuration$\net40-client\Codegen\Templates\CSharp2\*.stg" target="tools\net40\Codegen\Templates\CSharp2"/> + <file src="..\..\bin\$Configuration$\net40-client\Codegen\Templates\CSharp3\*.stg" target="tools\net40\Codegen\Templates\CSharp3"/> + <file src="..\..\bin\$Configuration$\net40-client\Targets\Antlr3.Targets.CSharp2.dll" target="tools\net40\Targets"/> + <file src="..\..\bin\$Configuration$\net40-client\Targets\Antlr3.Targets.CSharp2.pdb" target="tools\net40\Targets"/> + <file src="..\..\bin\$Configuration$\net40-client\Targets\Antlr3.Targets.CSharp3.dll" target="tools\net40\Targets"/> + <file src="..\..\bin\$Configuration$\net40-client\Targets\Antlr3.Targets.CSharp3.pdb" target="tools\net40\Targets"/> + <file src="..\..\bin\$Configuration$\net40-client\Tool\Templates\**\*.stg" target="tools\net40\Tool\Templates"/> <!-- Build Configuration --> - <file src="..\..\bin\$Configuration$\Antlr3.props" target="build\Antlr3.CodeGenerator.props" /> - <file src="..\..\bin\$Configuration$\Antlr3.targets" target="build\Antlr3.CodeGenerator.targets" /> - <file src="..\..\bin\$Configuration$\AntlrBuildTask.dll" target="build" /> - <file src="..\..\bin\$Configuration$\AntlrBuildTask.pdb" target="build" /> - <file src="..\..\bin\$Configuration$\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> - <file src="..\..\bin\$Configuration$\Rules\Antlr3.xml" target="build\Rules" /> - <file src="..\..\bin\$Configuration$\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> - <file src="..\..\bin\$Configuration$\Rules\AntlrTokens.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\net40\Antlr3.props" target="build\Antlr3.CodeGenerator.props" /> + <file src="..\..\bin\$Configuration$\net40\Antlr3.targets" target="build\Antlr3.CodeGenerator.targets" /> + <file src="..\..\bin\$Configuration$\net40\AntlrBuildTask.dll" target="tools\net40" /> + <file src="..\..\bin\$Configuration$\net40\AntlrBuildTask.pdb" target="tools\net40" /> + <file src="..\..\bin\$Configuration$\net40\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\net40\Rules\Antlr3.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\net40\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\net40\Rules\AntlrTokens.xml" target="build\Rules" /> </files> </package> diff --git a/build/prep/Antlr3.Runtime.Debug.nuspec b/build/prep/Antlr3.Runtime.Debug.nuspec index 558b30f..8ee75c3 100644 --- a/build/prep/Antlr3.Runtime.Debug.nuspec +++ b/build/prep/Antlr3.Runtime.Debug.nuspec @@ -1,34 +1,38 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime.Debug</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The library includes the debug support for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime (Debug Library)</title> <summary>The optional debug component library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.dll" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.xml" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net40-client\Antlr3.Runtime.Debug.dll" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net40-client\Antlr3.Runtime.Debug.pdb" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net40-client\Antlr3.Runtime.Debug.xml" target="lib\net40-client"/> + <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime.Debug\**\*.cs" target="src"/> </files> </package> diff --git a/build/prep/StringTemplate4.Visualizer.nuspec b/build/prep/StringTemplate4.Visualizer.nuspec index 3c9a8b0..c6f1f04 100644 --- a/build/prep/StringTemplate4.Visualizer.nuspec +++ b/build/prep/StringTemplate4.Visualizer.nuspec @@ -1,38 +1,42 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4.Visualizer</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>Provides the visualizer runtime for StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 stviz template</tags> <title>StringTemplate 4 Visualizer</title> <summary>Provides the visualizer runtime for StringTemplate 4.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="StringTemplate4" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.dll" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.xml" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net40-client\Antlr4.StringTemplate.Visualizer.dll" target="lib\net40-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net40-client\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net40-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net40-client\Antlr4.StringTemplate.Visualizer.xml" target="lib\net40-client"/> + <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate.Visualizer\obj\**\*.cs" src="..\..\Antlr4.StringTemplate.Visualizer\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\**\*.xaml" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> </files> </package> diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index fe3d9d0..69ddcf1 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,48 +1,54 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> <group targetFramework="net35-client"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </group> <group targetFramework="netstandard1.3"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.dll" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.xml" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net40-client\Antlr4.StringTemplate.dll" target="lib\net40-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net40-client\Antlr4.StringTemplate.pdb" target="lib\net40-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net40-client\Antlr4.StringTemplate.xml" target="lib\net40-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.cs" target="src\obj\$Configuration$\net35-client"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.tokens" target="src\obj\$Configuration$\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net40-client\**\*.cs" target="src\obj\$Configuration$\net40-client"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net40-client\**\*.tokens" target="src\obj\$Configuration$\net40-client"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.cs" target="src\obj\$Configuration$\netstandard"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.tokens" target="src\obj\$Configuration$\netstandard"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 22334c7..b248430 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,258 +1,258 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger, [switch]$NoValidate ) $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Make sure we don't have a stray config file from the bootstrap build If (Test-Path '..\..\NuGet.config') { Remove-Item '..\..\NuGet.config' } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # Build Antlr3.CodeGenerator so we can use it for the boostrap build .\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package prior to bootstrap, Aborting!") exit 1 } # build the project again with the new bootstrap files copy -force '..\..\NuGet.config.bootstrap' '..\..\NuGet.config' .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") Remove-Item '..\..\NuGet.config' exit 1 } Remove-Item '..\..\NuGet.config' # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\Runtime" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\Runtime" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" -copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.exe" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.exe.config" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { - copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" + copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } -copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" -copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" -copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" -copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" -copy "..\..\bin\$BuildConfig\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" -copy "..\..\bin\$BuildConfig\Rules\AntlrTokens.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\net40\Antlr3.props" ".\Tool" +copy "..\..\bin\$BuildConfig\net40\Antlr3.targets" ".\Tool" +copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\net40\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\net40\Rules\Antlr3.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\net40\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\net40\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder -copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { - copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" + copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } -copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.Debug.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { - copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" + copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } -copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\net40\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" -copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" -copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" -copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" -copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" -copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" +copy -r "..\..\bin\$BuildConfig\net35-client\Codegen\*" ".\Tool\Codegen" +copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.dll" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.pdb" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\net35-client\Targets\*.xml" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\net35-client\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" -copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" -copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" -copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" -copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" -copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" -copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" +copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" +copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" +copy "..\..\bin\$BuildConfig\net35-client\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" +copy "..\..\bin\$BuildConfig\net35-client\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" +copy "..\..\bin\$BuildConfig\net35-client\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" +copy -r "..\..\bin\$BuildConfig\net35-client\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" -copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\net35-client\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } # Validate the build If (-not $NoValidate) { #git 'clean' '-dxf' '..\Validation' #dotnet 'run' '--project' '..\Validation\DotnetValidation.csproj' '--framework' 'netcoreapp1.1' #if (-not $?) { # $host.ui.WriteErrorLine('Build failed, aborting!') # Exit $LASTEXITCODE #} git 'clean' '-dxf' '..\Validation' .\NuGet.exe 'restore' '..\Validation' &$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '..\Validation\DotnetValidation.sln' if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net20\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net30\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net35\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net40\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\portable40-net40+sl5+win8+wp8+wpa81\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net45\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } }
antlr/antlrcs
b5b784ad2057721a641df46809a441b3014fdbd4
Bootstrap the main build through the Antlr3.CodeGenerator NuGet package
diff --git a/Directory.Build.props b/Directory.Build.props index 1286156..f4034fb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,26 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + <PropertyGroup> + <BootstrapBuild Condition="'$(BootstrapBuild)' == '' AND Exists('$(MSBuildThisFileDirectory)NuGet.config')">True</BootstrapBuild> + </PropertyGroup> + + <ItemGroup Condition="'$(BootstrapBuild)' == 'true'"> + <PackageReference Include="Antlr3.CodeGenerator" Version="3.5.2-dev" /> + </ItemGroup> + </Project> diff --git a/Directory.Build.targets b/Directory.Build.targets index b5e3064..ebb80fd 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <ItemGroup> <None Condition="'$(SignAssembly)' == 'true'" Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> - <PropertyGroup> + <PropertyGroup Condition="'$(BootstrapBuild)' != 'true'"> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.targets" /> + <Import Condition="'$(BootstrapBuild)' != 'true'" Project="$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.targets" /> </Project> diff --git a/NuGet.config.bootstrap b/NuGet.config.bootstrap new file mode 100644 index 0000000..d845650 --- /dev/null +++ b/NuGet.config.bootstrap @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <config> + <add key="globalPackagesFolder" value="packages" /> + </config> + <packageSources> + <add key="Local Build" value=".\build\prep\nuget" /> + </packageSources> +</configuration> diff --git a/build/Validation/Directory.Build.props b/build/Validation/Directory.Build.props new file mode 100644 index 0000000..341027f --- /dev/null +++ b/build/Validation/Directory.Build.props @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> +</Project> diff --git a/build/Validation/Directory.Build.targets b/build/Validation/Directory.Build.targets new file mode 100644 index 0000000..341027f --- /dev/null +++ b/build/Validation/Directory.Build.targets @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> +</Project> diff --git a/build/prep/Antlr3.CodeGenerator.nuspec b/build/prep/Antlr3.CodeGenerator.nuspec index f7560ca..9dd26d2 100644 --- a/build/prep/Antlr3.CodeGenerator.nuspec +++ b/build/prep/Antlr3.CodeGenerator.nuspec @@ -1,36 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3.CodeGenerator</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2010 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> </metadata> <files> <!-- Tools --> - <file src="Bootstrap\**\*.*" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.exe" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.pdb" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.exe.config" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.Runtime.Debug.dll" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.Runtime.Debug.pdb" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.Runtime.dll" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr3.Runtime.pdb" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr4.StringTemplate.dll" target="tools"/> + <file src="..\..\bin\$Configuration$\Antlr4.StringTemplate.pdb" target="tools"/> + <file src="..\..\bin\$Configuration$\Codegen\Templates\*.stg" target="tools\Codegen\Templates"/> + <file src="..\..\bin\$Configuration$\Codegen\Templates\CSharp2\*.stg" target="tools\Codegen\Templates\CSharp2"/> + <file src="..\..\bin\$Configuration$\Codegen\Templates\CSharp3\*.stg" target="tools\Codegen\Templates\CSharp3"/> + <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp2.dll" target="tools\Targets"/> + <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp2.pdb" target="tools\Targets"/> + <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp3.dll" target="tools\Targets"/> + <file src="..\..\bin\$Configuration$\Targets\Antlr3.Targets.CSharp3.pdb" target="tools\Targets"/> + <file src="..\..\bin\$Configuration$\Tool\Templates\**\*.stg" target="tools\Tool\Templates"/> <!-- Build Configuration --> - <file src="Tool\Antlr3.props" target="build\Antlr3.CodeGenerator.props"/> - <file src="Tool\Antlr3.targets" target="build\Antlr3.CodeGenerator.targets"/> - <file src="Tool\AntlrBuildTask.dll" target="build"/> - <file src="Tool\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> - <file src="Tool\Rules\Antlr3.xml" target="build\Rules" /> - <file src="Tool\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> - <file src="Tool\Rules\AntlrTokens.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\Antlr3.props" target="build\Antlr3.CodeGenerator.props" /> + <file src="..\..\bin\$Configuration$\Antlr3.targets" target="build\Antlr3.CodeGenerator.targets" /> + <file src="..\..\bin\$Configuration$\AntlrBuildTask.dll" target="build" /> + <file src="..\..\bin\$Configuration$\AntlrBuildTask.pdb" target="build" /> + <file src="..\..\bin\$Configuration$\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\Rules\Antlr3.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> + <file src="..\..\bin\$Configuration$\Rules\AntlrTokens.xml" target="build\Rules" /> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 633b0ca..22334c7 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,309 +1,258 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger, [switch]$NoValidate ) +$AntlrVersion = "3.5.2-dev" +$STVersion = "4.0.9-dev" + # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } +# Make sure we don't have a stray config file from the bootstrap build +If (Test-Path '..\..\NuGet.config') { + Remove-Item '..\..\NuGet.config' +} + # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" -# copy the new bootstrap files -if ($DebugBuild) { - $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" -} -else { - $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" -} - -$BootstrapBinaries | ForEach-Object { - copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" - If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 - } -} - -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { - mkdir "..\Bootstrap\Codegen\Templates\CSharp2" -} - -copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" -If (-not $?) { - $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') - exit 1 -} - -copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" -If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit 1 -} - -copy -r -force "..\..\bin\$BuildConfig\Rules\*" "..\Bootstrap" +# Build Antlr3.CodeGenerator so we can use it for the boostrap build +.\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { - $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + $host.ui.WriteErrorLine("Failed to create NuGet package prior to bootstrap, Aborting!") exit 1 } -Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" - # build the project again with the new bootstrap files +copy -force '..\..\NuGet.config.bootstrap' '..\..\NuGet.config' +.\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") + Remove-Item '..\..\NuGet.config' exit 1 } +Remove-Item '..\..\NuGet.config' + # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages -$AntlrVersion = "3.5.2-dev" -$STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } # Validate the build If (-not $NoValidate) { #git 'clean' '-dxf' '..\Validation' #dotnet 'run' '--project' '..\Validation\DotnetValidation.csproj' '--framework' 'netcoreapp1.1' #if (-not $?) { # $host.ui.WriteErrorLine('Build failed, aborting!') # Exit $LASTEXITCODE #} git 'clean' '-dxf' '..\Validation' .\NuGet.exe 'restore' '..\Validation' &$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '..\Validation\DotnetValidation.sln' if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net20\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net30\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net35\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net40\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\portable40-net40+sl5+win8+wp8+wpa81\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net45\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } }
antlr/antlrcs
b0d30ce7d15aa3897efac5eaf341281efeef4abf
Move the ANTLR 3 code generator to its own package
diff --git a/Antlr3.sln b/Antlr3.sln index bac5ed4..86a33e2 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,231 +1,232 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject + build\prep\Antlr3.CodeGenerator.nuspec = build\prep\Antlr3.CodeGenerator.nuspec build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/build/prep/Antlr3.CodeGenerator.nuspec b/build/prep/Antlr3.CodeGenerator.nuspec new file mode 100644 index 0000000..f7560ca --- /dev/null +++ b/build/prep/Antlr3.CodeGenerator.nuspec @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata minClientVersion="2.5"> + <id>Antlr3.CodeGenerator</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2010 or newer.</description> + <language>en-us</language> + <projectUrl>https://github.com/antlr/antlrcs</projectUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>antlr antlr3 parsing</tags> + <title>ANTLR 3</title> + <summary>The C# target of the ANTLR 3 parser generator.</summary> + <developmentDependency>true</developmentDependency> + </metadata> + <files> + <!-- Tools --> + + <file src="Bootstrap\**\*.*" target="tools"/> + + <!-- Build Configuration --> + + <file src="Tool\Antlr3.props" target="build\Antlr3.CodeGenerator.props"/> + <file src="Tool\Antlr3.targets" target="build\Antlr3.CodeGenerator.targets"/> + <file src="Tool\AntlrBuildTask.dll" target="build"/> + <file src="Tool\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> + <file src="Tool\Rules\Antlr3.xml" target="build\Rules" /> + <file src="Tool\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> + <file src="Tool\Rules\AntlrTokens.xml" target="build\Rules" /> + </files> +</package> diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index 495ca74..6855ec8 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,39 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2010 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> <dependencies> + <dependency id="Antlr3.CodeGenerator" version="$version$" /> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> - <!-- Tools --> - - <file src="Bootstrap\**\*.*" target="tools"/> - - <!-- Build Configuration --> - - <file src="Tool\Antlr3.props" target="build"/> - <file src="Tool\Antlr3.targets" target="build"/> - <file src="Tool\AntlrBuildTask.dll" target="build"/> - <file src="Tool\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> - <file src="Tool\Rules\Antlr3.xml" target="build\Rules" /> - <file src="Tool\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> - <file src="Tool\Rules\AntlrTokens.xml" target="build\Rules" /> + <file src="..\..\LICENSE.txt" target="tools" /> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 66ad1db..633b0ca 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,303 +1,309 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger, [switch]$NoValidate ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Rules\*" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages +.\NuGet.exe pack .\Antlr3.CodeGenerator.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit 1 +} + .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } # Validate the build If (-not $NoValidate) { #git 'clean' '-dxf' '..\Validation' #dotnet 'run' '--project' '..\Validation\DotnetValidation.csproj' '--framework' 'netcoreapp1.1' #if (-not $?) { # $host.ui.WriteErrorLine('Build failed, aborting!') # Exit $LASTEXITCODE #} git 'clean' '-dxf' '..\Validation' .\NuGet.exe 'restore' '..\Validation' &$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '..\Validation\DotnetValidation.sln' if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net20\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net30\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net35\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net40\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\portable40-net40+sl5+win8+wp8+wpa81\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } "..\Validation\bin\$BuildConfig\net45\DotnetValidation.exe" if (-not $?) { $host.ui.WriteErrorLine('Build failed, aborting!') Exit 1 } }
antlr/antlrcs
22bdad3e722156ee4aaada4febcf6db60e6304e3
Set EnableDefaultAntlrItems to false at the top level
diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index d190676..751f028 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,92 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> - <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 9c27f59..58ca2d8 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,383 +1,382 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> - <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 34933f7..d81a06b 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,77 +1,76 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> - <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 261beb2..1286156 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,24 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> + <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> </Project> diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 8c4cee8..1b10d5f 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,144 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> - <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
92d4508d42dedbaeaa84f942ec9aed97372f8581
Fix warnings in documentation comments that were previously ignored
diff --git a/Antlr3.Targets/Antlr3.Targets.C/CTarget.cs b/Antlr3.Targets/Antlr3.Targets.C/CTarget.cs index 74ef2d3..aaf70d2 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/CTarget.cs +++ b/Antlr3.Targets/Antlr3.Targets.C/CTarget.cs @@ -1,314 +1,314 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Targets { using System.Collections.Generic; using Antlr3.Extensions; using CodeGenerator = Antlr3.Codegen.CodeGenerator; using Grammar = Antlr3.Tool.Grammar; using GrammarType = Antlr3.Tool.GrammarType; using StringBuilder = System.Text.StringBuilder; using StringTemplate = Antlr4.StringTemplate.Template; using Target = Antlr3.Codegen.Target; public class CTarget : Target { List<string> _strings = new List<string>(); protected override void GenRecognizerFile( AntlrTool tool, CodeGenerator generator, Grammar grammar, StringTemplate outputFileST ) { // Before we write this, and cause it to generate its string, // we need to add all the string literals that we are going to match // outputFileST.SetAttribute( "literals", _strings ); string fileName = generator.GetRecognizerFileName( grammar.name, grammar.type ); generator.Write( outputFileST, fileName ); } protected override void GenRecognizerHeaderFile( AntlrTool tool, CodeGenerator generator, Grammar grammar, StringTemplate headerFileST, string extName ) { // Pick up the file name we are generating. This method will return a // a file suffixed with .c, so we must substring and add the extName // to it as we cannot assign into strings in Java. - /// + // string fileName = generator.GetRecognizerFileName( grammar.name, grammar.type ); fileName = fileName.Substring( 0, fileName.Length - 2 ) + extName; generator.Write( headerFileST, fileName ); } /** Is scope in @scope::name {action} valid for this kind of grammar? * Targets like C++ may want to allow new scopes like headerfile or * some such. The action names themselves are not policed at the * moment so targets can add template actions w/o having to recompile * ANTLR. */ public override bool IsValidActionScope( GrammarType grammarType, string scope ) { switch ( grammarType ) { case GrammarType.Lexer: switch ( scope ) { case "lexer": case "header": case "includes": case "preincludes": case "overrides": return true; } break; case GrammarType.Parser: switch ( scope ) { case "parser": case "header": case "includes": case "preincludes": case "overrides": return true; } break; case GrammarType.Combined: switch ( scope ) { case "parser": case "lexer": case "header": case "includes": case "preincludes": case "overrides": return true; } break; case GrammarType.TreeParser: switch ( scope ) { case "treeparser": case "header": case "includes": case "preincludes": case "overrides": return true; } break; } return false; } public override string GetTargetCharLiteralFromANTLRCharLiteral( CodeGenerator generator, string literal ) { if ( literal.StartsWith( "'\\u" ) ) { literal = "0x" + literal.Substring( 3, 4 ); } else { int c = literal[1]; if ( c < 32 || c > 127 ) { literal = "0x" + c.ToString( "x" ); } } return literal; } /** Convert from an ANTLR string literal found in a grammar file to * an equivalent string literal in the C target. * Because we must support Unicode character sets and have chosen * to have the lexer match UTF32 characters, then we must encode * string matches to use 32 bit character arrays. Here then we * must produce the C array and cater for the case where the * lexer has been encoded with a string such as 'xyz\n', */ public override string GetTargetStringLiteralFromANTLRStringLiteral( CodeGenerator generator, string literal ) { int index; string bytes; StringBuilder buf = new StringBuilder(); buf.Append( "{ " ); // We need ot lose any escaped characters of the form \x and just // replace them with their actual values as well as lose the surrounding // quote marks. // for ( int i = 1; i < literal.Length - 1; i++ ) { buf.Append( "0x" ); if ( literal[i] == '\\' ) { i++; // Assume that there is a next character, this will just yield // invalid strings if not, which is what the input would be of course - invalid switch ( literal[i] ) { case 'u': case 'U': buf.Append( literal.Substring( i + 1, 4 ) ); // Already a hex string i = i + 5; // Move to next string/char/escape break; case 'n': case 'N': buf.Append( "0A" ); break; case 'r': case 'R': buf.Append( "0D" ); break; case 't': case 'T': buf.Append( "09" ); break; case 'b': case 'B': buf.Append( "08" ); break; case 'f': case 'F': buf.Append( "0C" ); break; default: // Anything else is what it is! // buf.Append( ( (int)literal[i] ).ToString( "X" ) ); break; } } else { buf.Append( ( (int)literal[i] ).ToString( "X" ) ); } buf.Append( ", " ); } buf.Append( " ANTLR3_STRING_TERMINATOR}" ); bytes = buf.ToString(); index = _strings.IndexOf( bytes ); if ( index == -1 ) { _strings.Add( bytes ); index = _strings.IndexOf( bytes ); } string strref = "lit_" + ( index + 1 ).ToString(); return strref; } /// <summary> /// Overrides the standard grammar analysis so we can prepare the analyser /// a little differently from the other targets. /// /// In particular we want to influence the way the code generator makes assumptions about /// switchs vs ifs, vs table driven DFAs. In general, C code should be generated that /// has the minimum use of tables, and tha meximum use of large switch statements. This /// allows the optimizers to generate very efficient code, it can reduce object code size /// by about 30% and give about a 20% performance improvement over not doing this. Hence, /// for the C target only, we change the defaults here, but only if they are still set to the /// defaults. /// </summary> /// <param name="generator">An instance of the generic code generator class.</param> /// <param name="grammar">The grammar that we are currently analyzing.</param> protected override void PerformGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Check to see if the maximum inline DFA states is still set to // the default size. If it is then whack it all the way up to the maximum that // we can sensibly get away with. // if (CodeGenerator.MaxAcyclicDfaStatesInline == CodeGenerator.DefaultMaxAcyclicDfaStatesInline) { CodeGenerator.MaxAcyclicDfaStatesInline = 65535; } // Check to see if the maximum switch size is still set to the default // and bring it up much higher if it is. Modern C compilers can handle // much bigger switch statements than say Java can and if anyone finds a compiler // that cannot deal with such big switches, all the need do is generate the // code with a reduced -Xmaxswitchcaselabels nnn // if (CodeGenerator.MaxSwitchCaseLabels == CodeGenerator.DefaultMaxSwitchCaseLabels) { CodeGenerator.MaxSwitchCaseLabels = 3000; } // Check to see if the number of transitions considered a miminum for using // a switch is still at the default. Because a switch is still generally faster than // an if even with small sets, and given that the optimizer will do the best thing with it // anyway, then we simply want to generate a switch for any number of states. // if (CodeGenerator.MinSwitchAlts == CodeGenerator.DefaultMinSwitchAlts) { CodeGenerator.MinSwitchAlts = 1; } // Now we allow the superclass implementation to do whatever it feels it // must do. // base.PerformGrammarAnalysis(generator, grammar); } } } diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/CPPTarget.cs b/Antlr3.Targets/Antlr3.Targets.Cpp/CPPTarget.cs index c27992a..71b4bb4 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/CPPTarget.cs +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/CPPTarget.cs @@ -1,413 +1,413 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Targets { using System.Collections.Generic; using Aggregate = Antlr4.StringTemplate.Misc.Aggregate; using CodeGenerator = Antlr3.Codegen.CodeGenerator; using Grammar = Antlr3.Tool.Grammar; using GrammarType = Antlr3.Tool.GrammarType; using StringBuilder = System.Text.StringBuilder; using StringTemplate = Antlr4.StringTemplate.Template; using Target = Antlr3.Codegen.Target; public class CPPTarget : Target { List<string> strings = new List<string>(); protected override void GenRecognizerFile(AntlrTool tool, CodeGenerator generator, Grammar grammar, StringTemplate outputFileST) { // Before we write this, and cause it to generate its string, // we need to add all the string literals that we are going to match // outputFileST.Add("literals", strings); string fileName = generator.GetRecognizerFileName(grammar.name, grammar.type); generator.Write(outputFileST, fileName); } protected override void GenRecognizerHeaderFile(AntlrTool tool, CodeGenerator generator, Grammar grammar, StringTemplate headerFileST, string extName) { //Its better we remove the EOF Token, as it would have been defined everywhere in C. //we define it later as "EOF_TOKEN" instead of "EOF" IList<object> tokens = (IList<object>)headerFileST.GetAttribute("tokens"); for (int i = 0; i < tokens.Count; ++i) { bool can_break = false; object tok = tokens[i]; if (tok is Aggregate) { Aggregate atok = (Aggregate)tok; foreach (var pair in atok.Properties) { if (pair.Value.Equals("EOF")) { tokens.RemoveAt(i); can_break = true; break; } } } if (can_break) break; } // Pick up the file name we are generating. This method will return a // a file suffixed with .c, so we must substring and add the extName // to it as we cannot assign into strings in Java. - /// + // string fileName = generator.GetRecognizerFileName(grammar.name, grammar.type); fileName = fileName.Substring(0, fileName.Length - 4) + extName; generator.Write(headerFileST, fileName); } protected StringTemplate chooseWhereCyclicDFAsGo(AntlrTool tool, CodeGenerator generator, Grammar grammar, StringTemplate recognizerST, StringTemplate cyclicDFAST) { return recognizerST; } /** Is scope in @scope::name {action} valid for this kind of grammar? * Targets like C++ may want to allow new scopes like headerfile or * some such. The action names themselves are not policed at the * moment so targets can add template actions w/o having to recompile * ANTLR. */ public override bool IsValidActionScope(GrammarType grammarType, string scope) { switch (grammarType) { case GrammarType.Lexer: if (scope == "lexer") { return true; } if (scope == "header") { return true; } if (scope == "includes") { return true; } if (scope == "preincludes") { return true; } if (scope == "overrides") { return true; } if (scope == "namespace") { return true; } break; case GrammarType.Parser: if (scope == "parser") { return true; } if (scope == "header") { return true; } if (scope == "includes") { return true; } if (scope == "preincludes") { return true; } if (scope == "overrides") { return true; } if (scope == "namespace") { return true; } break; case GrammarType.Combined: if (scope == "parser") { return true; } if (scope == "lexer") { return true; } if (scope == "header") { return true; } if (scope == "includes") { return true; } if (scope == "preincludes") { return true; } if (scope == "overrides") { return true; } if (scope == "namespace") { return true; } break; case GrammarType.TreeParser: if (scope == "treeparser") { return true; } if (scope == "header") { return true; } if (scope == "includes") { return true; } if (scope == "preincludes") { return true; } if (scope == "overrides") { return true; } if (scope == "namespace") { return true; } break; } return false; } public override string GetTargetCharLiteralFromANTLRCharLiteral( CodeGenerator generator, string literal) { if (literal.StartsWith("'\\u")) { literal = "0x" + literal.Substring(3, 4); } else { int c = literal[1]; if (c < 32 || c > 127) { literal = "0x" + c.ToString("X"); } } return literal; } /** Convert from an ANTLR string literal found in a grammar file to * an equivalent string literal in the C target. * Because we must support Unicode character sets and have chosen * to have the lexer match UTF32 characters, then we must encode * string matches to use 32 bit character arrays. Here then we * must produce the C array and cater for the case where the * lexer has been encoded with a string such as 'xyz\n', */ public override string GetTargetStringLiteralFromANTLRStringLiteral( CodeGenerator generator, string literal) { int index; string bytes; StringBuilder buf = new StringBuilder(); buf.Append("{ "); // We need ot lose any escaped characters of the form \x and just // replace them with their actual values as well as lose the surrounding // quote marks. // for (int i = 1; i < literal.Length - 1; i++) { buf.Append("0x"); if (literal[i] == '\\') { i++; // Assume that there is a next character, this will just yield // invalid strings if not, which is what the input would be of course - invalid switch (literal[i]) { case 'u': case 'U': buf.Append(literal.Substring(i + 1, 4)); // Already a hex string i = i + 5; // Move to next string/char/escape break; case 'n': case 'N': buf.Append("0A"); break; case 'r': case 'R': buf.Append("0D"); break; case 't': case 'T': buf.Append("09"); break; case 'b': case 'B': buf.Append("08"); break; case 'f': case 'F': buf.Append("0C"); break; default: // Anything else is what it is! // buf.Append(((int)literal[i]).ToString("X")); break; } } else { buf.Append(((int)literal[i]).ToString("X")); } buf.Append(", "); } buf.Append(" antlr3::ANTLR_STRING_TERMINATOR}"); bytes = buf.ToString(); index = strings.IndexOf(bytes); if (index == -1) { strings.Add(bytes); index = strings.IndexOf(bytes); } string strref = "lit_" + (index + 1); return strref; } /** * Overrides the standard grammar analysis so we can prepare the analyser * a little differently from the other targets. * * In particular we want to influence the way the code generator makes assumptions about * switchs vs ifs, vs table driven DFAs. In general, C code should be generated that * has the minimum use of tables, and tha meximum use of large switch statements. This * allows the optimizers to generate very efficient code, it can reduce object code size * by about 30% and give about a 20% performance improvement over not doing this. Hence, * for the C target only, we change the defaults here, but only if they are still set to the * defaults. * * @param generator An instance of the generic code generator class. * @param grammar The grammar that we are currently analyzing */ protected override void PerformGrammarAnalysis(CodeGenerator generator, Grammar grammar) { // Check to see if the maximum inline DFA states is still set to // the default size. If it is then whack it all the way up to the maximum that // we can sensibly get away with. // if (CodeGenerator.MaxAcyclicDfaStatesInline == CodeGenerator.DefaultMaxAcyclicDfaStatesInline) { CodeGenerator.MaxAcyclicDfaStatesInline = 65535; } // Check to see if the maximum switch size is still set to the default // and bring it up much higher if it is. Modern C compilers can handle // much bigger switch statements than say Java can and if anyone finds a compiler // that cannot deal with such big switches, all the need do is generate the // code with a reduced -Xmaxswitchcaselabels nnn // if (CodeGenerator.MaxSwitchCaseLabels == CodeGenerator.DefaultMaxSwitchCaseLabels) { CodeGenerator.MaxSwitchCaseLabels = 3000; } // Check to see if the number of transitions considered a miminum for using // a switch is still at the default. Because a switch is still generally faster than // an if even with small sets, and given that the optimizer will do the best thing with it // anyway, then we simply want to generate a switch for any number of states. // if (CodeGenerator.MinSwitchAlts == CodeGenerator.DefaultMinSwitchAlts) { CodeGenerator.MinSwitchAlts = 1; } // Now we allow the superclass implementation to do whatever it feels it // must do. // base.PerformGrammarAnalysis(generator, grammar); } } } diff --git a/Antlr3.Test/StringTemplateTests.cs b/Antlr3.Test/StringTemplateTests.cs index 4930679..1c0c686 100644 --- a/Antlr3.Test/StringTemplateTests.cs +++ b/Antlr3.Test/StringTemplateTests.cs @@ -3812,1049 +3812,1049 @@ namespace AntlrUnitTests string result = b.ToString(); //System.err.println("result='"+result+"'"); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestDefaultArgumentAsTemplate2() { string templates = "group test;" + newline + "method(name,size) ::= <<" + newline + "<stat(...)>" + newline + ">>" + newline + "stat(name,value={ [<name>] }) ::= \"x=<value>; // <name>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate b = group.GetInstanceOf( "method" ); b.SetAttribute( "name", "foo" ); b.SetAttribute( "size", "2" ); string expecting = "x= [foo] ; // foo"; string result = b.ToString(); //System.err.println("result='"+result+"'"); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestDoNotUseDefaultArgument() { string templates = "group test;" + newline + "method(name) ::= <<" + newline + "<stat(value=\"34\",...)>" + newline + ">>" + newline + "stat(name,value=\"99\") ::= \"x=<value>; // <name>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate b = group.GetInstanceOf( "method" ); b.SetAttribute( "name", "foo" ); string expecting = "x=34; // foo"; string result = b.ToString(); Assert.AreEqual( expecting, result ); } private class Counter { int n = 0; public override string ToString() { return (n++).ToString(); } } [TestMethod][TestCategory(TestCategories.ST3)] public void TestDefaultArgumentInParensToEvalEarly() { string templates = "group test;" + newline + "A(x) ::= \"<B()>\"" + newline + "B(y={<(x)>}) ::= \"<y> <x> <x> <y>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup(new StringReader(templates)); StringTemplate b = group.GetInstanceOf("A"); b.SetAttribute("x", new Counter()); string expecting = "0 1 2 0"; string result = b.ToString(); //Console.Error.WriteLine("result='" + result + "'"); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestArgumentsAsTemplates() { string templates = "group test;" + newline + "method(name,size) ::= <<" + newline + "<stat(value={<size>})>" + newline + ">>" + newline + "stat(value) ::= \"x=<value>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate b = group.GetInstanceOf( "method" ); b.SetAttribute( "name", "foo" ); b.SetAttribute( "size", "34" ); string expecting = "x=34;"; string result = b.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestTemplateArgumentEvaluatedInSurroundingContext() { string templates = "group test;" + newline + "file(m,size) ::= \"<m>\"" + newline + "method(name) ::= <<" + newline + "<stat(value={<size>.0})>" + newline + ">>" + newline + "stat(value) ::= \"x=<value>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate f = group.GetInstanceOf( "file" ); f.SetAttribute( "size", "34" ); StringTemplate m = group.GetInstanceOf( "method" ); m.SetAttribute( "name", "foo" ); f.SetAttribute( "m", m ); string expecting = "x=34.0;"; string result = m.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestArgumentsAsTemplatesDefaultDelimiters() { string templates = "group test;" + newline + "method(name,size) ::= <<" + newline + "$stat(value={$size$})$" + newline + ">>" + newline + "stat(value) ::= \"x=$value$;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ), typeof( DefaultTemplateLexer ) ); StringTemplate b = group.GetInstanceOf( "method" ); b.SetAttribute( "name", "foo" ); b.SetAttribute( "size", "34" ); string expecting = "x=34;"; string result = b.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestDefaultArgsWhenNotInvoked() { string templates = "group test;" + newline + "b(name=\"foo\") ::= \".<name>.\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate b = group.GetInstanceOf( "b" ); string expecting = ".foo."; string result = b.ToString(); Assert.AreEqual( expecting, result ); } public class DateRenderer : IAttributeRenderer { public string ToString( object o ) { return ( (DateTime)o ).ToString( "yyyy.MM.dd" ); //SimpleDateFormat f = new SimpleDateFormat( "yyyy.MM.dd" ); //return f.format( ( (Calendar)o ).getTime() ); } public string ToString( object o, string formatString ) { return ToString( o ); } } public class DateRenderer2 : IAttributeRenderer { public string ToString( object o ) { return ( (DateTime)o ).ToString( "MM/dd/yyyy" ); //SimpleDateFormat f = new SimpleDateFormat ("MM/dd/yyyy"); //return f.format(((Calendar)o).getTime()); } public string ToString( object o, string formatString ) { return ToString( o ); } } public class DateRenderer3 : IAttributeRenderer { public string ToString( object o ) { return ( (DateTime)o ).ToString( "MM/dd/yyyy" ); //SimpleDateFormat f = new SimpleDateFormat ("MM/dd/yyyy"); //return f.format(((Calendar)o).getTime()); } public string ToString( object o, string formatString ) { return ( (DateTime)o ).ToString( formatString ); //SimpleDateFormat f = new SimpleDateFormat (formatString); //return f.format(((Calendar)o).getTime()); } } public class StringRenderer : IAttributeRenderer { public virtual string ToString( object o ) { return (string)o; } public virtual string ToString( object o, string formatString ) { if ( formatString.Equals( "upper" ) ) { return ( (string)o ).ToUpperInvariant(); } return ToString( o ); } } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererForST() { StringTemplate st = new StringTemplate( "date: <created>", typeof( AngleBracketTemplateLexer ) ); st.SetAttribute( "created", new DateTime( 2005, 07, 05 ) ); st.RegisterRenderer( typeof( DateTime ), new DateRenderer() ); string expecting = "date: 2005.07.05"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererWithFormat() { StringTemplate st = new StringTemplate( "date: <created; format=\"yyyy.MM.dd\">", typeof( AngleBracketTemplateLexer ) ); st.SetAttribute( "created", new DateTime( 2005, 07, 05 ) ); st.RegisterRenderer( typeof( DateTime ), new DateRenderer3() ); string expecting = "date: 2005.07.05"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererWithFormatAndList() { StringTemplate st = new StringTemplate( "The names: <names; format=\"upper\">", typeof( AngleBracketTemplateLexer ) ); st.SetAttribute( "names", "ter" ); st.SetAttribute( "names", "tom" ); st.SetAttribute( "names", "sriram" ); st.RegisterRenderer( typeof( string ), new StringRenderer() ); string expecting = "The names: TERTOMSRIRAM"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererWithFormatAndSeparator() { StringTemplate st = new StringTemplate( "The names: <names; separator=\" and \", format=\"upper\">", typeof( AngleBracketTemplateLexer ) ); st.SetAttribute( "names", "ter" ); st.SetAttribute( "names", "tom" ); st.SetAttribute( "names", "sriram" ); st.RegisterRenderer( typeof( string ), new StringRenderer() ); string expecting = "The names: TER and TOM and SRIRAM"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererWithFormatAndSeparatorAndNull() { StringTemplate st = new StringTemplate( "The names: <names; separator=\" and \", null=\"n/a\", format=\"upper\">", typeof( AngleBracketTemplateLexer ) ); IList names = new List<object>(); names.Add( "ter" ); names.Add( null ); names.Add( "sriram" ); st.SetAttribute( "names", names ); st.RegisterRenderer( typeof( string ), new StringRenderer() ); string expecting = "The names: TER and N/A and SRIRAM"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestEmbeddedRendererSeesEnclosing() { // st is embedded in outer; set renderer on outer, st should // still see it. StringTemplate outer = new StringTemplate( "X: <x>", typeof( AngleBracketTemplateLexer ) ); StringTemplate st = new StringTemplate( "date: <created>", typeof( AngleBracketTemplateLexer ) ); st.SetAttribute( "created", new DateTime( 2005, 07, 05 ) ); outer.SetAttribute( "x", st ); outer.RegisterRenderer( typeof( DateTime ), new DateRenderer() ); string expecting = "X: date: 2005.07.05"; string result = outer.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRendererForGroup() { string templates = "group test;" + newline + "dateThing(created) ::= \"date: <created>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "dateThing" ); st.SetAttribute( "created", new DateTime( 2005, 07, 05 ) ); group.RegisterRenderer( typeof( DateTime ), new DateRenderer() ); string expecting = "date: 2005.07.05"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestOverriddenRenderer() { string templates = "group test;" + newline + "dateThing(created) ::= \"date: <created>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "dateThing" ); st.SetAttribute( "created", new DateTime( 2005, 07, 05 ) ); group.RegisterRenderer( typeof( DateTime ), new DateRenderer() ); st.RegisterRenderer( typeof( DateTime ), new DateRenderer2() ); string expecting = "date: 07/05/2005"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMap() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "int" ); st.SetAttribute( "name", "x" ); string expecting = "int x = 0;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapValuesAreTemplates() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0<w>\", \"float\":\"0.0<w>\"] " + newline + "var(type,w,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "w", "L" ); st.SetAttribute( "type", "int" ); st.SetAttribute( "name", "x" ); string expecting = "int x = 0L;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapKeyLookupViaTemplate() { // ST doesn't do a toString on .(key) values, it just uses the value // of key rather than key itself as the key. But, if you compute a // key via a template string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0<w>\", \"float\":\"0.0<w>\"] " + newline + "var(type,w,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "w", "L" ); st.SetAttribute( "type", new StringTemplate( "int" ) ); st.SetAttribute( "name", "x" ); string expecting = "int x = 0L;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapMissingDefaultValueIsEmpty() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(type,w,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "w", "L" ); st.SetAttribute( "type", "double" ); // double not in typeInit map st.SetAttribute( "name", "x" ); string expecting = "double x = ;"; // weird, but tests default value is key string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapHiddenByFormalArg() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "var(typeInit,type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "int" ); st.SetAttribute( "name", "x" ); string expecting = "int x = ;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapEmptyValueAndAngleBracketStrings() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":, \"double\":<<0.0L>>] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "float" ); st.SetAttribute( "name", "x" ); string expecting = "float x = ;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapDefaultValue() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", default:\"null\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "UserRecord" ); st.SetAttribute( "name", "x" ); string expecting = "UserRecord x = null;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapEmptyDefaultValue() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", default:] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "UserRecord" ); st.SetAttribute( "name", "x" ); string expecting = "UserRecord x = ;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapDefaultValueIsKey() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", default:key] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "UserRecord" ); st.SetAttribute( "name", "x" ); string expecting = "UserRecord x = UserRecord;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } /** * Test that a map can have only the default entry. - * <p> - * Bug ref: JIRA bug ST-15 (Fixed) + * + * <p>Bug ref: JIRA bug ST-15 (Fixed)</p> */ [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapDefaultStringAsKey() { string templates = "group test;" + newline + "typeInit ::= [\"default\":\"foo\"] " + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "var" ); st.SetAttribute( "type", "default" ); st.SetAttribute( "name", "x" ); string expecting = "default x = foo;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } /** * Test that a map can return a <b>string</b> with the word: default. - * <p> - * Bug ref: JIRA bug ST-15 (Fixed) + * + * <p>Bug ref: JIRA bug ST-15 (Fixed)</p> */ [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapDefaultIsDefaultString() { string templates = "group test;" + newline + "map ::= [default: \"default\"] " + newline + "t1() ::= \"<map.(1)>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "t1" ); string expecting = "default"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapViaEnclosingTemplates() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "intermediate(type,name) ::= \"<var(...)>\"" + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate st = group.GetInstanceOf( "intermediate" ); st.SetAttribute( "type", "int" ); st.SetAttribute( "name", "x" ); string expecting = "int x = 0;"; string result = st.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMapViaEnclosingTemplates2() { string templates = "group test;" + newline + "typeInit ::= [\"int\":\"0\", \"float\":\"0.0\"] " + newline + "intermediate(stuff) ::= \"<stuff>\"" + newline + "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate interm = group.GetInstanceOf( "intermediate" ); StringTemplate var = group.GetInstanceOf( "var" ); var.SetAttribute( "type", "int" ); var.SetAttribute( "name", "x" ); interm.SetAttribute( "stuff", var ); string expecting = "int x = 0;"; string result = interm.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestEmptyGroupTemplate() { string templates = "group test;" + newline + "foo() ::= \"\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate a = group.GetInstanceOf( "foo" ); string expecting = ""; string result = a.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestEmptyStringAndEmptyAnonTemplateAsParameterUsingAngleBracketLexer() { string templates = "group test;" + newline + "top() ::= <<<x(a=\"\", b={})\\>>>" + newline + "x(a,b) ::= \"a=<a>, b=<b>\"" + newline; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate a = group.GetInstanceOf( "top" ); string expecting = "a=, b="; string result = a.ToString(); Assert.AreEqual( expecting, result ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestEmptyStringAndEmptyAnonTemplateAsParameterUsingDollarLexer() { string templates = "group test;" + newline + "top() ::= <<$x(a=\"\", b={})$>>" + newline + "x(a,b) ::= \"a=$a$, b=$b$\"" + newline; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ), typeof( DefaultTemplateLexer ) ); StringTemplate a = group.GetInstanceOf( "top" ); string expecting = "a=, b="; string result = a.ToString(); Assert.AreEqual( expecting, result ); } /** * FIXME: Dannish does not work if typed directly in with default file * encoding on windows. The character needs to be escaped as bellow. * Please correct to escape the correct charcter. */ [TestMethod][TestCategory(TestCategories.ST3)] public void Test8BitEuroChars() { StringTemplate e = new StringTemplate( "Danish: \x0143 char" ); e = e.GetInstanceOf(); string expecting = "Danish: \x0143 char"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void Test16BitUnicodeChar() { StringTemplate e = new StringTemplate( "DINGBAT CIRCLED SANS-SERIF DIGIT ONE: \x2780" ); e = e.GetInstanceOf(); string expecting = "DINGBAT CIRCLED SANS-SERIF DIGIT ONE: \x2780"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestFirstOp() { StringTemplate e = new StringTemplate( "$first(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); e.SetAttribute( "names", "Sriram" ); string expecting = "Ter"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestTruncOp() { StringTemplate e = new StringTemplate( "$trunc(names); separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); e.SetAttribute( "names", "Sriram" ); string expecting = "Ter, Tom"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRestOp() { StringTemplate e = new StringTemplate( "$rest(names); separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); e.SetAttribute( "names", "Sriram" ); string expecting = "Tom, Sriram"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRestOpEmptyList() { StringTemplate e = new StringTemplate( "$rest(names); separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", new List<object>() ); string expecting = ""; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestReUseOfRestResult() { string templates = "group test;" + newline + "a(names) ::= \"<b(rest(names))>\"" + newline + "b(x) ::= \"<x>, <x>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate e = group.GetInstanceOf( "a" ); IList names = new List<object>(); names.Add( "Ter" ); names.Add( "Tom" ); e.SetAttribute( "names", names ); string expecting = "Tom, Tom"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestLastOp() { StringTemplate e = new StringTemplate( "$last(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); e.SetAttribute( "names", "Sriram" ); string expecting = "Sriram"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestCombinedOp() { // replace first of yours with first of mine StringTemplate e = new StringTemplate( "$[first(mine),rest(yours)]; separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "mine", "1" ); e.SetAttribute( "mine", "2" ); e.SetAttribute( "mine", "3" ); e.SetAttribute( "yours", "a" ); e.SetAttribute( "yours", "b" ); string expecting = "1, b"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestCatListAndSingleAttribute() { // replace first of yours with first of mine StringTemplate e = new StringTemplate( "$[mine,yours]; separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "mine", "1" ); e.SetAttribute( "mine", "2" ); e.SetAttribute( "mine", "3" ); e.SetAttribute( "yours", "a" ); string expecting = "1, 2, 3, a"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestReUseOfCat() { string templates = "group test;" + newline + "a(mine,yours) ::= \"<b([mine,yours])>\"" + newline + "b(x) ::= \"<x>, <x>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate e = group.GetInstanceOf( "a" ); IList mine = new List<object>(); mine.Add( "Ter" ); mine.Add( "Tom" ); e.SetAttribute( "mine", mine ); IList yours = new List<object>(); yours.Add( "Foo" ); e.SetAttribute( "yours", yours ); string expecting = "TerTomFoo, TerTomFoo"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestCatListAndEmptyAttributes() { // + is overloaded to be cat strings and cat lists so the // two operands (from left to right) determine which way it // goes. In this case, x+mine is a list so everything from their // to the right becomes list cat. StringTemplate e = new StringTemplate( "$[x,mine,y,yours,z]; separator=\", \"$" ); e = e.GetInstanceOf(); e.SetAttribute( "mine", "1" ); e.SetAttribute( "mine", "2" ); e.SetAttribute( "mine", "3" ); e.SetAttribute( "yours", "a" ); string expecting = "1, 2, 3, a"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestNestedOp() { StringTemplate e = new StringTemplate( "$first(rest(names))$" // gets 2nd element ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); e.SetAttribute( "names", "Sriram" ); string expecting = "Tom"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestFirstWithOneAttributeOp() { StringTemplate e = new StringTemplate( "$first(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); string expecting = "Ter"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestLastWithOneAttributeOp() { StringTemplate e = new StringTemplate( "$last(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); string expecting = "Ter"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestLastWithLengthOneListAttributeOp() { StringTemplate e = new StringTemplate( "$last(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", new List<object>( new object[] { "Ter" } ) ); string expecting = "Ter"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRestWithOneAttributeOp() { StringTemplate e = new StringTemplate( "$rest(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); string expecting = ""; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRestWithLengthOneListAttributeOp() { StringTemplate e = new StringTemplate( "$rest(names)$" ); e = e.GetInstanceOf(); e.SetAttribute( "names", new List<object>( new object[] { "Ter" } ) ); string expecting = ""; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestRepeatedRestOp() { StringTemplate e = new StringTemplate( "$rest(names)$, $rest(names)$" // gets 2nd element ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); string expecting = "Tom, Tom"; Assert.AreEqual( expecting, e.ToString() ); } /** If an iterator is sent into ST, it must be cannot be reset after each * use so repeated refs yield empty values. This would * work if we passed in a List not an iterator. Avoid sending in iterators * if you ref it twice. */ [TestMethod][TestCategory(TestCategories.ST3)] public void TestRepeatedIteratedAttrFromArg() { string templates = "group test;" + newline + "root(names) ::= \"$other(names)$\"" + newline + "other(x) ::= \"$x$, $x$\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ), typeof( DefaultTemplateLexer ) ); StringTemplate e = group.GetInstanceOf( "root" ); IList names = new List<object>(); names.Add( "Ter" ); names.Add( "Tom" ); e.SetAttribute( "names", names.GetEnumerator() ); string expecting = "TerTom, "; // This does not give TerTom twice!! Assert.AreEqual( expecting, e.ToString() ); } #if false /** FIXME: BUG! Iterator is not reset from first to second $x$ * Either reset the iterator or pass an attribute that knows to get * the iterator each time. Seems like first, tail do not * have same problem as they yield objects. * * Maybe make a RestIterator like I have CatIterator. */ [TestMethod][TestCategory(TestCategories.ST3)] public void TestRepeatedRestOpAsArg() { String templates = "group test;" + newline + "root(names) ::= \"$other(rest(names))$\"" + newline + "other(x) ::= \"$x$, $x$\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ), typeof( DefaultTemplateLexer ) ); StringTemplate e = group.GetInstanceOf( "root" ); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); String expecting = "Tom, Tom"; Assert.AreEqual( expecting, e.ToString() ); } #endif [TestMethod][TestCategory(TestCategories.ST3)] public void TestIncomingLists() { StringTemplate e = new StringTemplate( "$rest(names)$, $rest(names)$" // gets 2nd element ); e = e.GetInstanceOf(); e.SetAttribute( "names", "Ter" ); e.SetAttribute( "names", "Tom" ); string expecting = "Tom, Tom"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestIncomingListsAreNotModified() { StringTemplate e = new StringTemplate( "$names; separator=\", \"$" // gets 2nd element ); e = e.GetInstanceOf(); IList names = new List<object>(); names.Add( "Ter" ); names.Add( "Tom" ); e.SetAttribute( "names", names ); e.SetAttribute( "names", "Sriram" ); string expecting = "Ter, Tom, Sriram"; Assert.AreEqual( expecting, e.ToString() ); Assert.AreEqual( names.Count, 2 ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestIncomingListsAreNotModified2() { StringTemplate e = new StringTemplate( "$names; separator=\", \"$" // gets 2nd element ); e = e.GetInstanceOf(); IList names = new List<object>(); names.Add( "Ter" ); names.Add( "Tom" ); e.SetAttribute( "names", "Sriram" ); // single element first now e.SetAttribute( "names", names ); string expecting = "Sriram, Ter, Tom"; Assert.AreEqual( expecting, e.ToString() ); Assert.AreEqual( names.Count, 2 ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestIncomingArraysAreOk() { StringTemplate e = new StringTemplate( "$names; separator=\", \"$" // gets 2nd element ); e = e.GetInstanceOf(); e.SetAttribute( "names", new string[] { "Ter", "Tom" } ); e.SetAttribute( "names", "Sriram" ); string expecting = "Ter, Tom, Sriram"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestMultipleRefsToListAttribute() { string templates = "group test;" + newline + "f(x) ::= \"<x> <x>\"" + newline ; StringTemplateGroup group = new StringTemplateGroup( new StringReader( templates ) ); StringTemplate e = group.GetInstanceOf( "f" ); e.SetAttribute( "x", "Ter" ); e.SetAttribute( "x", "Tom" ); string expecting = "TerTom TerTom"; Assert.AreEqual( expecting, e.ToString() ); } [TestMethod][TestCategory(TestCategories.ST3)] public void TestApplyTemplateWithSingleFormalArgs() { string templates = diff --git a/Antlr3.Test/TestIntervalSet.cs b/Antlr3.Test/TestIntervalSet.cs index 58bb1e4..9258fd2 100644 --- a/Antlr3.Test/TestIntervalSet.cs +++ b/Antlr3.Test/TestIntervalSet.cs @@ -1,458 +1,458 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace AntlrUnitTests { using System; using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using IList = System.Collections.IList; using Interval = Antlr3.Misc.Interval; using IntervalSet = Antlr3.Misc.IntervalSet; using Label = Antlr3.Analysis.Label; [TestClass] public class TestIntervalSet : BaseTest { /** Public default constructor used by TestRig */ public TestIntervalSet() { } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSingleElement() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 99 ); string expecting = "99"; Assert.AreEqual( s.ToString(), expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestIsolatedElements() /*throws Exception*/ { IntervalSet s = new IntervalSet(); s.Add( 1 ); s.Add( 'z' ); s.Add( '\uFFF0' ); string expecting = "{1, 122, 65520}"; Assert.AreEqual( s.ToString(), expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMixedRangesAndElements() /*throws Exception*/ { IntervalSet s = new IntervalSet(); s.Add( 1 ); s.Add( 'a', 'z' ); s.Add( '0', '9' ); string expecting = "{1, 48..57, 97..122}"; Assert.AreEqual( s.ToString(), expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSimpleAnd() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 13, 15 ); string expecting = "13..15"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestRangeAndIsolatedElement() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 'a', 'z' ); IntervalSet s2 = IntervalSet.Of( 'd' ); string expecting = "100"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestEmptyIntersection() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 'a', 'z' ); IntervalSet s2 = IntervalSet.Of( '0', '9' ); string expecting = "{}"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestEmptyIntersectionSingleElements() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 'a' ); IntervalSet s2 = IntervalSet.Of( 'd' ); string expecting = "{}"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } #if false [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotSingleElement() /*throws Exception*/ { IntervalSet vocabulary = IntervalSet.Of( 1, 1000 ); vocabulary.Add( 2000, 3000 ); IntervalSet s = IntervalSet.Of( 50, 50 ); string expecting = "{1..49, 51..1000, 2000..3000}"; string result = ( s.Complement( vocabulary ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotSet() /*throws Exception*/ { IntervalSet vocabulary = IntervalSet.Of( 1, 1000 ); IntervalSet s = IntervalSet.Of( 50, 60 ); s.Add( 5 ); s.Add( 250, 300 ); string expecting = "{1..4, 6..49, 61..249, 301..1000}"; string result = ( s.Complement( vocabulary ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotEqualSet() /*throws Exception*/ { IntervalSet vocabulary = IntervalSet.Of( 1, 1000 ); IntervalSet s = IntervalSet.Of( 1, 1000 ); string expecting = "{}"; string result = ( s.Complement( vocabulary ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotSetEdgeElement() /*throws Exception*/ { IntervalSet vocabulary = IntervalSet.Of( 1, 2 ); IntervalSet s = IntervalSet.Of( 1 ); string expecting = "2"; string result = ( s.Complement( vocabulary ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotSetFragmentedVocabulary() /*throws Exception*/ { IntervalSet vocabulary = IntervalSet.Of( 1, 255 ); vocabulary.Add( 1000, 2000 ); vocabulary.Add( 9999 ); IntervalSet s = IntervalSet.Of( 50, 60 ); s.Add( 3 ); s.Add( 250, 300 ); s.Add( 10000 ); // this is outside range of vocab and should be ignored string expecting = "{1..2, 4..49, 61..249, 1000..2000, 9999}"; string result = ( s.Complement( vocabulary ) ).ToString(); Assert.AreEqual( result, expecting ); } #endif [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfCompletelyContainedRange() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 12, 15 ); string expecting = "{10..11, 16..20}"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfOverlappingRangeFromLeft() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 5, 11 ); string expecting = "12..20"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); IntervalSet s3 = IntervalSet.Of( 5, 10 ); expecting = "11..20"; result = ( s.Subtract( s3 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfOverlappingRangeFromRight() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 15, 25 ); string expecting = "10..14"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); IntervalSet s3 = IntervalSet.Of( 20, 25 ); expecting = "10..19"; result = ( s.Subtract( s3 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfCompletelyCoveredRange() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 1, 25 ); string expecting = "{}"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfRangeSpanningMultipleRanges() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); s.Add( 30, 40 ); s.Add( 50, 60 ); // s has 3 ranges now: 10..20, 30..40, 50..60 IntervalSet s2 = IntervalSet.Of( 5, 55 ); // covers one and touches 2nd range string expecting = "56..60"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); IntervalSet s3 = IntervalSet.Of( 15, 55 ); // touches both expecting = "{10..14, 56..60}"; result = ( s.Subtract( s3 ) ).ToString(); Assert.AreEqual( result, expecting ); } /** The following was broken: {0..113, 115..65534}-{0..115, 117..65534}=116..65534 */ [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSubtractOfWackyRange() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 0, 113 ); s.Add( 115, 200 ); IntervalSet s2 = IntervalSet.Of( 0, 115 ); s2.Add( 117, 200 ); string expecting = "116"; string result = ( s.Subtract( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSimpleEquals() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 10, 20 ); Boolean expecting = true; Boolean result = s.Equals( s2 ); Assert.AreEqual( result, expecting ); IntervalSet s3 = IntervalSet.Of( 15, 55 ); expecting = false; result = s.Equals( s3 ); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestEquals() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); s.Add( 2 ); s.Add( 499, 501 ); IntervalSet s2 = IntervalSet.Of( 10, 20 ); s2.Add( 2 ); s2.Add( 499, 501 ); Boolean expecting = true; Boolean result = s.Equals( s2 ); Assert.AreEqual( result, expecting ); IntervalSet s3 = IntervalSet.Of( 10, 20 ); s3.Add( 2 ); expecting = false; result = s.Equals( s3 ); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSingleElementMinusDisjointSet() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 15, 15 ); IntervalSet s2 = IntervalSet.Of( 1, 5 ); s2.Add( 10, 20 ); string expecting = "{}"; // 15 - {1..5, 10..20} = {} string result = s.Subtract( s2 ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMembership() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 15, 15 ); s.Add( 50, 60 ); Assert.IsTrue( !s.Contains( 0 ) ); Assert.IsTrue( !s.Contains( 20 ) ); Assert.IsTrue( !s.Contains( 100 ) ); Assert.IsTrue( s.Contains( 15 ) ); Assert.IsTrue( s.Contains( 55 ) ); Assert.IsTrue( s.Contains( 50 ) ); Assert.IsTrue( s.Contains( 60 ) ); } // {2,15,18} & 10..20 [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestIntersectionWithTwoContainedElements() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 2, 2 ); s2.Add( 15 ); s2.Add( 18 ); string expecting = "{15, 18}"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestIntersectionWithTwoContainedElementsReversed() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 10, 20 ); IntervalSet s2 = IntervalSet.Of( 2, 2 ); s2.Add( 15 ); s2.Add( 18 ); string expecting = "{15, 18}"; string result = ( s2.And( s ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestComplement() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 100, 100 ); s.Add( 101, 101 ); Interval s2 = Interval.FromBounds( 100, 102 ); string expecting = "102"; string result = ( s.Complement( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestComplement2() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 100, 101 ); Interval s2 = Interval.FromBounds( 100, 102 ); string expecting = "102"; string result = ( s.Complement( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestComplement3() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 1, 96 ); s.Add( 99, Label.MAX_CHAR_VALUE ); string expecting = "97..98"; string result = ( s.Complement( 1, Label.MAX_CHAR_VALUE ) ).ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMergeOfRangesAndSingleValues() /*throws Exception*/ { // {0..41, 42, 43..65534} IntervalSet s = IntervalSet.Of( 0, 41 ); s.Add( 42 ); s.Add( 43, 65534 ); string expecting = "0..65534"; string result = s.ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMergeOfRangesAndSingleValuesReverse() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 43, 65534 ); s.Add( 42 ); s.Add( 0, 41 ); string expecting = "0..65534"; string result = s.ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMergeWhereAdditionMergesTwoExistingIntervals() /*throws Exception*/ { // 42, 10, {0..9, 11..41, 43..65534} IntervalSet s = IntervalSet.Of( 42 ); s.Add( 10 ); s.Add( 0, 9 ); s.Add( 43, 65534 ); s.Add( 11, 41 ); string expecting = "0..65534"; string result = s.ToString(); Assert.AreEqual( result, expecting ); } /** * This case is responsible for antlr/antlr4#153. * https://github.com/antlr/antlr4/issues/153 * <p/> * Resolution back-ported from V4. */ [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMergeWhereAdditionMergesThreeExistingIntervals() { IntervalSet s = new IntervalSet(); s.Add(0); s.Add(3); s.Add(5); s.Add(0, 7); String expecting = "0..7"; String result = s.ToString(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestMergeWithDoubleOverlap() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 1, 10 ); s.Add( 20, 30 ); s.Add( 5, 25 ); // overlaps two! string expecting = "1..30"; string result = s.ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestSize() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 20, 30 ); s.Add( 50, 55 ); s.Add( 5, 19 ); string expecting = "32"; string result = s.Count.ToString(); Assert.AreEqual( result, expecting ); } [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestToList() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 20, 25 ); s.Add( 50, 55 ); s.Add( 5, 5 ); string expecting = "[5, 20, 21, 22, 23, 24, 25, 50, 51, 52, 53, 54, 55]"; IList foo = new List<object>(); //String result = String.valueOf( s.toList() ); string result = "[" + string.Join( ", ", s.ToArray().Select( i => i.ToString() ).ToArray() ) + "]"; Assert.AreEqual( result, expecting ); } /** The following was broken: - {'\u0000'..'s', 'u'..'\uFFFE'} & {'\u0000'..'q', 's'..'\uFFFE'}= + {'\u0000'..'s', 'u'..'\uFFFE'} &amp; {'\u0000'..'q', 's'..'\uFFFE'}= {'\u0000'..'q', 's'}!!!! broken... 'q' is 113 ascii 'u' is 117 */ [TestMethod][TestCategory(TestCategories.Antlr3)] public void TestNotRIntersectionNotT() /*throws Exception*/ { IntervalSet s = IntervalSet.Of( 0, 's' ); s.Add( 'u', 200 ); IntervalSet s2 = IntervalSet.Of( 0, 'q' ); s2.Add( 's', 200 ); string expecting = "{0..113, 115, 117..200}"; string result = ( s.And( s2 ) ).ToString(); Assert.AreEqual( result, expecting ); } } } diff --git a/Runtime/Antlr3.Runtime.Test/SlimParsing/SlimLexer.cs b/Runtime/Antlr3.Runtime.Test/SlimParsing/SlimLexer.cs index 3b2ec7f..080320d 100644 --- a/Runtime/Antlr3.Runtime.Test/SlimParsing/SlimLexer.cs +++ b/Runtime/Antlr3.Runtime.Test/SlimParsing/SlimLexer.cs @@ -1,445 +1,449 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { public abstract class SlimLexer : BaseRecognizer , ITokenSource<SlimToken> { /** <summary>Where is the lexer drawing characters from?</summary> */ protected SlimStringStream input; SlimToken _token; bool _emitted; bool _skip; public SlimLexer() { } public SlimLexer( ICharStream input ) { this.input = (SlimStringStream)input; } public SlimLexer( ICharStream input, RecognizerSharedState state ) : base( state ) { this.input = (SlimStringStream)input; } #region Properties + /// <summary> + /// Gets or sets the text for the current token. Setting this property overrides any previous text assigned to + /// the token. + /// </summary> public string Text { - /** <summary>Return the text matched so far for the current token or any text override.</summary> */ get { if ( state.text != null ) { return state.text; } return input.Substring( state.tokenStartCharIndex, CharIndex - state.tokenStartCharIndex ); } - /** <summary>Set the complete text of this token; it wipes any previous changes to the text.</summary> */ set { state.text = value; } } public int Line { get { return input.Line; } set { input.Line = value; } } public int CharPositionInLine { get { return input.CharPositionInLine; } set { input.CharPositionInLine = value; } } #endregion public override void Reset() { base.Reset(); // reset all recognizer state variables // wack Lexer state variables if ( input != null ) { input.Seek( 0 ); // rewind the input } if ( state == null ) { return; // no shared state work to do } _token = default( SlimToken ); _emitted = false; _skip = false; //state.token = null; state.type = TokenTypes.Invalid; state.channel = TokenChannels.Default; state.tokenStartCharIndex = -1; #if TRACK_POSITION state.tokenStartCharPositionInLine = -1; state.tokenStartLine = -1; #endif state.text = null; } /** <summary>Return a token from this source; i.e., match a token on the char stream.</summary> */ public virtual SlimToken NextToken() { for ( ; ; ) { _token = default( SlimToken ); _emitted = false; _skip = false; //state.token = null; state.channel = TokenChannels.Default; state.tokenStartCharIndex = input.Index; #if TRACK_POSITION state.tokenStartCharPositionInLine = input.CharPositionInLine; state.tokenStartLine = input.Line; #endif state.text = null; if ( input.LA( 1 ) == CharStreamConstants.EndOfFile ) { return new SlimToken(TokenTypes.EndOfFile); } try { mTokens(); if ( _skip ) { continue; } else if ( !_emitted ) { Emit(); } return _token; } catch ( NoViableAltException nva ) { ReportError( nva ); Recover( nva ); // throw out current char and try again } catch ( RecognitionException re ) { ReportError( re ); // match() routine has already called recover() } } } IToken ITokenSource.NextToken() { return NextToken(); } /** <summary> * Instruct the lexer to skip creating a token for current lexer rule * and look for another token. nextToken() knows to keep looking when * a lexer rule finishes with token set to SKIP_TOKEN. Recall that * if token==null at end of any token rule, it creates one for you * and emits it. * </summary> */ public virtual void Skip() { _skip = true; //state.token = Tokens.Skip; } /** <summary>This is the lexer entry point that sets instance var 'token'</summary> */ public abstract void mTokens(); + /// <summary> + /// Gets or sets the lexer input stream. Setting this property resets the lexer state. + /// </summary> public ICharStream CharStream { get { return input; } - /** <summary>Set the char stream and reset the lexer</summary> */ set { input = null; Reset(); input = (SlimStringStream)value; } } public override string SourceName { get { return input.SourceName; } } - ///** <summary> - // * Currently does not support multiple emits per nextToken invocation - // * for efficiency reasons. Subclass and override this method and - // * nextToken (to push tokens into a list and pull from that list rather - // * than a single variable as this implementation does). - // * </summary> - // */ - //public void Emit( T token ) - //{ - // _token = token; - //} + /////** <summary> + //// * Currently does not support multiple emits per nextToken invocation + //// * for efficiency reasons. Subclass and override this method and + //// * nextToken (to push tokens into a list and pull from that list rather + //// * than a single variable as this implementation does). + //// * </summary> + //// */ + ////public void Emit( T token ) + ////{ + //// _token = token; + ////} /** <summary> * The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * </summary> * * <remarks> * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). * </remarks> */ public void Emit() { _token = new SlimToken() { //InputStream = input, Type = state.type, Channel = state.channel, //CharPositionInLine = state.tokenStartCharPositionInLine, //Line = state.tokenStartLine, //Text = state.text }; //Emit( t ); //return t; //IToken t = new CommonToken( input, state.type, state.channel, state.tokenStartCharIndex, CharIndex - 1 ); //t.Line = state.tokenStartLine; //t.Text = state.text; //t.CharPositionInLine = state.tokenStartCharPositionInLine; //Emit( t ); //return t; } public void Match( string s ) { int i = 0; while ( i < s.Length ) { if ( input.LA( 1 ) != s[i] ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedTokenException mte = new MismatchedTokenException(s[i], input, TokenNames); Recover( mte ); throw mte; } i++; input.Consume(); state.failed = false; } } public void MatchAny() { input.Consume(); } public void Match( int c ) { if ( input.LA( 1 ) != c ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedTokenException mte = new MismatchedTokenException(c, input, TokenNames); Recover( mte ); // don't really recover; just consume in lexer throw mte; } input.Consume(); state.failed = false; } public void MatchRange( int a, int b ) { if ( input.LA( 1 ) < a || input.LA( 1 ) > b ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedRangeException mre = new MismatchedRangeException( a, b, input ); Recover( mre ); throw mre; } input.Consume(); state.failed = false; } /** <summary>What is the index of the current character of lookahead?</summary> */ public int CharIndex { get { return input.Index; } } public override void ReportError( RecognitionException e ) { - /** TODO: not thought about recovery in lexer yet. + /* TODO: not thought about recovery in lexer yet. * // if we've already reported an error and have not matched a token // yet successfully, don't report any errors. if ( errorRecovery ) { //System.err.print("[SPURIOUS] "); return; } errorRecovery = true; */ DisplayRecognitionError( this.TokenNames, e ); } public override string GetErrorMessage( RecognitionException e, string[] tokenNames ) { string msg = null; if ( e is MismatchedTokenException ) { MismatchedTokenException mte = (MismatchedTokenException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting " + GetCharErrorDisplay( mte.Expecting ); } else if ( e is NoViableAltException ) { NoViableAltException nvae = (NoViableAltException)e; // for development, can add "decision=<<"+nvae.grammarDecisionDescription+">>" // and "(decision="+nvae.decisionNumber+") and // "state "+nvae.stateNumber msg = "no viable alternative at character " + GetCharErrorDisplay( e.Character ); } else if ( e is EarlyExitException ) { EarlyExitException eee = (EarlyExitException)e; // for development, can add "(decision="+eee.decisionNumber+")" msg = "required (...)+ loop did not match anything at character " + GetCharErrorDisplay( e.Character ); } else if ( e is MismatchedNotSetException ) { MismatchedNotSetException mse = (MismatchedNotSetException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedSetException ) { MismatchedSetException mse = (MismatchedSetException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedRangeException ) { MismatchedRangeException mre = (MismatchedRangeException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + GetCharErrorDisplay( mre.A ) + ".." + GetCharErrorDisplay( mre.B ); } else { msg = base.GetErrorMessage( e, tokenNames ); } return msg; } public virtual string GetCharErrorDisplay( int c ) { string s = ( (char)c ).ToString(); switch ( c ) { case TokenTypes.EndOfFile: s = "<EOF>"; break; case '\n': s = "\\n"; break; case '\t': s = "\\t"; break; case '\r': s = "\\r"; break; } return "'" + s + "'"; } /** <summary> * Lexers can normally match any char in it's vocabulary after matching * a token, so do the easy thing and just kill a character and hope * it all works out. You can instead use the rule invocation stack * to do sophisticated error recovery if you are in a fragment rule. * </summary> */ public virtual void Recover( RecognitionException re ) { //System.out.println("consuming char "+(char)input.LA(1)+" during recovery"); //re.printStackTrace(); input.Consume(); } public virtual void TraceIn( string ruleName, int ruleIndex ) { string inputSymbol = ( (char)input.LT( 1 ) ) + " line=" + Line + ":" + CharPositionInLine; base.TraceIn( ruleName, ruleIndex, inputSymbol ); } public virtual void TraceOut( string ruleName, int ruleIndex ) { string inputSymbol = ( (char)input.LT( 1 ) ) + " line=" + Line + ":" + CharPositionInLine; base.TraceOut( ruleName, ruleIndex, inputSymbol ); } } } diff --git a/Runtime/Antlr3.Runtime.Test/SlimParsing/Tree/ITreeAdaptor`1.cs b/Runtime/Antlr3.Runtime.Test/SlimParsing/Tree/ITreeAdaptor`1.cs index dfb2ecf..8db9300 100644 --- a/Runtime/Antlr3.Runtime.Test/SlimParsing/Tree/ITreeAdaptor`1.cs +++ b/Runtime/Antlr3.Runtime.Test/SlimParsing/Tree/ITreeAdaptor`1.cs @@ -1,314 +1,314 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { public interface ITreeAdaptor<T> { #region Construction /** <summary> * Create a tree node from Token object; for CommonTree type trees, * then the token just becomes the payload. This is the most * common create call. * </summary> * * <remarks> * Override if you want another kind of node to be built. * </remarks> */ T Create(IToken payload); /** <summary>Duplicate a single tree node.</summary> * <remarks>Override if you want another kind of node to be built.</remarks> */ T DupNode(T treeNode); /** <summary>Duplicate tree recursively, using dupNode() for each node</summary> */ T DupTree(T tree); /** <summary> * Return a nil node (an empty but non-null node) that can hold * a list of element as the children. If you want a flat tree (a list) * use "t=adaptor.nil(); t.addChild(x); t.addChild(y);" * </summary> */ T Nil(); /** <summary> * Return a tree node representing an error. This node records the * tokens consumed during error recovery. The start token indicates the * input symbol at which the error was detected. The stop token indicates * the last symbol consumed during recovery. * </summary> * - * </remarks> + * <remarks> * You must specify the input stream so that the erroneous text can * be packaged up in the error node. The exception could be useful * to some applications; default implementation stores ptr to it in * the CommonErrorNode. * * This only makes sense during token parsing, not tree parsing. * Tree parsing should happen only when parsing and tree construction * succeed. * </remarks> */ T ErrorNode(ITokenStream input, IToken start, IToken stop, RecognitionException e); /** <summary>Is tree considered a nil node used to make lists of child nodes?</summary> */ bool IsNil(T tree); /** <summary> * Add a child to the tree t. If child is a flat tree (a list), make all * in list children of t. Warning: if t has no children, but child does * and child isNil then you can decide it is ok to move children to t via * t.children = child.children; i.e., without copying the array. Just * make sure that this is consistent with have the user will build * ASTs. Do nothing if t or child is null. * </summary> */ void AddChild(T t, T child); /** <summary> * If oldRoot is a nil root, just copy or move the children to newRoot. * If not a nil root, make oldRoot a child of newRoot. * </summary> * * <remarks> * old=^(nil a b c), new=r yields ^(r a b c) * old=^(a b c), new=r yields ^(r ^(a b c)) * * If newRoot is a nil-rooted single child tree, use the single * child as the new root node. * * old=^(nil a b c), new=^(nil r) yields ^(r a b c) * old=^(a b c), new=^(nil r) yields ^(r ^(a b c)) * * If oldRoot was null, it's ok, just return newRoot (even if isNil). * * old=null, new=r yields r * old=null, new=^(nil r) yields ^(nil r) * * Return newRoot. Throw an exception if newRoot is not a * simple node or nil root with a single child node--it must be a root * node. If newRoot is ^(nil x) return x as newRoot. * * Be advised that it's ok for newRoot to point at oldRoot's * children; i.e., you don't have to copy the list. We are * constructing these nodes so we should have this control for * efficiency. * </remarks> */ T BecomeRoot(T newRoot, T oldRoot); /** <summary> * Given the root of the subtree created for this rule, post process * it to do any simplifications or whatever you want. A required * behavior is to convert ^(nil singleSubtree) to singleSubtree * as the setting of start/stop indexes relies on a single non-nil root * for non-flat trees. * </summary> * * <remarks> * Flat trees such as for lists like "idlist : ID+ ;" are left alone * unless there is only one ID. For a list, the start/stop indexes * are set in the nil node. * * This method is executed after all rule tree construction and right * before setTokenBoundaries(). * </remarks> */ T RulePostProcessing(T root); /** <summary>For identifying trees.</summary> * * <remarks> * How to identify nodes so we can say "add node to a prior node"? * Even becomeRoot is an issue. Use System.identityHashCode(node) * usually. * </remarks> */ int GetUniqueID(T node); // R e w r i t e R u l e s /** <summary> * Create a node for newRoot make it the root of oldRoot. * If oldRoot is a nil root, just copy or move the children to newRoot. * If not a nil root, make oldRoot a child of newRoot. * </summary> * * <returns> * Return node created for newRoot. * </returns> * * <remarks> * Be advised: when debugging ASTs, the DebugTreeAdaptor manually * calls create(Token child) and then plain becomeRoot(node, node) * because it needs to trap calls to create, but it can't since it delegates * to not inherits from the TreeAdaptor. * </remarks> */ T BecomeRoot(IToken newRoot, T oldRoot); /** <summary> * Create a new node derived from a token, with a new token type. * This is invoked from an imaginary node ref on right side of a * rewrite rule as IMAG[$tokenLabel]. * </summary> * * <remarks> * This should invoke createToken(Token). * </remarks> */ T Create(int tokenType, IToken fromToken); /** <summary> * Same as create(tokenType,fromToken) except set the text too. * This is invoked from an imaginary node ref on right side of a * rewrite rule as IMAG[$tokenLabel, "IMAG"]. * </summary> * * <remarks> * This should invoke createToken(Token). * </remarks> */ T Create(int tokenType, IToken fromToken, string text); /** <summary> * Create a new node derived from a token, with a new token type. * This is invoked from an imaginary node ref on right side of a * rewrite rule as IMAG["IMAG"]. * </summary> * * <remarks> * This should invoke createToken(int,String). * </remarks> */ T Create(int tokenType, string text); #endregion #region Content /** <summary>For tree parsing, I need to know the token type of a node</summary> */ int GetType(T t); /** <summary>Node constructors can set the type of a node</summary> */ void SetType(T t, int type); string GetText(T t); /** <summary>Node constructors can set the text of a node</summary> */ void SetText(T t, string text); /** <summary> * Return the token object from which this node was created. * Currently used only for printing an error message. * The error display routine in BaseRecognizer needs to * display where the input the error occurred. If your * tree of limitation does not store information that can * lead you to the token, you can create a token filled with * the appropriate information and pass that back. See * BaseRecognizer.getErrorMessage(). * </summary> */ IToken GetToken(T t); /** <summary> * Where are the bounds in the input token stream for this node and * all children? Each rule that creates AST nodes will call this * method right before returning. Flat trees (i.e., lists) will * still usually have a nil root node just to hold the children list. * That node would contain the start/stop indexes then. * </summary> */ void SetTokenBoundaries(T t, IToken startToken, IToken stopToken); /** <summary>Get the token start index for this subtree; return -1 if no such index</summary> */ int GetTokenStartIndex(T t); /** <summary>Get the token stop index for this subtree; return -1 if no such index</summary> */ int GetTokenStopIndex(T t); #endregion #region Navigation / Tree Parsing /** <summary>Get a child 0..n-1 node</summary> */ T GetChild(T t, int i); /** <summary>Set ith child (0..n-1) to t; t must be non-null and non-nil node</summary> */ void SetChild(T t, int i, T child); /** <summary>Remove ith child and shift children down from right.</summary> */ T DeleteChild(T t, int i); /** <summary>How many children? If 0, then this is a leaf node</summary> */ int GetChildCount(T t); /** <summary> * Who is the parent node of this node; if null, implies node is root. * If your node type doesn't handle this, it's ok but the tree rewrites * in tree parsers need this functionality. * </summary> */ T GetParent(T t); void SetParent(T t, T parent); /** <summary> * What index is this node in the child list? Range: 0..n-1 * If your node type doesn't handle this, it's ok but the tree rewrites * in tree parsers need this functionality. * </summary> */ int GetChildIndex(T t); void SetChildIndex(T t, int index); /** <summary> * Replace from start to stop child index of parent with t, which might * be a list. Number of children may be different after this call. * </summary> * * <remarks> * If parent is null, don't do anything; must be at root of overall tree. * Can't replace whatever points to the parent externally. Do nothing. * </remarks> */ void ReplaceChildren(T parent, int startChildIndex, int stopChildIndex, T t); #endregion } }
antlr/antlrcs
b07d026fa8961adec4377307ba65de3832944e96
Configure code analysis and documentation file at the top level
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index 03127e2..e7d6c94 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,99 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System.Windows.Forms" /> <Reference Include="WindowsBase" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Update="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Update="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 9af7194..d190676 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,97 +1,92 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 0d8ee8d..f92a39e 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,54 +1,50 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index a76c262..9c27f59 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,388 +1,383 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 4643376..671e767 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,109 +1,104 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 2377750..34933f7 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,82 +1,77 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index e349815..1be151a 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,43 +1,39 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.6.9004</Version> <FileVersion>4.0.6.9004</FileVersion> <InformationalVersion>4.0.6.9004-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> </ItemGroup> </When> </Choose> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index ec3251d..9c26f8c 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,47 +1,42 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> </PropertyGroup> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <Choose> <When Condition="'$(TargetFramework)' == 'net40'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" /> </ItemGroup> </When> </Choose> <ItemGroup> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index e01a187..261beb2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,19 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + </Project> diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index c08a853..64ed1c0 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,48 +1,43 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index 962e7a8..4ac9891 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,33 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index dda90ad..8c4cee8 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,148 +1,144 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj index fc9ec17..aefbb1f 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -1,67 +1,62 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20;net40-client;portable40-net40+sl5+win8+wp8+wpa81;netstandard1.1</TargetFrameworks> <RootNamespace>Antlr.Runtime</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.1'"> <PropertyGroup> <DefineConstants>$(DefineConstants);PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <DefineConstants>$(DefineConstants);PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> </When> </Choose> - <PropertyGroup> - <GenerateDocumentationFile>True</GenerateDocumentationFile> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - </Project> \ No newline at end of file
antlr/antlrcs
cd4036522401fa1494f810cadea949c7b7b3d2f9
Configure strong name at the top level
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index 30a0f89..03127e2 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,103 +1,99 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System.Windows.Forms" /> <Reference Include="WindowsBase" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Update="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Update="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index be3cd10..9af7194 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,104 +1,97 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> - <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> - </ItemGroup> - </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 9c329c6..1085148 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,45 +1,42 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <Import Project="../Directory.Build.props" /> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Targets/Directory.Build.targets b/Antlr3.Targets/Directory.Build.targets index 781b1e6..af33e64 100644 --- a/Antlr3.Targets/Directory.Build.targets +++ b/Antlr3.Targets/Directory.Build.targets @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <Project> - <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> - </ItemGroup> - <Target Name="RemoveTransitiveProjectReferences" AfterTargets="IncludeTransitiveProjectReferences"> <ItemGroup> <ProjectReference Remove="@(_TransitiveProjectReferences)" /> </ItemGroup> </Target> <Import Project="../Directory.Build.targets" /> </Project> diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 25dd485..a76c262 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,392 +1,388 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 31e212c..4643376 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,115 +1,109 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 5ae7ee0..2377750 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,89 +1,82 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> - <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> - </ItemGroup> - </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 0554f80..ec3251d 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,51 +1,47 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net40'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" /> </ItemGroup> </When> </Choose> <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index d63fa1e..e01a187 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,14 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> <Project> + <PropertyGroup> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> </Project> diff --git a/Directory.Build.targets b/Directory.Build.targets index d92a1b7..b5e3064 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,13 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <Project> + <ItemGroup> + <None Condition="'$(SignAssembly)' == 'true'" Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.targets" /> </Project> diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index ddba6bc..c08a853 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,52 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index 413f7a8..962e7a8 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,40 +1,33 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> - <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> - </ItemGroup> - </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj index dc49223..fc9ec17 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -1,74 +1,67 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20;net40-client;portable40-net40+sl5+win8+wp8+wpa81;netstandard1.1</TargetFrameworks> <RootNamespace>Antlr.Runtime</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> - - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.1'"> <PropertyGroup> <DefineConstants>$(DefineConstants);PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <DefineConstants>$(DefineConstants);PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> - <ItemGroup> - <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> - </ItemGroup> - </Project> \ No newline at end of file
antlr/antlrcs
99bf0457c13f7230b1e44d2454bfe13a926ee662
Configure PDB generation at the top level
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index c8943c5..30a0f89 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,113 +1,103 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System.Windows.Forms" /> <Reference Include="WindowsBase" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Update="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Update="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 4eac703..be3cd10 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,114 +1,104 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 6d782f1..9c329c6 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,55 +1,45 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <Import Project="../Directory.Build.props" /> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index d88317f..0d8ee8d 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,54 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 59c75ad..31e212c 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,125 +1,115 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index d8e8808..5ae7ee0 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,99 +1,89 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index 3b7d0fb..e349815 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,53 +1,43 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.6.9004</Version> <FileVersion>4.0.6.9004</FileVersion> <InformationalVersion>4.0.6.9004-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> </ItemGroup> </When> </Choose> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 00421ea..0554f80 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,61 +1,51 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net40'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" /> </ItemGroup> </When> </Choose> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 341027f..d63fa1e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,3 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> <Project> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + </Project> diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index aeab8eb..ddba6bc 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,62 +1,52 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj index 4459c4d..dc49223 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -1,84 +1,74 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20;net40-client;portable40-net40+sl5+win8+wp8+wpa81;netstandard1.1</TargetFrameworks> <RootNamespace>Antlr.Runtime</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net40-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.1'"> <PropertyGroup> <DefineConstants>$(DefineConstants);PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <DefineConstants>$(DefineConstants);PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> </When> </Choose> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <DebugType>full</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <DebugType>pdbonly</DebugType> - <DebugSymbols>true</DebugSymbols> - </PropertyGroup> - <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
d87c1eb3d78a50058b07232569e6cd16e3867491
Create Directory.Build.props and Directory.Build.targets at the top level
diff --git a/Antlr3.StringTemplate/Directory.Build.targets b/Antlr3.StringTemplate/Directory.Build.targets deleted file mode 100644 index ad35b3c..0000000 --- a/Antlr3.StringTemplate/Directory.Build.targets +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project> - - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - - <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> - -</Project> diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 60bdcb3..6d782f1 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,53 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> <Project> + <Import Project="../Directory.Build.props" /> + <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Targets/Directory.Build.targets b/Antlr3.Targets/Directory.Build.targets index 368e02e..781b1e6 100644 --- a/Antlr3.Targets/Directory.Build.targets +++ b/Antlr3.Targets/Directory.Build.targets @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> <Target Name="RemoveTransitiveProjectReferences" AfterTargets="IncludeTransitiveProjectReferences"> <ItemGroup> <ProjectReference Remove="@(_TransitiveProjectReferences)" /> </ItemGroup> </Target> + <Import Project="../Directory.Build.targets" /> + </Project> diff --git a/Antlr3.sln b/Antlr3.sln index 22e12ea..bac5ed4 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,229 +1,231 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec + Directory.Build.props = Directory.Build.props + Directory.Build.targets = Directory.Build.targets build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Directory.Build.targets b/Antlr3/Directory.Build.targets deleted file mode 100644 index ad35b3c..0000000 --- a/Antlr3/Directory.Build.targets +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project> - - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - - <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> - -</Project> diff --git a/Antlr4.StringTemplate/Directory.Build.targets b/Antlr4.StringTemplate/Directory.Build.targets deleted file mode 100644 index ad35b3c..0000000 --- a/Antlr4.StringTemplate/Directory.Build.targets +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project> - - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - - <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> - -</Project> diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..341027f --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> +</Project> diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000..d92a1b7 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + + <Import Project="$(MSBuildThisFileDirectory)build\Bootstrap\Antlr3.targets" /> + +</Project> diff --git a/Runtime/Antlr3.Runtime.Test/Directory.Build.targets b/Runtime/Antlr3.Runtime.Test/Directory.Build.targets deleted file mode 100644 index d3a6081..0000000 --- a/Runtime/Antlr3.Runtime.Test/Directory.Build.targets +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project> - - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(MSBuildThisFileDirectory)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - - <Import Project="$(MSBuildThisFileDirectory)..\..\build\Bootstrap\Antlr3.targets" /> - -</Project>
antlr/antlrcs
9aa892473c355ce3ab303834700f6ee1b258c9c3
Remove old NuGet exclusions
diff --git a/.gitignore b/.gitignore index c5118cc..baa5c47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,41 +1,36 @@ # ignore thumbnails created by windows Thumbs.db # Ignore files build by Visual Studio *.user *.aps *.pch *.vspscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.cache *.ilk *.log *.sbr *.vs/ _ReSharper*/ [Tt]est[Rr]esult* -# User files related to NuGet project.json -*.lock.json -*.nuget.props -*.nuget.targets - # Ignore build output bin/ obj/ packages/ # Ignore prepared output folders build/prep/Backup/ build/prep/Bootstrap/ build/prep/dist/ build/prep/nuget/ build/prep/Runtime/ build/prep/ST3/ build/prep/ST4/ build/prep/Tool/
antlr/antlrcs
a394a67b70465ee2a3ab295c30afde765b23a19d
Add validation for MSBuild builds
diff --git a/.gitignore b/.gitignore index 3cb4ed5..c5118cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,40 +1,41 @@ # ignore thumbnails created by windows Thumbs.db # Ignore files build by Visual Studio *.user *.aps *.pch *.vspscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.cache *.ilk *.log *.sbr *.vs/ _ReSharper*/ [Tt]est[Rr]esult* # User files related to NuGet project.json *.lock.json *.nuget.props *.nuget.targets # Ignore build output bin/ obj/ +packages/ # Ignore prepared output folders build/prep/Backup/ build/prep/Bootstrap/ build/prep/dist/ build/prep/nuget/ build/prep/Runtime/ build/prep/ST3/ build/prep/ST4/ build/prep/Tool/ diff --git a/build/Validation/DotnetValidation.csproj b/build/Validation/DotnetValidation.csproj new file mode 100644 index 0000000..809a958 --- /dev/null +++ b/build/Validation/DotnetValidation.csproj @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFrameworks>net20;net30;net35;net40;net45;netcoreapp1.1;portable40-net40+sl5+win8+wp8+wpa81</TargetFrameworks> + <EnableDefaultNoneItems>False</EnableDefaultNoneItems> + <Antlr4UseCSharpGenerator>True</Antlr4UseCSharpGenerator> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> + <DefineConstants>$(DefineConstants);LEGACY_PCL</DefineConstants> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + </When> + </Choose> + + <ItemGroup> + <PackageReference Include="Antlr3" Version="3.5.2-dev" /> + </ItemGroup> + + <ItemGroup> + <None Include="NuGet.config" /> + </ItemGroup> + +</Project> diff --git a/build/Validation/DotnetValidation.sln b/build/Validation/DotnetValidation.sln new file mode 100644 index 0000000..485e898 --- /dev/null +++ b/build/Validation/DotnetValidation.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26621.2 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotnetValidation", "DotnetValidation.csproj", "{E1557B8D-28E5-4D82-AD1F-F483CD8ED931}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E1557B8D-28E5-4D82-AD1F-F483CD8ED931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1557B8D-28E5-4D82-AD1F-F483CD8ED931}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1557B8D-28E5-4D82-AD1F-F483CD8ED931}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1557B8D-28E5-4D82-AD1F-F483CD8ED931}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AAF2BF57-B4C1-49FA-AE88-6AC0DE5A9F1F} + EndGlobalSection +EndGlobal diff --git a/build/Validation/Grammar.g3 b/build/Validation/Grammar.g3 new file mode 100644 index 0000000..7b048de --- /dev/null +++ b/build/Validation/Grammar.g3 @@ -0,0 +1,14 @@ +grammar Grammar; + +options { + output=AST; +} + +public +compilationUnit + : 'text' EOF + ; + +WS + : (' ' | '\t' | '\r' | '\n')+ {Skip();} + ; diff --git a/build/Validation/NuGet.config b/build/Validation/NuGet.config new file mode 100644 index 0000000..d8f3cf3 --- /dev/null +++ b/build/Validation/NuGet.config @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <config> + <add key="globalPackagesFolder" value="packages" /> + </config> + <packageSources> + <add key="Local Build" value="..\prep\nuget" /> + </packageSources> +</configuration> diff --git a/build/Validation/Program.cs b/build/Validation/Program.cs new file mode 100644 index 0000000..df96d6f --- /dev/null +++ b/build/Validation/Program.cs @@ -0,0 +1,29 @@ +using System; +using Antlr.Runtime; +using Antlr.Runtime.Tree; + +[assembly: CLSCompliant(false)] + +namespace DotnetValidation +{ + class Program + { + static void Main(string[] args) + { + var lexer = new GrammarLexer(new ANTLRStringStream("text")); + var parser = new GrammarParser(new CommonTokenStream(lexer)); + var tree = parser.compilationUnit(); + + Action<string> writeLine; + +#if LEGACY_PCL + var writeLineMethod = typeof(int).Assembly.GetType("Console").GetMethod("WriteLine", new[] { typeof(string) }); + writeLine = (Action<string>)Delegate.CreateDelegate(typeof(Action<string>), writeLineMethod); +#else + writeLine = Console.WriteLine; +#endif + + writeLine(new DotTreeGenerator().ToDot((ITree)tree.Tree)); + } + } +} diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 2754b7f..66ad1db 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,247 +1,303 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', - [string]$Logger + [string]$Logger, + [switch]$NoValidate ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Rules\*" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } + +# Validate the build + +If (-not $NoValidate) { + #git 'clean' '-dxf' '..\Validation' + #dotnet 'run' '--project' '..\Validation\DotnetValidation.csproj' '--framework' 'netcoreapp1.1' + #if (-not $?) { + # $host.ui.WriteErrorLine('Build failed, aborting!') + # Exit $LASTEXITCODE + #} + + git 'clean' '-dxf' '..\Validation' + .\NuGet.exe 'restore' '..\Validation' + &$msbuild '/nologo' '/m' '/nr:false' '/t:Rebuild' $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" '..\Validation\DotnetValidation.sln' + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\net20\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\net30\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\net35\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\net40\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\portable40-net40+sl5+win8+wp8+wpa81\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } + + "..\Validation\bin\$BuildConfig\net45\DotnetValidation.exe" + if (-not $?) { + $host.ui.WriteErrorLine('Build failed, aborting!') + Exit 1 + } +}
antlr/antlrcs
9fc8e926b99ef6bf7384b095a114708087184732
Remove the use of AppDomain in the build tasks
diff --git a/AntlrBuildTask/AntlrClassGenerationTask.cs b/AntlrBuildTask/AntlrClassGenerationTask.cs index 88d1398..9059215 100644 --- a/AntlrBuildTask/AntlrClassGenerationTask.cs +++ b/AntlrBuildTask/AntlrClassGenerationTask.cs @@ -1,322 +1,305 @@ /* * [The "BSD licence"] * Copyright (c) 2009 Sam Harwell * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Build.Tasks { using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; - using System.Security; - using System.Security.Policy; using System.Threading; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Directory = System.IO.Directory; using File = System.IO.File; using FileAttributes = System.IO.FileAttributes; using Path = System.IO.Path; public class AntlrClassGenerationTask : Task { - private static AppDomain _sharedAppDomain; + private static readonly SemaphoreSlim _lock = new SemaphoreSlim(1); private const string DefaultGeneratedSourceExtension = "g"; private List<ITaskItem> _generatedCodeFiles = new List<ITaskItem>(); public AntlrClassGenerationTask() { this.GeneratedSourceExtension = DefaultGeneratedSourceExtension; } [Required] public string AntlrToolPath { get; set; } [Required] public string OutputPath { get; set; } public string TargetLanguage { get; set; } public string BuildTaskPath { get; set; } public ITaskItem[] SourceCodeFiles { get; set; } public ITaskItem[] TokensFiles { get; set; } public ITaskItem[] AbstractGrammarFiles { get; set; } public string GeneratedSourceExtension { get; set; } public string RootNamespace { get; set; } public string[] LanguageSourceExtensions { get; set; } public bool DebugGrammar { get; set; } public bool ProfileGrammar { get; set; } [Output] public ITaskItem[] GeneratedCodeFiles { get { return this._generatedCodeFiles.ToArray(); } set { this._generatedCodeFiles = new List<ITaskItem>(value); } } - public AppDomain GetAntlrTaskAppDomain() - { - if (_sharedAppDomain != null) - return _sharedAppDomain; - - AppDomainSetup info = new AppDomainSetup - { - ApplicationBase = BuildTaskPath, - LoaderOptimization = LoaderOptimization.MultiDomainHost, - ShadowCopyFiles = "true" - }; - - string friendlyName = "AntlrClassGenerationDomain_" + Guid.NewGuid(); - _sharedAppDomain = AppDomain.CreateDomain(friendlyName, AppDomain.CurrentDomain.Evidence, info, new NamedPermissionSet("FullTrust"), new StrongName[0]); - return _sharedAppDomain; - } - public override bool Execute() { - AppDomain domain = null; bool success; if (!Path.IsPathRooted(AntlrToolPath)) AntlrToolPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), AntlrToolPath); if (!Path.IsPathRooted(BuildTaskPath)) BuildTaskPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), BuildTaskPath); try { - domain = GetAntlrTaskAppDomain(); - AntlrClassGenerationTaskInternal wrapper = CreateBuildTaskWrapper(domain); - success = wrapper.Execute(); + AntlrClassGenerationTaskInternal wrapper = CreateBuildTaskWrapper(); + + _lock.Wait(); + try + { + success = wrapper.Execute(); + } + finally + { + _lock.Release(); + } if (success) { _generatedCodeFiles.AddRange(wrapper.GeneratedCodeFiles.Select(file => (ITaskItem)new TaskItem(file))); } foreach (BuildMessage message in wrapper.BuildMessages) { ProcessBuildMessage(message); } } catch (Exception exception) { if (IsFatalException(exception)) throw; ProcessExceptionAsBuildMessage(exception); success = false; } - finally - { - if (domain != null && domain != _sharedAppDomain) - AppDomain.Unload(domain); - } return success; } private void ProcessExceptionAsBuildMessage(Exception exception) { ProcessBuildMessage(new BuildMessage(exception.Message)); } private void ProcessBuildMessage(BuildMessage message) { string logMessage; string errorCode; errorCode = Log.ExtractMessageCode(message.Message, out logMessage); if (string.IsNullOrEmpty(errorCode)) { errorCode = "AC1000"; logMessage = "Unknown build error: " + message.Message; } string subcategory = null; string helpKeyword = null; switch (message.Severity) { case TraceLevel.Error: this.Log.LogError(subcategory, errorCode, helpKeyword, message.FileName, message.LineNumber, message.ColumnNumber, 0, 0, logMessage); break; case TraceLevel.Warning: this.Log.LogWarning(subcategory, errorCode, helpKeyword, message.FileName, message.LineNumber, message.ColumnNumber, 0, 0, logMessage); break; case TraceLevel.Info: this.Log.LogMessage(MessageImportance.Normal, logMessage); break; case TraceLevel.Verbose: this.Log.LogMessage(MessageImportance.Low, logMessage); break; } } - private AntlrClassGenerationTaskInternal CreateBuildTaskWrapper(AppDomain domain) + private AntlrClassGenerationTaskInternal CreateBuildTaskWrapper() { - AntlrClassGenerationTaskInternal wrapper = (AntlrClassGenerationTaskInternal)domain.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(AntlrClassGenerationTaskInternal).FullName); + var wrapper = new AntlrClassGenerationTaskInternal(); IList<string> sourceCodeFiles = null; if (this.SourceCodeFiles != null) { sourceCodeFiles = new List<string>(SourceCodeFiles.Length); foreach (ITaskItem taskItem in SourceCodeFiles) sourceCodeFiles.Add(taskItem.ItemSpec); } if (this.TokensFiles != null && this.TokensFiles.Length > 0) { Directory.CreateDirectory(OutputPath); HashSet<string> copied = new HashSet<string>(StringComparer.OrdinalIgnoreCase); foreach (ITaskItem taskItem in TokensFiles) { string fileName = taskItem.ItemSpec; if (!File.Exists(fileName)) { Log.LogError("The tokens file '{0}' does not exist.", fileName); continue; } string vocabName = Path.GetFileNameWithoutExtension(fileName); if (!copied.Add(vocabName)) { Log.LogWarning("The tokens file '{0}' conflicts with another tokens file in the same project.", fileName); continue; } string target = Path.Combine(OutputPath, Path.GetFileName(fileName)); if (!Path.GetExtension(target).Equals(".tokens", StringComparison.OrdinalIgnoreCase)) { Log.LogError("The destination for the tokens file '{0}' did not have the correct extension '.tokens'.", target); continue; } File.Copy(fileName, target, true); File.SetAttributes(target, File.GetAttributes(target) & ~FileAttributes.ReadOnly); } } wrapper.AntlrToolPath = AntlrToolPath; wrapper.SourceCodeFiles = sourceCodeFiles; wrapper.TargetLanguage = TargetLanguage; wrapper.OutputPath = OutputPath; wrapper.RootNamespace = RootNamespace; wrapper.GeneratedSourceExtension = GeneratedSourceExtension; wrapper.LanguageSourceExtensions = LanguageSourceExtensions; wrapper.DebugGrammar = DebugGrammar; wrapper.ProfileGrammar = ProfileGrammar; return wrapper; } private static bool IsFatalException(Exception exception) { while (exception != null) { if ((exception is OutOfMemoryException) || (exception is InsufficientMemoryException) || (exception is ThreadAbortException)) { return true; } if (!(exception is TypeInitializationException) && !(exception is TargetInvocationException)) { break; } exception = exception.InnerException; } return false; } } } diff --git a/AntlrBuildTask/AntlrClassGenerationTaskInternal.cs b/AntlrBuildTask/AntlrClassGenerationTaskInternal.cs index 905379b..69fad9b 100644 --- a/AntlrBuildTask/AntlrClassGenerationTaskInternal.cs +++ b/AntlrBuildTask/AntlrClassGenerationTaskInternal.cs @@ -1,223 +1,223 @@ /* * [The "BSD licence"] * Copyright (c) 2009 Sam Harwell * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Build.Tasks { using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Text; - internal class AntlrClassGenerationTaskInternal : MarshalByRefObject + internal class AntlrClassGenerationTaskInternal { private List<string> _generatedCodeFiles = new List<string>(); private IList<string> _sourceCodeFiles = new List<string>(); private List<BuildMessage> _buildMessages = new List<BuildMessage>(); public IList<string> GeneratedCodeFiles { get { return this._generatedCodeFiles; } } public string AntlrToolPath { get; set; } public string GeneratedSourceExtension { get; set; } public string TargetLanguage { get; set; } public string OutputPath { get; set; } public string RootNamespace { get; set; } public string[] LanguageSourceExtensions { get; set; } public bool DebugGrammar { get; set; } public bool ProfileGrammar { get; set; } public IList<string> SourceCodeFiles { get { return this._sourceCodeFiles; } set { this._sourceCodeFiles = value; } } public IList<BuildMessage> BuildMessages { get { return _buildMessages; } } public bool Execute() { try { Assembly antlrAssembly = Assembly.LoadFrom(AntlrToolPath); Type antlrToolType = antlrAssembly.GetType("Antlr3.AntlrTool"); Type errorManagerType = antlrAssembly.GetType("Antlr3.Tool.ErrorManager"); object tool = Activator.CreateInstance(antlrAssembly.GetType("Antlr3.AntlrTool"), new object[] { Path.GetDirectoryName(AntlrToolPath) }); Action process = (Action)Delegate.CreateDelegate(typeof(Action), tool, antlrToolType.GetMethod("Process")); Action<string[]> ProcessArgs = (Action<string[]>)Delegate.CreateDelegate(typeof(Action<string[]>), tool, antlrToolType.GetMethod("ProcessArgs")); Func<IList<string>> GetGeneratedFiles = (Func<IList<string>>)Delegate.CreateDelegate(typeof(Func<IList<string>>), tool, antlrToolType.GetProperty("GeneratedFiles").GetGetMethod()); Func<int> GetNumErrors = (Func<int>)Delegate.CreateDelegate(typeof(Func<int>), errorManagerType.GetMethod("GetNumErrors")); Action<TraceListener> SetTraceListener = (Action<TraceListener>)Delegate.CreateDelegate(typeof(Action<TraceListener>), errorManagerType.GetProperty("ExternalListener").GetSetMethod()); TimeSpan conversionTimeout = TimeSpan.FromSeconds(10); List<string> args = new List<string>() { "-Xconversiontimeout", ((int)conversionTimeout.TotalMilliseconds).ToString(), "-fo", OutputPath, "-message-format", "vs2005" }; if (DebugGrammar) args.Add("-debug"); if (ProfileGrammar) args.Add("-profile"); if (!string.IsNullOrEmpty(TargetLanguage)) { args.Add("-language"); args.Add(TargetLanguage); } args.AddRange(SourceCodeFiles); using (LoggingTraceListener traceListener = new LoggingTraceListener(_buildMessages)) { SetTraceListener(traceListener); ProcessArgs(args.ToArray()); process(); } _generatedCodeFiles.AddRange(GetGeneratedFiles().Where(file => LanguageSourceExtensions.Contains(Path.GetExtension(file), StringComparer.OrdinalIgnoreCase))); int errorCount = GetNumErrors(); return errorCount == 0; } catch (Exception e) { if (e is TargetInvocationException && e.InnerException != null) e = e.InnerException; _buildMessages.Add(new BuildMessage(e.Message)); throw; } } private class LoggingTraceListener : TraceListener { private readonly ICollection<BuildMessage> _buildMessages; private StringBuilder _currentLine; public LoggingTraceListener(IList<BuildMessage> buildMessages) { _buildMessages = buildMessages; _currentLine = new StringBuilder(); } protected override void Dispose(bool disposing) { if (disposing) WriteLine(string.Empty); base.Dispose(disposing); } public override void Write(string message) { _currentLine.Append(message); } public override void WriteLine(string message) { if (_currentLine.Length > 0) { _buildMessages.Add(new BuildMessage(_currentLine.ToString())); _currentLine.Length = 0; } if (!string.IsNullOrEmpty(message)) { Write(message); WriteLine(null); } } } } }
antlr/antlrcs
a6a325100293865f0d40667a6ac4ea9c6b645260
Expand item type support to include AntlrTokens and AntlrAbstractGrammar items
diff --git a/AntlrBuildTask/Antlr3.targets b/AntlrBuildTask/Antlr3.targets index 3e70cb2..e67b491 100644 --- a/AntlrBuildTask/Antlr3.targets +++ b/AntlrBuildTask/Antlr3.targets @@ -1,217 +1,225 @@ <!-- [The "BSD licence"] Copyright (c) 2011 Sam Harwell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> </PropertyGroup> <PropertyGroup Condition="'$(AntlrIsSdkProject)' == ''"> <AntlrIsSdkProject>False</AntlrIsSdkProject> <AntlrIsSdkProject Condition="'$(TargetFramework)' != '' OR '$(TargetFrameworks)' != ''">True</AntlrIsSdkProject> </PropertyGroup> <PropertyGroup> <BuildSystem>MSBuild</BuildSystem> <TaskVersion>3.5.0.2</TaskVersion> <TaskKeyToken>eb42632606e9261f</TaskKeyToken> <AntlrBuildTaskAssemblyName Condition="'$(AntlrBuildTaskAssemblyName)'==''">AntlrBuildTask, Version=$(TaskVersion), Culture=neutral, PublicKeyToken=$(TaskKeyToken)</AntlrBuildTaskAssemblyName> </PropertyGroup> <PropertyGroup> <LoadTimeSensitiveTargets> $(LoadTimeSensitiveTargets); AntlrCompile; </LoadTimeSensitiveTargets> <LoadTimeSensitiveProperties> $(LoadTimeSensitiveProperties); AntlrCompileDependsOn; </LoadTimeSensitiveProperties> </PropertyGroup> <PropertyGroup> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'==''">$(MSBuildBinPath)</AntlrBuildTaskLocation> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'!=''">$(AntlrBuildTaskPath)</AntlrBuildTaskLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'==''">$(MSBuildBinPath)\Antlr3\Antlr3.exe</AntlrToolLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'!=''">$(AntlrToolPath)</AntlrToolLocation> </PropertyGroup> <PropertyGroup> <AntlrGenCodeFileNames Condition="'$(AntlrGenCodeFileNames)'==''">$(MSBuildProjectFile).AntlrGeneratedCodeFileListAbsolute.txt</AntlrGenCodeFileNames> </PropertyGroup> <UsingTask Condition="'$(AntlrBuildTaskPath)'==''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyName="$(AntlrBuildTaskAssemblyName)" /> <UsingTask Condition="'$(AntlrBuildTaskPath)'!=''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyFile="$(AntlrBuildTaskPath)\AntlrBuildTask.dll" /> <PropertyGroup> <PrepareResourcesDependsOn> AntlrCompile; AntlrCompileAddFilesGenerated; $(PrepareResourcesDependsOn) </PrepareResourcesDependsOn> </PropertyGroup> <PropertyGroup> <AntlrCompileDependsOn> AntlrCompileReadGeneratedFileList </AntlrCompileDependsOn> </PropertyGroup> <ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'"> <AvailableItemName Include="Antlr3" /> <AvailableItemName Include="AntlrTokens" /> <AvailableItemName Include="AntlrAbstractGrammar" /> </ItemGroup> <ItemDefinitionGroup> <Antlr3> <Generator>MSBuild:Compile</Generator> <CustomToolNamespace Condition="'$(AntlrIsSdkProject)' != 'True'">$(RootNamespace)</CustomToolNamespace> <TargetLanguage/> <DebugGrammar>false</DebugGrammar> <ProfileGrammar>false</ProfileGrammar> </Antlr3> </ItemDefinitionGroup> <Target Name="AntlrCompileReadGeneratedFileList"> <ReadLinesFromFile File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)"> <Output TaskParameter="Lines" ItemName="AntlrOutputCodeFilesList"/> </ReadLinesFromFile> </Target> <PropertyGroup> <!-- Add grammar compilation to the CoreCompileDependsOn so that the IDE inproc compilers (particularly VB) can "see" the generated source files. --> <CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' "> DesignTimeGrammarCompilation; $(CoreCompileDependsOn) </CoreCompileDependsOn> </PropertyGroup> <Target Name="DesignTimeGrammarCompilation"> <PropertyGroup> <AntlrDesignTimeBuild Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">true</AntlrDesignTimeBuild> </PropertyGroup> <!-- Only if we are not actually performing a compile i.e. we are in design mode --> <CallTarget Condition="'$(AntlrDesignTimeBuild)' == 'true'" Targets="AntlrCompile" /> </Target> <Target Name="AntlrCompile" DependsOnTargets="$(AntlrCompileDependsOn)" Condition="'@(Antlr3)' != ''" Inputs="@(Antlr3);@(AntlrTokens);@(AntlrAbstractGrammar)" Outputs="@(AntlrOutputCodeFilesList); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);"> <ItemGroup> <AntlrGeneratedCodeFiles Remove="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> <PropertyGroup> <AntlrDesignTimeBuild>false</AntlrDesignTimeBuild> <AntlrDesignTimeBuild Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">true</AntlrDesignTimeBuild> </PropertyGroup> <AntlrClassGenerationTask AntlrToolPath="$(AntlrToolLocation)" BuildTaskPath="$(AntlrBuildTaskLocation)" OutputPath="$(IntermediateOutputPath)" TargetLanguage="%(Antlr3.TargetLanguage)" SourceCodeFiles="@(Antlr3)" ContinueOnError="$(AntlrDesignTimeBuild)" TokensFiles="@(AntlrTokens)" AbstractGrammarFiles="@(AntlrAbstractGrammar)" LanguageSourceExtensions="$(DefaultLanguageSourceExtension)" DebugGrammar="%(Antlr3.DebugGrammar)" ProfileGrammar="%(Antlr3.ProfileGrammar)"> <Output ItemName="AntlrGeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> </AntlrClassGenerationTask> <WriteLinesToFile Condition="'$(AntlrDesignTimeBuild)' != 'true'" File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)" Lines="@(AntlrGeneratedCodeFiles)" Overwrite="true"/> </Target> <Target Name="AntlrCompileAddFilesGenerated" AfterTargets="AntlrCompile" Condition="'@(Antlr3)' != ''"> <ItemGroup> <AntlrGeneratedCodeFiles Condition="'@(AntlrGeneratedCodeFiles)' == ''" Include="@(AntlrOutputCodeFilesList)" /> </ItemGroup> <ItemGroup> <FileWrites Include="@(AntlrGeneratedCodeFiles); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);" /> </ItemGroup> <ItemGroup> <Compile Include="@(AntlrGeneratedCodeFiles)" /> <!-- The WinFX "GenerateTemporaryTargetAssembly" target requires generated code files be added here. --> <_GeneratedCodeFiles Include="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> </Target> <Choose> <When Condition="'$(AntlrIsSdkProject)' == 'True'"> <PropertyGroup> <EnableDefaultAntlrItems Condition="'$(EnableDefaultAntlrItems)' == ''">True</EnableDefaultAntlrItems> </PropertyGroup> <ItemGroup Condition="'$(EnableDefaultItems)' == 'True'"> <Antlr3 Include="**/*.g" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> <Antlr3 Include="**/*.g3" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + <AntlrTokens Include="**/*.tokens" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> </ItemGroup> <ItemGroup Condition="'$(EnableDefaultItems)' == 'True' AND '$(EnableDefaultNoneItems)' == 'True'"> <None Remove="**/*.g" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> <None Remove="**/*.g3" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + <None Remove="**/*.tokens" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> </ItemGroup> <ItemGroup> <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Antlr3.ProjectItemsSchema.xml"> <Context>Project</Context> </PropertyPageSchema> <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Antlr3.xml"> <Context>File;BrowseObject</Context> </PropertyPageSchema> + <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\AntlrAbstractGrammar.xml"> + <Context>File;BrowseObject</Context> + </PropertyPageSchema> + <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\AntlrTokens.xml"> + <Context>File;BrowseObject</Context> + </PropertyPageSchema> </ItemGroup> <!-- Modify the CustomToolNamespace based on the directory location of the grammar --> <ItemGroup> <Antlr3 Update="@(Antlr3)" DefaultCustomToolNamespace="$([MSBuild]::ValueOrDefault(%(RelativeDir), '').Replace('\', '.').Replace('/', '.').TrimEnd('.'))" /> <Antlr3 Update="@(Antlr3)" Condition="'$(RootNamespace)' != ''" DefaultCustomToolNamespace="$([MSBuild]::ValueOrDefault('$(RootNamespace).%(DefaultCustomToolNamespace)', '').TrimEnd('.'))" /> <Antlr3 Update="@(Antlr3)" CustomToolNamespace="$([MSBuild]::ValueOrDefault(%(CustomToolNamespace), %(DefaultCustomToolNamespace)))" /> </ItemGroup> </When> </Choose> </Project> diff --git a/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml b/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml index 5f91a67..3b9bb9d 100644 --- a/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml +++ b/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> <ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties"> <ContentType Name="Antlr3" DisplayName="ANTLR 3 Grammar" ItemType="Antlr3" /> + <ContentType Name="AntlrAbstractGrammar" DisplayName="ANTLR 3 Imported Grammar" ItemType="AntlrAbstractGrammar" /> + <ContentType Name="AntlrTokens" DisplayName="ANTLR 3 Tokens File" ItemType="AntlrTokens" /> + <ItemType Name="Antlr3" DisplayName="ANTLR 3 grammar" /> + <ItemType Name="AntlrAbstractGrammar" DisplayName="ANTLR 3 imported grammar" /> + <ItemType Name="AntlrTokens" DisplayName="ANTLR 3 tokens file" /> + <FileExtension Name=".g" ContentType="Antlr3" /> <FileExtension Name=".g3" ContentType="Antlr3" /> + <FileExtension Name=".tokens" ContentType="AntlrTokens" /> </ProjectSchemaDefinitions> diff --git a/AntlrBuildTask/Rules/AntlrAbstractGrammar.xml b/AntlrBuildTask/Rules/AntlrAbstractGrammar.xml new file mode 100644 index 0000000..243558e --- /dev/null +++ b/AntlrBuildTask/Rules/AntlrAbstractGrammar.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<Rule Name="AntlrAbstractGrammar" DisplayName="File Properties" PageTemplate="generic" Description="File Properties" xmlns="http://schemas.microsoft.com/build/2009/properties"> + <Rule.DataSource> + <DataSource Persistence="ProjectFile" ItemType="AntlrAbstractGrammar" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </Rule.DataSource> + + <Rule.Categories> + <Category Name="Advanced" DisplayName="Advanced" /> + <Category Name="Misc" DisplayName="Misc" /> + </Rule.Categories> + + <!-- + The rest of these properties are not ANTLR-specific, but CPS provides no way to inherit properties, so if we fail to + include them then they will just disappear. + --> + + <DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action" Category="Advanced" + Description="How the file relates to the build and deployment processes." + EnumProvider="ItemTypes" /> + <EnumProperty + Name="CopyToOutputDirectory" + DisplayName="Copy to Output Directory" + Category="Advanced" + Description="Specifies the source file will be copied to the output directory."> + <EnumValue Name="Never" DisplayName="Do not copy" /> + <EnumValue Name="Always" DisplayName="Copy always" /> + <EnumValue Name="PreserveNewest" DisplayName="Copy if newer" /> + </EnumProperty> + + <StringProperty + Name="Generator" + Category="Advanced" + DisplayName="Custom Tool" + Description="Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool." /> + <StringProperty + Name="CustomToolNamespace" + Category="Advanced" + DisplayName="Custom Tool Namespace" + Description="The namespace into which the output of the custom tool is placed." /> + + <StringProperty + Name="Identity" + Visible="false" + ReadOnly="true" + Category="Misc" + Description="The item specified in the Include attribute."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrAbstractGrammar" PersistedName="Identity" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FullPath" + DisplayName="Full Path" + ReadOnly="true" + Category="Misc" + Description="Location of the file."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrAbstractGrammar" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FileNameAndExtension" + DisplayName="File Name" + ReadOnly="true" + Category="Misc" + Description="Name of the file or folder."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrAbstractGrammar" PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty Name="URL" ReadOnly="true" Visible="false"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrAbstractGrammar" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <BoolProperty Name="Visible" Visible="false" /> + <StringProperty Name="DependentUpon" Visible="false" /> + <StringProperty Name="Link" Visible="false"> + <StringProperty.DataSource> + <DataSource PersistenceStyle="Attribute" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="Extension" Visible="False" ReadOnly="true"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrAbstractGrammar" PersistedName="Extension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="LastGenOutput" Visible="false" Description="The filename of the last file generated as a result of the SFG." /> + <BoolProperty Name="DesignTime" Visible="false" Description="A value indicating whether this file has a designer." /> + <BoolProperty Name="AutoGen" Visible="false" Description="A value indicating whether this is a generated file." /> + <StringProperty Name="CustomTool" Visible="false" Description="DTE Property for accessing the Generator property."> + <StringProperty.DataSource> + <DataSource Persistence="ProjectFile" ItemType="AntlrAbstractGrammar" PersistedName="Generator" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> +</Rule> diff --git a/AntlrBuildTask/Rules/AntlrTokens.xml b/AntlrBuildTask/Rules/AntlrTokens.xml new file mode 100644 index 0000000..0050aed --- /dev/null +++ b/AntlrBuildTask/Rules/AntlrTokens.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<Rule Name="AntlrTokens" DisplayName="File Properties" PageTemplate="generic" Description="File Properties" xmlns="http://schemas.microsoft.com/build/2009/properties"> + <Rule.DataSource> + <DataSource Persistence="ProjectFile" ItemType="AntlrTokens" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </Rule.DataSource> + + <Rule.Categories> + <Category Name="Advanced" DisplayName="Advanced" /> + <Category Name="Misc" DisplayName="Misc" /> + </Rule.Categories> + + <!-- + The rest of these properties are not ANTLR-specific, but CPS provides no way to inherit properties, so if we fail to + include them then they will just disappear. + --> + + <DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action" Category="Advanced" + Description="How the file relates to the build and deployment processes." + EnumProvider="ItemTypes" /> + <EnumProperty + Name="CopyToOutputDirectory" + DisplayName="Copy to Output Directory" + Category="Advanced" + Description="Specifies the source file will be copied to the output directory."> + <EnumValue Name="Never" DisplayName="Do not copy" /> + <EnumValue Name="Always" DisplayName="Copy always" /> + <EnumValue Name="PreserveNewest" DisplayName="Copy if newer" /> + </EnumProperty> + + <StringProperty + Name="Generator" + Category="Advanced" + DisplayName="Custom Tool" + Description="Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool." /> + <StringProperty + Name="CustomToolNamespace" + Category="Advanced" + DisplayName="Custom Tool Namespace" + Description="The namespace into which the output of the custom tool is placed." /> + + <StringProperty + Name="Identity" + Visible="false" + ReadOnly="true" + Category="Misc" + Description="The item specified in the Include attribute."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrTokens" PersistedName="Identity" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FullPath" + DisplayName="Full Path" + ReadOnly="true" + Category="Misc" + Description="Location of the file."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrTokens" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FileNameAndExtension" + DisplayName="File Name" + ReadOnly="true" + Category="Misc" + Description="Name of the file or folder."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrTokens" PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty Name="URL" ReadOnly="true" Visible="false"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrTokens" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <BoolProperty Name="Visible" Visible="false" /> + <StringProperty Name="DependentUpon" Visible="false" /> + <StringProperty Name="Link" Visible="false"> + <StringProperty.DataSource> + <DataSource PersistenceStyle="Attribute" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="Extension" Visible="False" ReadOnly="true"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="AntlrTokens" PersistedName="Extension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="LastGenOutput" Visible="false" Description="The filename of the last file generated as a result of the SFG." /> + <BoolProperty Name="DesignTime" Visible="false" Description="A value indicating whether this file has a designer." /> + <BoolProperty Name="AutoGen" Visible="false" Description="A value indicating whether this is a generated file." /> + <StringProperty Name="CustomTool" Visible="false" Description="DTE Property for accessing the Generator property."> + <StringProperty.DataSource> + <DataSource Persistence="ProjectFile" ItemType="AntlrTokens" PersistedName="Generator" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> +</Rule> diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index 31b775f..11d0941 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,37 +1,39 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Tools --> <file src="Bootstrap\**\*.*" target="tools"/> <!-- Build Configuration --> <file src="Tool\Antlr3.props" target="build"/> <file src="Tool\Antlr3.targets" target="build"/> <file src="Tool\AntlrBuildTask.dll" target="build"/> <file src="Tool\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> <file src="Tool\Rules\Antlr3.xml" target="build\Rules" /> + <file src="Tool\Rules\AntlrAbstractGrammar.xml" target="build\Rules" /> + <file src="Tool\Rules\AntlrTokens.xml" target="build\Rules" /> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 47dfd10..2754b7f 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,245 +1,247 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Rules\*" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\Rules\AntlrAbstractGrammar.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\Rules\AntlrTokens.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
51f3c42cccaa6eaf18a1d9c0ec46eb6e0fdc22f7
Show grammar properties when using the new project system
diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index e868a17..4eac703 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,113 +1,114 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index d1c4282..25dd485 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,391 +1,392 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 58dc938..d8e8808 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,98 +1,99 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/Antlr3.targets b/AntlrBuildTask/Antlr3.targets index 8227cd4..3e70cb2 100644 --- a/AntlrBuildTask/Antlr3.targets +++ b/AntlrBuildTask/Antlr3.targets @@ -1,178 +1,217 @@ <!-- [The "BSD licence"] Copyright (c) 2011 Sam Harwell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> </PropertyGroup> + <PropertyGroup Condition="'$(AntlrIsSdkProject)' == ''"> + <AntlrIsSdkProject>False</AntlrIsSdkProject> + <AntlrIsSdkProject Condition="'$(TargetFramework)' != '' OR '$(TargetFrameworks)' != ''">True</AntlrIsSdkProject> + </PropertyGroup> + <PropertyGroup> <BuildSystem>MSBuild</BuildSystem> <TaskVersion>3.5.0.2</TaskVersion> <TaskKeyToken>eb42632606e9261f</TaskKeyToken> <AntlrBuildTaskAssemblyName Condition="'$(AntlrBuildTaskAssemblyName)'==''">AntlrBuildTask, Version=$(TaskVersion), Culture=neutral, PublicKeyToken=$(TaskKeyToken)</AntlrBuildTaskAssemblyName> </PropertyGroup> <PropertyGroup> <LoadTimeSensitiveTargets> $(LoadTimeSensitiveTargets); AntlrCompile; </LoadTimeSensitiveTargets> <LoadTimeSensitiveProperties> $(LoadTimeSensitiveProperties); AntlrCompileDependsOn; </LoadTimeSensitiveProperties> </PropertyGroup> <PropertyGroup> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'==''">$(MSBuildBinPath)</AntlrBuildTaskLocation> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'!=''">$(AntlrBuildTaskPath)</AntlrBuildTaskLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'==''">$(MSBuildBinPath)\Antlr3\Antlr3.exe</AntlrToolLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'!=''">$(AntlrToolPath)</AntlrToolLocation> </PropertyGroup> <PropertyGroup> <AntlrGenCodeFileNames Condition="'$(AntlrGenCodeFileNames)'==''">$(MSBuildProjectFile).AntlrGeneratedCodeFileListAbsolute.txt</AntlrGenCodeFileNames> </PropertyGroup> <UsingTask Condition="'$(AntlrBuildTaskPath)'==''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyName="$(AntlrBuildTaskAssemblyName)" /> <UsingTask Condition="'$(AntlrBuildTaskPath)'!=''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyFile="$(AntlrBuildTaskPath)\AntlrBuildTask.dll" /> <PropertyGroup> <PrepareResourcesDependsOn> AntlrCompile; AntlrCompileAddFilesGenerated; $(PrepareResourcesDependsOn) </PrepareResourcesDependsOn> </PropertyGroup> <PropertyGroup> <AntlrCompileDependsOn> AntlrCompileReadGeneratedFileList </AntlrCompileDependsOn> </PropertyGroup> <ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'"> <AvailableItemName Include="Antlr3" /> <AvailableItemName Include="AntlrTokens" /> <AvailableItemName Include="AntlrAbstractGrammar" /> </ItemGroup> <ItemDefinitionGroup> <Antlr3> <Generator>MSBuild:Compile</Generator> + <CustomToolNamespace Condition="'$(AntlrIsSdkProject)' != 'True'">$(RootNamespace)</CustomToolNamespace> <TargetLanguage/> <DebugGrammar>false</DebugGrammar> <ProfileGrammar>false</ProfileGrammar> </Antlr3> </ItemDefinitionGroup> <Target Name="AntlrCompileReadGeneratedFileList"> <ReadLinesFromFile File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)"> <Output TaskParameter="Lines" ItemName="AntlrOutputCodeFilesList"/> </ReadLinesFromFile> </Target> <PropertyGroup> <!-- Add grammar compilation to the CoreCompileDependsOn so that the IDE inproc compilers (particularly VB) can "see" the generated source files. --> <CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' "> DesignTimeGrammarCompilation; $(CoreCompileDependsOn) </CoreCompileDependsOn> </PropertyGroup> <Target Name="DesignTimeGrammarCompilation"> <PropertyGroup> <AntlrDesignTimeBuild Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">true</AntlrDesignTimeBuild> </PropertyGroup> <!-- Only if we are not actually performing a compile i.e. we are in design mode --> <CallTarget Condition="'$(AntlrDesignTimeBuild)' == 'true'" Targets="AntlrCompile" /> </Target> <Target Name="AntlrCompile" DependsOnTargets="$(AntlrCompileDependsOn)" Condition="'@(Antlr3)' != ''" Inputs="@(Antlr3);@(AntlrTokens);@(AntlrAbstractGrammar)" Outputs="@(AntlrOutputCodeFilesList); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);"> <ItemGroup> <AntlrGeneratedCodeFiles Remove="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> <PropertyGroup> <AntlrDesignTimeBuild>false</AntlrDesignTimeBuild> <AntlrDesignTimeBuild Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">true</AntlrDesignTimeBuild> </PropertyGroup> <AntlrClassGenerationTask AntlrToolPath="$(AntlrToolLocation)" BuildTaskPath="$(AntlrBuildTaskLocation)" OutputPath="$(IntermediateOutputPath)" TargetLanguage="%(Antlr3.TargetLanguage)" SourceCodeFiles="@(Antlr3)" ContinueOnError="$(AntlrDesignTimeBuild)" TokensFiles="@(AntlrTokens)" AbstractGrammarFiles="@(AntlrAbstractGrammar)" LanguageSourceExtensions="$(DefaultLanguageSourceExtension)" DebugGrammar="%(Antlr3.DebugGrammar)" ProfileGrammar="%(Antlr3.ProfileGrammar)"> <Output ItemName="AntlrGeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> </AntlrClassGenerationTask> <WriteLinesToFile Condition="'$(AntlrDesignTimeBuild)' != 'true'" File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)" Lines="@(AntlrGeneratedCodeFiles)" Overwrite="true"/> </Target> <Target Name="AntlrCompileAddFilesGenerated" AfterTargets="AntlrCompile" Condition="'@(Antlr3)' != ''"> <ItemGroup> <AntlrGeneratedCodeFiles Condition="'@(AntlrGeneratedCodeFiles)' == ''" Include="@(AntlrOutputCodeFilesList)" /> </ItemGroup> <ItemGroup> <FileWrites Include="@(AntlrGeneratedCodeFiles); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);" /> </ItemGroup> <ItemGroup> <Compile Include="@(AntlrGeneratedCodeFiles)" /> <!-- The WinFX "GenerateTemporaryTargetAssembly" target requires generated code files be added here. --> <_GeneratedCodeFiles Include="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> </Target> + + <Choose> + <When Condition="'$(AntlrIsSdkProject)' == 'True'"> + <PropertyGroup> + <EnableDefaultAntlrItems Condition="'$(EnableDefaultAntlrItems)' == ''">True</EnableDefaultAntlrItems> + </PropertyGroup> + + <ItemGroup Condition="'$(EnableDefaultItems)' == 'True'"> + <Antlr3 Include="**/*.g" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + <Antlr3 Include="**/*.g3" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + </ItemGroup> + <ItemGroup Condition="'$(EnableDefaultItems)' == 'True' AND '$(EnableDefaultNoneItems)' == 'True'"> + <None Remove="**/*.g" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + <None Remove="**/*.g3" Condition="'$(EnableDefaultAntlrItems)' == 'True'" /> + </ItemGroup> + + <ItemGroup> + <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Antlr3.ProjectItemsSchema.xml"> + <Context>Project</Context> + </PropertyPageSchema> + <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Antlr3.xml"> + <Context>File;BrowseObject</Context> + </PropertyPageSchema> + </ItemGroup> + + <!-- Modify the CustomToolNamespace based on the directory location of the grammar --> + <ItemGroup> + <Antlr3 Update="@(Antlr3)" DefaultCustomToolNamespace="$([MSBuild]::ValueOrDefault(%(RelativeDir), '').Replace('\', '.').Replace('/', '.').TrimEnd('.'))" /> + <Antlr3 Update="@(Antlr3)" Condition="'$(RootNamespace)' != ''" DefaultCustomToolNamespace="$([MSBuild]::ValueOrDefault('$(RootNamespace).%(DefaultCustomToolNamespace)', '').TrimEnd('.'))" /> + <Antlr3 Update="@(Antlr3)" CustomToolNamespace="$([MSBuild]::ValueOrDefault(%(CustomToolNamespace), %(DefaultCustomToolNamespace)))" /> + </ItemGroup> + </When> + </Choose> </Project> diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 7e884bd..fdb005e 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,57 +1,61 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35'"> <ItemGroup> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Tasks.v3.5" /> <Reference Include="Microsoft.Build.Utilities.v3.5" /> </ItemGroup> </When> </Choose> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Include="Antlr3.targets"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> + <ItemGroup> + <None Update="Rules\*.xml" CopyToOutputDirectory="PreserveNewest" /> + </ItemGroup> + </Project> \ No newline at end of file diff --git a/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml b/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml new file mode 100644 index 0000000..5f91a67 --- /dev/null +++ b/AntlrBuildTask/Rules/Antlr3.ProjectItemsSchema.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties"> + <ContentType Name="Antlr3" DisplayName="ANTLR 3 Grammar" ItemType="Antlr3" /> + <ItemType Name="Antlr3" DisplayName="ANTLR 3 grammar" /> + <FileExtension Name=".g" ContentType="Antlr3" /> + <FileExtension Name=".g3" ContentType="Antlr3" /> +</ProjectSchemaDefinitions> diff --git a/AntlrBuildTask/Rules/Antlr3.xml b/AntlrBuildTask/Rules/Antlr3.xml new file mode 100644 index 0000000..4e92d43 --- /dev/null +++ b/AntlrBuildTask/Rules/Antlr3.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<Rule Name="Antlr3" DisplayName="File Properties" PageTemplate="generic" Description="File Properties" xmlns="http://schemas.microsoft.com/build/2009/properties"> + <Rule.DataSource> + <DataSource Persistence="ProjectFile" ItemType="Antlr3" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </Rule.DataSource> + + <Rule.Categories> + <Category Name="Advanced" DisplayName="Advanced" /> + <Category Name="Misc" DisplayName="Misc" /> + <Category Name="ANTLR" DisplayName="ANTLR" /> + </Rule.Categories> + + <StringProperty + Category="ANTLR" + Name="TargetLanguage" + DisplayName="Language Target" + Default="(Not Set)" + Description="Explicitly specifies the grammar's target language. If set, this property overrides any value specified within the grammar itself." /> + <BoolProperty + Category="ANTLR" + Name="DebugGrammar" + DisplayName="Debug Grammar" + Default="false" + Description="Builds a debug version of the grammar. Note that this feature may not be available for all language targets." /> + <BoolProperty + Category="ANTLR" + Name="ProfileGrammar" + DisplayName="Profile Grammar" + Default="false" + Description="Builds a version of the grammar for profiling. Note that this feature may not be available for all language targets." /> + + <!-- + The rest of these properties are not ANTLR-specific, but CPS provides no way to inherit properties, so if we fail to + include them then they will just disappear. + --> + + <DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action" Category="Advanced" + Description="How the file relates to the build and deployment processes." + EnumProvider="ItemTypes" /> + <EnumProperty + Name="CopyToOutputDirectory" + DisplayName="Copy to Output Directory" + Category="Advanced" + Description="Specifies the source file will be copied to the output directory."> + <EnumValue Name="Never" DisplayName="Do not copy" /> + <EnumValue Name="Always" DisplayName="Copy always" /> + <EnumValue Name="PreserveNewest" DisplayName="Copy if newer" /> + </EnumProperty> + + <StringProperty + Name="Generator" + Category="Advanced" + DisplayName="Custom Tool" + Description="Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool." /> + <StringProperty + Name="CustomToolNamespace" + Category="Advanced" + DisplayName="Custom Tool Namespace" + Description="The namespace into which the output of the custom tool is placed." /> + + <StringProperty + Name="Identity" + Visible="false" + ReadOnly="true" + Category="Misc" + Description="The item specified in the Include attribute."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="Identity" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FullPath" + DisplayName="Full Path" + ReadOnly="true" + Category="Misc" + Description="Location of the file."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty + Name="FileNameAndExtension" + DisplayName="File Name" + ReadOnly="true" + Category="Misc" + Description="Name of the file or folder."> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + + <StringProperty Name="URL" ReadOnly="true" Visible="false"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <BoolProperty Name="Visible" Visible="false" /> + <StringProperty Name="DependentUpon" Visible="false" /> + <StringProperty Name="Link" Visible="false"> + <StringProperty.DataSource> + <DataSource PersistenceStyle="Attribute" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="Extension" Visible="False" ReadOnly="true"> + <StringProperty.DataSource> + <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="Extension" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> + <StringProperty Name="LastGenOutput" Visible="false" Description="The filename of the last file generated as a result of the SFG." /> + <BoolProperty Name="DesignTime" Visible="false" Description="A value indicating whether this file has a designer." /> + <BoolProperty Name="AutoGen" Visible="false" Description="A value indicating whether this is a generated file." /> + <StringProperty Name="CustomTool" Visible="false" Description="DTE Property for accessing the Generator property."> + <StringProperty.DataSource> + <DataSource Persistence="ProjectFile" ItemType="Antlr3" PersistedName="Generator" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" /> + </StringProperty.DataSource> + </StringProperty> +</Rule> diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index c2409b1..dda90ad 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,147 +1,148 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> + <EnableDefaultAntlrItems>false</EnableDefaultAntlrItems> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index 8699360..31b775f 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,35 +1,37 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Tools --> <file src="Bootstrap\**\*.*" target="tools"/> <!-- Build Configuration --> <file src="Tool\Antlr3.props" target="build"/> <file src="Tool\Antlr3.targets" target="build"/> <file src="Tool\AntlrBuildTask.dll" target="build"/> + <file src="Tool\Rules\Antlr3.ProjectItemsSchema.xml" target="build\Rules" /> + <file src="Tool\Rules\Antlr3.xml" target="build\Rules" /> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index a50d42d..47dfd10 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,236 +1,245 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } +copy -r -force "..\..\bin\$BuildConfig\Rules\*" "..\Bootstrap" +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit 1 +} + Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool +mkdir Tool\Rules mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\Rules\Antlr3.ProjectItemsSchema.xml" ".\Tool\Rules" +copy "..\..\bin\$BuildConfig\Rules\Antlr3.xml" ".\Tool\Rules" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
fd2cd959e5e802b09d04d05d2c23ce5c63dfbf30
Make sure the build hooks are tracked by MSBuild
diff --git a/AntlrBuildTask/Antlr3.props b/AntlrBuildTask/Antlr3.props index b18aaa8..f7891c7 100644 --- a/AntlrBuildTask/Antlr3.props +++ b/AntlrBuildTask/Antlr3.props @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" ?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> + </PropertyGroup> + <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>.</AntlrBuildTaskPath> <!-- Path to the ANTLR tool itself --> <AntlrToolPath>..\tools\Antlr3.exe</AntlrToolPath> </PropertyGroup> </Project> diff --git a/AntlrBuildTask/Antlr3.targets b/AntlrBuildTask/Antlr3.targets index c5f5c70..9060077 100644 --- a/AntlrBuildTask/Antlr3.targets +++ b/AntlrBuildTask/Antlr3.targets @@ -1,169 +1,173 @@ <!-- [The "BSD licence"] Copyright (c) 2011 Sam Harwell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> + </PropertyGroup> + <PropertyGroup> <BuildSystem>MSBuild</BuildSystem> <TaskVersion>3.5.0.2</TaskVersion> <TaskKeyToken>eb42632606e9261f</TaskKeyToken> <AntlrBuildTaskAssemblyName Condition="'$(AntlrBuildTaskAssemblyName)'==''">AntlrBuildTask, Version=$(TaskVersion), Culture=neutral, PublicKeyToken=$(TaskKeyToken)</AntlrBuildTaskAssemblyName> </PropertyGroup> <PropertyGroup> <LoadTimeSensitiveTargets> $(LoadTimeSensitiveTargets); AntlrCompile; </LoadTimeSensitiveTargets> <LoadTimeSensitiveProperties> $(LoadTimeSensitiveProperties); AntlrCompileDependsOn; </LoadTimeSensitiveProperties> </PropertyGroup> <PropertyGroup> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'==''">$(MSBuildBinPath)</AntlrBuildTaskLocation> <AntlrBuildTaskLocation Condition="'$(AntlrBuildTaskPath)'!=''">$(AntlrBuildTaskPath)</AntlrBuildTaskLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'==''">$(MSBuildBinPath)\Antlr3\Antlr3.exe</AntlrToolLocation> <AntlrToolLocation Condition="'$(AntlrToolPath)'!=''">$(AntlrToolPath)</AntlrToolLocation> </PropertyGroup> <PropertyGroup> <AntlrGenCodeFileNames Condition="'$(AntlrGenCodeFileNames)'==''">$(MSBuildProjectFile).AntlrGeneratedCodeFileListAbsolute.txt</AntlrGenCodeFileNames> </PropertyGroup> <UsingTask Condition="'$(AntlrBuildTaskPath)'==''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyName="$(AntlrBuildTaskAssemblyName)" /> <UsingTask Condition="'$(AntlrBuildTaskPath)'!=''" TaskName="Antlr3.Build.Tasks.AntlrClassGenerationTask" AssemblyFile="$(AntlrBuildTaskPath)\AntlrBuildTask.dll" /> <PropertyGroup> <PrepareResourcesDependsOn> AntlrCompile; AntlrCompileAddFilesGenerated; $(PrepareResourcesDependsOn) </PrepareResourcesDependsOn> </PropertyGroup> <PropertyGroup> <AntlrCompileDependsOn> AntlrCompileReadGeneratedFileList </AntlrCompileDependsOn> </PropertyGroup> <ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'"> <AvailableItemName Include="Antlr3" /> <AvailableItemName Include="AntlrTokens" /> <AvailableItemName Include="AntlrAbstractGrammar" /> </ItemGroup> <ItemDefinitionGroup> <Antlr3> <Generator>MSBuild:Compile</Generator> <TargetLanguage/> <DebugGrammar>false</DebugGrammar> <ProfileGrammar>false</ProfileGrammar> </Antlr3> </ItemDefinitionGroup> <Target Name="AntlrCompileReadGeneratedFileList"> <ReadLinesFromFile File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)"> <Output TaskParameter="Lines" ItemName="AntlrOutputCodeFilesList"/> </ReadLinesFromFile> </Target> <PropertyGroup> <!-- Add grammar compilation to the CoreCompileDependsOn so that the IDE inproc compilers (particularly VB) can "see" the generated source files. --> <CoreCompileDependsOn Condition="'$(BuildingInsideVisualStudio)' == 'true' "> DesignTimeGrammarCompilation; $(CoreCompileDependsOn) </CoreCompileDependsOn> </PropertyGroup> <Target Name="DesignTimeGrammarCompilation"> <!-- Only if we are not actually performing a compile i.e. we are in design mode --> <CallTarget Condition="'$(BuildingProject)' != 'true'" Targets="AntlrCompile" /> </Target> <Target Name="AntlrCompile" DependsOnTargets="$(AntlrCompileDependsOn)" Condition="'@(Antlr3)' != ''" Inputs="@(Antlr3);@(AntlrTokens);@(AntlrAbstractGrammar)" Outputs="@(AntlrOutputCodeFilesList); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);"> <ItemGroup> <AntlrGeneratedCodeFiles Remove="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> <PropertyGroup> <_IntellisenseOnlyCompile>false</_IntellisenseOnlyCompile> <_IntellisenseOnlyCompile Condition="'$(BuildingProject)' != 'true'">true</_IntellisenseOnlyCompile> </PropertyGroup> <AntlrClassGenerationTask AntlrToolPath="$(AntlrToolLocation)" BuildTaskPath="$(AntlrBuildTaskLocation)" OutputPath="$(IntermediateOutputPath)" TargetLanguage="%(Antlr3.TargetLanguage)" SourceCodeFiles="@(Antlr3)" ContinueOnError="$(_IntellisenseOnlyCompile)" TokensFiles="@(AntlrTokens)" AbstractGrammarFiles="@(AntlrAbstractGrammar)" LanguageSourceExtensions="$(DefaultLanguageSourceExtension)" DebugGrammar="%(Antlr3.DebugGrammar)" ProfileGrammar="%(Antlr3.ProfileGrammar)"> <Output ItemName="AntlrGeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" /> </AntlrClassGenerationTask> <WriteLinesToFile Condition="'$(_IntellisenseOnlyCompile)' != 'true'" File="$(IntermediateOutputPath)$(AntlrGenCodeFileNames)" Lines="@(AntlrGeneratedCodeFiles)" Overwrite="true"/> </Target> <Target Name="AntlrCompileAddFilesGenerated" AfterTargets="AntlrCompile" Condition="'@(Antlr3)' != ''"> <ItemGroup> <AntlrGeneratedCodeFiles Condition="'@(AntlrGeneratedCodeFiles)' == ''" Include="@(AntlrOutputCodeFilesList)" /> </ItemGroup> <ItemGroup> <FileWrites Include="@(AntlrGeneratedCodeFiles); $(IntermediateOutputPath)$(AntlrGenCodeFileNames);" /> </ItemGroup> <ItemGroup> <Compile Include="@(AntlrGeneratedCodeFiles)" /> <!-- The WinFX "GenerateTemporaryTargetAssembly" target requires generated code files be added here. --> <_GeneratedCodeFiles Include="@(AntlrGeneratedCodeFiles)" /> </ItemGroup> </Target> </Project>
antlr/antlrcs
cddd04bf17253d66a56c9f6b929951aef6d8158a
Remove unnecessary directory creation
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 5fad068..a50d42d 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,240 +1,236 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } -if (-not (Test-Path nuget)) { - mkdir "nuget" -} - # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
8568fd4fdc4b02e8a03815e623f8b81734a1bae9
Fix 7-zip packaging of StringTemplate 3
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 6c92d4c..5fad068 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,240 +1,240 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } if (-not (Test-Path nuget)) { mkdir "nuget" } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" -copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.dll" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.dll" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.pdb" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.pdb" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.StringTemplate.xml" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\net35-client\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
aa892ce6c06f9a2c0df24b67f2a627028755dfe2
Enable parallel builds again
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 9ec3e1c..6c92d4c 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,240 +1,240 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } if (-not (Test-Path nuget)) { mkdir "nuget" } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 -&$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath +&$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files -&$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath +&$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
dbd9805531b0de7c1a35fdfda86b9f781801cab9
Convert Antlr3.Runtime to the new project system
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index 393a481..c8943c5 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,113 +1,113 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="System.Windows.Forms" /> <Reference Include="WindowsBase" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Update="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Update="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 75eb1fa..e868a17 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,113 +1,113 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <RootNamespace>Antlr.ST</RootNamespace> <Description>The C# port of StringTemplate 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Update="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Update="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Update="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Update="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Update="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Update="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Update="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Update="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index f8d662f..60bdcb3 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <ItemGroup> - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 010b6f0..d88317f 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index 125a2ca..22e12ea 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,229 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU - {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU - {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU - {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 8efe20b..d1c4282 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,391 +1,391 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 71eb347..59c75ad 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,125 +1,125 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 7a03244..58dc938 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,102 +1,98 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> - - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> - </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> - - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> - </ItemGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> + </ItemGroup> + <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index 2e52ef6..3b7d0fb 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,57 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.6.9004</Version> <FileVersion>4.0.6.9004</FileVersion> <InformationalVersion>4.0.6.9004-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> - - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> - </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> </ItemGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index 6eedbe9..aeab8eb 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,62 +1,62 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net20</TargetFrameworks> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="ParserDebugger.cs" /> <Compile Remove="ParserDebugger.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index e89ab83..413f7a8 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,40 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 7087cf6..c2409b1 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,147 +1,147 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj new file mode 100644 index 0000000..4459c4d --- /dev/null +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net20;net40-client;portable40-net40+sl5+win8+wp8+wpa81;netstandard1.1</TargetFrameworks> + <RootNamespace>Antlr.Runtime</RootNamespace> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <IncludeSymbols>true</IncludeSymbols> + <NuspecFile>..\..\build\prep\Antlr3.Runtime.nuspec</NuspecFile> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> + <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> + <PropertyGroup> + <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> + <PropertyGroup> + <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net40-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + <When Condition="'$(TargetFramework)' == 'netstandard1.1'"> + <PropertyGroup> + <DefineConstants>$(DefineConstants);PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + </PropertyGroup> + </When> + <When Condition="'$(TargetFramework)' == 'portable40-net40+sl5+win8+wp8+wpa81'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> + <DefineConstants>$(DefineConstants);PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + </PropertyGroup> + + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + </ItemGroup> + </When> + </Choose> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj deleted file mode 100644 index 194e993..0000000 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj +++ /dev/null @@ -1,153 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.Runtime</RootNamespace> - <AssemblyName>Antlr3.Runtime</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\net20\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\net20\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - </ItemGroup> - <ItemGroup> - <Compile Include="ANTLRFileStream.cs" /> - <Compile Include="ANTLRInputStream.cs" /> - <Compile Include="ANTLRReaderStream.cs" /> - <Compile Include="ANTLRStringStream.cs" /> - <Compile Include="AstParserRuleReturnScope`2.cs" /> - <Compile Include="BaseRecognizer.cs" /> - <Compile Include="BitSet.cs" /> - <Compile Include="BufferedTokenStream.cs" /> - <Compile Include="CharStreamConstants.cs" /> - <Compile Include="CharStreamState.cs" /> - <Compile Include="ClassicToken.cs" /> - <Compile Include="CommonToken.cs" /> - <Compile Include="CommonTokenStream.cs" /> - <Compile Include="Debug\IDebugEventListener.cs" /> - <Compile Include="DFA.cs" /> - <Compile Include="EarlyExitException.cs" /> - <Compile Include="FailedPredicateException.cs" /> - <Compile Include="GrammarRuleAttribute.cs" /> - <Compile Include="IAstRuleReturnScope.cs" /> - <Compile Include="IAstRuleReturnScope`1.cs" /> - <Compile Include="ICharStream.cs" /> - <Compile Include="IIntStream.cs" /> - <Compile Include="IRuleReturnScope.cs" /> - <Compile Include="IRuleReturnScope`1.cs" /> - <Compile Include="ITemplateRuleReturnScope.cs" /> - <Compile Include="ITemplateRuleReturnScope`1.cs" /> - <Compile Include="IToken.cs" /> - <Compile Include="ITokenSource.cs" /> - <Compile Include="ITokenStream.cs" /> - <Compile Include="ITokenStreamInformation.cs" /> - <Compile Include="LegacyCommonTokenStream.cs" /> - <Compile Include="Lexer.cs" /> - <Compile Include="Misc\FastQueue.cs" /> - <Compile Include="Misc\FunctionDelegates.cs" /> - <Compile Include="Misc\ListStack`1.cs" /> - <Compile Include="Misc\LookaheadStream.cs" /> - <Compile Include="Misc\RegexOptionsHelper.cs" /> - <Compile Include="MismatchedNotSetException.cs" /> - <Compile Include="MismatchedRangeException.cs" /> - <Compile Include="MismatchedSetException.cs" /> - <Compile Include="MismatchedTokenException.cs" /> - <Compile Include="MismatchedTreeNodeException.cs" /> - <Compile Include="MissingTokenException.cs" /> - <Compile Include="NoViableAltException.cs" /> - <Compile Include="Parser.cs" /> - <Compile Include="ParserRuleReturnScope.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RecognitionException.cs" /> - <Compile Include="RecognizerSharedState.cs" /> - <Compile Include="System\ICloneable.cs" /> - <Compile Include="System\NonSerializedAttribute.cs" /> - <Compile Include="System\OnSerializingAttribute.cs" /> - <Compile Include="System\SerializableAttribute.cs" /> - <Compile Include="System\StreamingContext.cs" /> - <Compile Include="TemplateParserRuleReturnScope`2.cs" /> - <Compile Include="TokenChannels.cs" /> - <Compile Include="TokenRewriteStream.cs" /> - <Compile Include="Tokens.cs" /> - <Compile Include="TokenTypes.cs" /> - <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\BaseTree.cs" /> - <Compile Include="Tree\BaseTreeAdaptor.cs" /> - <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> - <Compile Include="Tree\BufferedTreeNodeStream.cs" /> - <Compile Include="Tree\CommonErrorNode.cs" /> - <Compile Include="Tree\CommonTree.cs" /> - <Compile Include="Tree\CommonTreeAdaptor.cs" /> - <Compile Include="Tree\CommonTreeNodeStream.cs" /> - <Compile Include="Tree\DotTreeGenerator.cs" /> - <Compile Include="Tree\IPositionTrackingStream.cs" /> - <Compile Include="Tree\ITree.cs" /> - <Compile Include="Tree\ITreeAdaptor.cs" /> - <Compile Include="Tree\ITreeNodeStream.cs" /> - <Compile Include="Tree\ITreeVisitorAction.cs" /> - <Compile Include="Tree\ParseTree.cs" /> - <Compile Include="Tree\RewriteCardinalityException.cs" /> - <Compile Include="Tree\RewriteEarlyExitException.cs" /> - <Compile Include="Tree\RewriteEmptyStreamException.cs" /> - <Compile Include="Tree\RewriteRuleElementStream.cs" /> - <Compile Include="Tree\RewriteRuleNodeStream.cs" /> - <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> - <Compile Include="Tree\RewriteRuleTokenStream.cs" /> - <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\TreeFilter.cs" /> - <Compile Include="Tree\TreeIterator.cs" /> - <Compile Include="Tree\TreeParser.cs" /> - <Compile Include="Tree\TreePatternLexer.cs" /> - <Compile Include="Tree\TreePatternParser.cs" /> - <Compile Include="Tree\TreeRewriter.cs" /> - <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> - <Compile Include="Tree\TreeVisitor.cs" /> - <Compile Include="Tree\TreeWizard.cs" /> - <Compile Include="UnbufferedTokenStream.cs" /> - <Compile Include="UnwantedTokenException.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj deleted file mode 100644 index 0790c55..0000000 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj +++ /dev/null @@ -1,154 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.Runtime</RootNamespace> - <AssemblyName>Antlr3.Runtime</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\net40-client\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\net40-client\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - </ItemGroup> - <ItemGroup> - <Compile Include="ANTLRFileStream.cs" /> - <Compile Include="ANTLRInputStream.cs" /> - <Compile Include="ANTLRReaderStream.cs" /> - <Compile Include="ANTLRStringStream.cs" /> - <Compile Include="AstParserRuleReturnScope`2.cs" /> - <Compile Include="BaseRecognizer.cs" /> - <Compile Include="BitSet.cs" /> - <Compile Include="BufferedTokenStream.cs" /> - <Compile Include="CharStreamConstants.cs" /> - <Compile Include="CharStreamState.cs" /> - <Compile Include="ClassicToken.cs" /> - <Compile Include="CommonToken.cs" /> - <Compile Include="CommonTokenStream.cs" /> - <Compile Include="Debug\IDebugEventListener.cs" /> - <Compile Include="DFA.cs" /> - <Compile Include="EarlyExitException.cs" /> - <Compile Include="FailedPredicateException.cs" /> - <Compile Include="GrammarRuleAttribute.cs" /> - <Compile Include="IAstRuleReturnScope.cs" /> - <Compile Include="IAstRuleReturnScope`1.cs" /> - <Compile Include="ICharStream.cs" /> - <Compile Include="IIntStream.cs" /> - <Compile Include="IRuleReturnScope.cs" /> - <Compile Include="IRuleReturnScope`1.cs" /> - <Compile Include="ITemplateRuleReturnScope.cs" /> - <Compile Include="ITemplateRuleReturnScope`1.cs" /> - <Compile Include="IToken.cs" /> - <Compile Include="ITokenSource.cs" /> - <Compile Include="ITokenStream.cs" /> - <Compile Include="ITokenStreamInformation.cs" /> - <Compile Include="LegacyCommonTokenStream.cs" /> - <Compile Include="Lexer.cs" /> - <Compile Include="Misc\FastQueue.cs" /> - <Compile Include="Misc\FunctionDelegates.cs" /> - <Compile Include="Misc\ListStack`1.cs" /> - <Compile Include="Misc\LookaheadStream.cs" /> - <Compile Include="Misc\RegexOptionsHelper.cs" /> - <Compile Include="MismatchedNotSetException.cs" /> - <Compile Include="MismatchedRangeException.cs" /> - <Compile Include="MismatchedSetException.cs" /> - <Compile Include="MismatchedTokenException.cs" /> - <Compile Include="MismatchedTreeNodeException.cs" /> - <Compile Include="MissingTokenException.cs" /> - <Compile Include="NoViableAltException.cs" /> - <Compile Include="Parser.cs" /> - <Compile Include="ParserRuleReturnScope.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RecognitionException.cs" /> - <Compile Include="RecognizerSharedState.cs" /> - <Compile Include="System\ICloneable.cs" /> - <Compile Include="System\NonSerializedAttribute.cs" /> - <Compile Include="System\OnSerializingAttribute.cs" /> - <Compile Include="System\SerializableAttribute.cs" /> - <Compile Include="System\StreamingContext.cs" /> - <Compile Include="TemplateParserRuleReturnScope`2.cs" /> - <Compile Include="TokenChannels.cs" /> - <Compile Include="TokenRewriteStream.cs" /> - <Compile Include="Tokens.cs" /> - <Compile Include="TokenTypes.cs" /> - <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\BaseTree.cs" /> - <Compile Include="Tree\BaseTreeAdaptor.cs" /> - <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> - <Compile Include="Tree\BufferedTreeNodeStream.cs" /> - <Compile Include="Tree\CommonErrorNode.cs" /> - <Compile Include="Tree\CommonTree.cs" /> - <Compile Include="Tree\CommonTreeAdaptor.cs" /> - <Compile Include="Tree\CommonTreeNodeStream.cs" /> - <Compile Include="Tree\DotTreeGenerator.cs" /> - <Compile Include="Tree\IPositionTrackingStream.cs" /> - <Compile Include="Tree\ITree.cs" /> - <Compile Include="Tree\ITreeAdaptor.cs" /> - <Compile Include="Tree\ITreeNodeStream.cs" /> - <Compile Include="Tree\ITreeVisitorAction.cs" /> - <Compile Include="Tree\ParseTree.cs" /> - <Compile Include="Tree\RewriteCardinalityException.cs" /> - <Compile Include="Tree\RewriteEarlyExitException.cs" /> - <Compile Include="Tree\RewriteEmptyStreamException.cs" /> - <Compile Include="Tree\RewriteRuleElementStream.cs" /> - <Compile Include="Tree\RewriteRuleNodeStream.cs" /> - <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> - <Compile Include="Tree\RewriteRuleTokenStream.cs" /> - <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\TreeFilter.cs" /> - <Compile Include="Tree\TreeIterator.cs" /> - <Compile Include="Tree\TreeParser.cs" /> - <Compile Include="Tree\TreePatternLexer.cs" /> - <Compile Include="Tree\TreePatternParser.cs" /> - <Compile Include="Tree\TreeRewriter.cs" /> - <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> - <Compile Include="Tree\TreeVisitor.cs" /> - <Compile Include="Tree\TreeWizard.cs" /> - <Compile Include="UnbufferedTokenStream.cs" /> - <Compile Include="UnwantedTokenException.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj deleted file mode 100644 index b5983ba..0000000 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj +++ /dev/null @@ -1,153 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}</ProjectGuid> - <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.Runtime</RootNamespace> - <AssemblyName>Antlr3.Runtime</AssemblyName> - <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> - <TargetFrameworkProfile /> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\netstandard\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\netstandard\Debug\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\netstandard\Release\</OutputPath> - <DefineConstants>TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\netstandard\Release\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Compile Include="ANTLRFileStream.cs" /> - <Compile Include="ANTLRInputStream.cs" /> - <Compile Include="ANTLRReaderStream.cs" /> - <Compile Include="ANTLRStringStream.cs" /> - <Compile Include="AstParserRuleReturnScope`2.cs" /> - <Compile Include="BaseRecognizer.cs" /> - <Compile Include="BitSet.cs" /> - <Compile Include="BufferedTokenStream.cs" /> - <Compile Include="CharStreamConstants.cs" /> - <Compile Include="CharStreamState.cs" /> - <Compile Include="ClassicToken.cs" /> - <Compile Include="CommonToken.cs" /> - <Compile Include="CommonTokenStream.cs" /> - <Compile Include="Debug\IDebugEventListener.cs" /> - <Compile Include="DFA.cs" /> - <Compile Include="EarlyExitException.cs" /> - <Compile Include="FailedPredicateException.cs" /> - <Compile Include="GrammarRuleAttribute.cs" /> - <Compile Include="IAstRuleReturnScope.cs" /> - <Compile Include="IAstRuleReturnScope`1.cs" /> - <Compile Include="ICharStream.cs" /> - <Compile Include="IIntStream.cs" /> - <Compile Include="IRuleReturnScope.cs" /> - <Compile Include="IRuleReturnScope`1.cs" /> - <Compile Include="ITemplateRuleReturnScope.cs" /> - <Compile Include="ITemplateRuleReturnScope`1.cs" /> - <Compile Include="IToken.cs" /> - <Compile Include="ITokenSource.cs" /> - <Compile Include="ITokenStream.cs" /> - <Compile Include="ITokenStreamInformation.cs" /> - <Compile Include="LegacyCommonTokenStream.cs" /> - <Compile Include="Lexer.cs" /> - <Compile Include="Misc\FastQueue.cs" /> - <Compile Include="Misc\FunctionDelegates.cs" /> - <Compile Include="Misc\ListStack`1.cs" /> - <Compile Include="Misc\LookaheadStream.cs" /> - <Compile Include="Misc\RegexOptionsHelper.cs" /> - <Compile Include="MismatchedNotSetException.cs" /> - <Compile Include="MismatchedRangeException.cs" /> - <Compile Include="MismatchedSetException.cs" /> - <Compile Include="MismatchedTokenException.cs" /> - <Compile Include="MismatchedTreeNodeException.cs" /> - <Compile Include="MissingTokenException.cs" /> - <Compile Include="NoViableAltException.cs" /> - <Compile Include="Parser.cs" /> - <Compile Include="ParserRuleReturnScope.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RecognitionException.cs" /> - <Compile Include="RecognizerSharedState.cs" /> - <Compile Include="System\ICloneable.cs" /> - <Compile Include="System\NonSerializedAttribute.cs" /> - <Compile Include="System\OnSerializingAttribute.cs" /> - <Compile Include="System\SerializableAttribute.cs" /> - <Compile Include="System\StreamingContext.cs" /> - <Compile Include="TemplateParserRuleReturnScope`2.cs" /> - <Compile Include="TokenChannels.cs" /> - <Compile Include="TokenRewriteStream.cs" /> - <Compile Include="Tokens.cs" /> - <Compile Include="TokenTypes.cs" /> - <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\BaseTree.cs" /> - <Compile Include="Tree\BaseTreeAdaptor.cs" /> - <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> - <Compile Include="Tree\BufferedTreeNodeStream.cs" /> - <Compile Include="Tree\CommonErrorNode.cs" /> - <Compile Include="Tree\CommonTree.cs" /> - <Compile Include="Tree\CommonTreeAdaptor.cs" /> - <Compile Include="Tree\CommonTreeNodeStream.cs" /> - <Compile Include="Tree\DotTreeGenerator.cs" /> - <Compile Include="Tree\IPositionTrackingStream.cs" /> - <Compile Include="Tree\ITree.cs" /> - <Compile Include="Tree\ITreeAdaptor.cs" /> - <Compile Include="Tree\ITreeNodeStream.cs" /> - <Compile Include="Tree\ITreeVisitorAction.cs" /> - <Compile Include="Tree\ParseTree.cs" /> - <Compile Include="Tree\RewriteCardinalityException.cs" /> - <Compile Include="Tree\RewriteEarlyExitException.cs" /> - <Compile Include="Tree\RewriteEmptyStreamException.cs" /> - <Compile Include="Tree\RewriteRuleElementStream.cs" /> - <Compile Include="Tree\RewriteRuleNodeStream.cs" /> - <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> - <Compile Include="Tree\RewriteRuleTokenStream.cs" /> - <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\TreeFilter.cs" /> - <Compile Include="Tree\TreeIterator.cs" /> - <Compile Include="Tree\TreeParser.cs" /> - <Compile Include="Tree\TreePatternLexer.cs" /> - <Compile Include="Tree\TreePatternParser.cs" /> - <Compile Include="Tree\TreeRewriter.cs" /> - <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> - <Compile Include="Tree\TreeVisitor.cs" /> - <Compile Include="Tree\TreeWizard.cs" /> - <Compile Include="UnbufferedTokenStream.cs" /> - <Compile Include="UnwantedTokenException.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - <None Include="Antlr3.Runtime.netstandard.project.json" /> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.project.json b/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.project.json deleted file mode 100644 index 5cff9d9..0000000 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.project.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dependencies": { - "NETStandard.Library": "1.6.0" - }, - - "frameworks": { - "netstandard1.1": { - } - } -} diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj deleted file mode 100644 index 026f560..0000000 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{34BA0BD4-FB93-48D7-967E-83F229F220A0}</ProjectGuid> - <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.Runtime</RootNamespace> - <AssemblyName>Antlr3.Runtime</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\portable-net40\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\portable-net40\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\portable-net40\Debug\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\portable-net40\Release\</OutputPath> - <DefineConstants>TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\portable-net40\Release\Antlr3.Runtime.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Compile Include="ANTLRFileStream.cs" /> - <Compile Include="ANTLRInputStream.cs" /> - <Compile Include="ANTLRReaderStream.cs" /> - <Compile Include="ANTLRStringStream.cs" /> - <Compile Include="AstParserRuleReturnScope`2.cs" /> - <Compile Include="BaseRecognizer.cs" /> - <Compile Include="BitSet.cs" /> - <Compile Include="BufferedTokenStream.cs" /> - <Compile Include="CharStreamConstants.cs" /> - <Compile Include="CharStreamState.cs" /> - <Compile Include="ClassicToken.cs" /> - <Compile Include="CommonToken.cs" /> - <Compile Include="CommonTokenStream.cs" /> - <Compile Include="Debug\IDebugEventListener.cs" /> - <Compile Include="DFA.cs" /> - <Compile Include="EarlyExitException.cs" /> - <Compile Include="FailedPredicateException.cs" /> - <Compile Include="GrammarRuleAttribute.cs" /> - <Compile Include="IAstRuleReturnScope.cs" /> - <Compile Include="IAstRuleReturnScope`1.cs" /> - <Compile Include="ICharStream.cs" /> - <Compile Include="IIntStream.cs" /> - <Compile Include="IRuleReturnScope.cs" /> - <Compile Include="IRuleReturnScope`1.cs" /> - <Compile Include="ITemplateRuleReturnScope.cs" /> - <Compile Include="ITemplateRuleReturnScope`1.cs" /> - <Compile Include="IToken.cs" /> - <Compile Include="ITokenSource.cs" /> - <Compile Include="ITokenStream.cs" /> - <Compile Include="ITokenStreamInformation.cs" /> - <Compile Include="LegacyCommonTokenStream.cs" /> - <Compile Include="Lexer.cs" /> - <Compile Include="Misc\FastQueue.cs" /> - <Compile Include="Misc\FunctionDelegates.cs" /> - <Compile Include="Misc\ListStack`1.cs" /> - <Compile Include="Misc\LookaheadStream.cs" /> - <Compile Include="Misc\RegexOptionsHelper.cs" /> - <Compile Include="MismatchedNotSetException.cs" /> - <Compile Include="MismatchedRangeException.cs" /> - <Compile Include="MismatchedSetException.cs" /> - <Compile Include="MismatchedTokenException.cs" /> - <Compile Include="MismatchedTreeNodeException.cs" /> - <Compile Include="MissingTokenException.cs" /> - <Compile Include="NoViableAltException.cs" /> - <Compile Include="Parser.cs" /> - <Compile Include="ParserRuleReturnScope.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RecognitionException.cs" /> - <Compile Include="RecognizerSharedState.cs" /> - <Compile Include="System\ICloneable.cs" /> - <Compile Include="System\NonSerializedAttribute.cs" /> - <Compile Include="System\OnSerializingAttribute.cs" /> - <Compile Include="System\SerializableAttribute.cs" /> - <Compile Include="System\StreamingContext.cs" /> - <Compile Include="TemplateParserRuleReturnScope`2.cs" /> - <Compile Include="TokenChannels.cs" /> - <Compile Include="TokenRewriteStream.cs" /> - <Compile Include="Tokens.cs" /> - <Compile Include="TokenTypes.cs" /> - <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\BaseTree.cs" /> - <Compile Include="Tree\BaseTreeAdaptor.cs" /> - <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> - <Compile Include="Tree\BufferedTreeNodeStream.cs" /> - <Compile Include="Tree\CommonErrorNode.cs" /> - <Compile Include="Tree\CommonTree.cs" /> - <Compile Include="Tree\CommonTreeAdaptor.cs" /> - <Compile Include="Tree\CommonTreeNodeStream.cs" /> - <Compile Include="Tree\DotTreeGenerator.cs" /> - <Compile Include="Tree\IPositionTrackingStream.cs" /> - <Compile Include="Tree\ITree.cs" /> - <Compile Include="Tree\ITreeAdaptor.cs" /> - <Compile Include="Tree\ITreeNodeStream.cs" /> - <Compile Include="Tree\ITreeVisitorAction.cs" /> - <Compile Include="Tree\ParseTree.cs" /> - <Compile Include="Tree\RewriteCardinalityException.cs" /> - <Compile Include="Tree\RewriteEarlyExitException.cs" /> - <Compile Include="Tree\RewriteEmptyStreamException.cs" /> - <Compile Include="Tree\RewriteRuleElementStream.cs" /> - <Compile Include="Tree\RewriteRuleNodeStream.cs" /> - <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> - <Compile Include="Tree\RewriteRuleTokenStream.cs" /> - <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> - <Compile Include="Tree\TreeFilter.cs" /> - <Compile Include="Tree\TreeIterator.cs" /> - <Compile Include="Tree\TreeParser.cs" /> - <Compile Include="Tree\TreePatternLexer.cs" /> - <Compile Include="Tree\TreePatternParser.cs" /> - <Compile Include="Tree\TreeRewriter.cs" /> - <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> - <Compile Include="Tree\TreeVisitor.cs" /> - <Compile Include="Tree\TreeWizard.cs" /> - <Compile Include="UnbufferedTokenStream.cs" /> - <Compile Include="UnwantedTokenException.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs index e8d624b..4a27490 100644 --- a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs @@ -1,78 +1,51 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Security; #if !PORTABLE using System.Runtime.InteropServices; #endif -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Runtime" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Runtime" )] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] [assembly: AllowPartiallyTrustedCallers] #if !PORTABLE // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "7a0b4db7-f127-4cf5-ac2c-e294957efcd6" )] #endif - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - * 3. Revision is the Perforce changelist number associated with the release. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 597f33a..607514f 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <group targetFramework="net20" /> <group targetFramework="net40-client" /> <group targetFramework="portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1" /> <group targetFramework="netstandard1.1"> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> - <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> - <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> - <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net20\Antlr3.Runtime.dll" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net20\Antlr3.Runtime.pdb" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net20\Antlr3.Runtime.xml" target="lib\net20"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net40-client\Antlr3.Runtime.dll" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net40-client\Antlr3.Runtime.pdb" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\net40-client\Antlr3.Runtime.xml" target="lib\net40-client"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\portable40-net40+sl5+win8+wp8+wpa81\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\portable40-net40+sl5+win8+wp8+wpa81\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\portable40-net40+sl5+win8+wp8+wpa81\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\netstandard1.1\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\netstandard1.1\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\$Configuration$\netstandard1.1\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index e926070..9ec3e1c 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,246 +1,240 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } if (-not (Test-Path nuget)) { mkdir "nuget" } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages -.\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -If (-not $?) { - $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit 1 -} - .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
0e712f3e34b56a838729c7e9935dccd4e6ca3500
Convert Antlr3.Runtime.JavaExtensions to the new project system
diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 1756d49..010b6f0 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index ef6765a..125a2ca 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj new file mode 100644 index 0000000..e89ab83 --- /dev/null +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net35-client</TargetFrameworks> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + </ItemGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.net35-client.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.net35-client.csproj deleted file mode 100644 index 3159488..0000000 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.net35-client.csproj +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Runtime.JavaExtensions</RootNamespace> - <AssemblyName>Antlr3.Runtime.JavaExtensions</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Xml.Linq"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data.DataSetExtensions"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="DictionaryExtensions.cs" /> - <Compile Include="ExceptionExtensions.cs" /> - <Compile Include="IOExtensions.cs" /> - <Compile Include="LexerExtensions.cs" /> - <Compile Include="JSystem.cs" /> - <Compile Include="ListExtensions.cs" /> - <Compile Include="ObjectExtensions.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="SetExtensions.cs" /> - <Compile Include="StackExtensions.cs" /> - <Compile Include="StringBuilderExtensions.cs" /> - <Compile Include="StringExtensions.cs" /> - <Compile Include="StringTokenizer.cs" /> - <Compile Include="SubList.cs" /> - <Compile Include="TreeExtensions.cs" /> - <Compile Include="TypeExtensions.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs index 9ca84cb..8d6aea5 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Runtime.JavaExtensions" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Runtime.JavaExtensions" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "ad48c7f7-0b1d-4b1e-9602-83425cb5699f" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index bb1f003..7087cf6 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,147 +1,147 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> - <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
c75dca4bbc00ca364a9b65d7fbcc466798ceeeac
Convert Antlr3.Runtime.Debug to the new project system
diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index a2b7de9..1756d49 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index ebb6706..ef6765a 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index cf9a3f5..8efe20b 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,391 +1,391 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>..\bin\$(Configuration)\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj new file mode 100644 index 0000000..6eedbe9 --- /dev/null +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net20</TargetFrameworks> + <RootNamespace>Antlr.Runtime.Debug</RootNamespace> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <IncludeSymbols>true</IncludeSymbols> + <NuspecFile>..\..\build\prep\Antlr3.Runtime.Debug.nuspec</NuspecFile> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> + <PackageOutputPath>..\..\build\prep\nuget\</PackageOutputPath> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> + <PropertyGroup> + <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> + <PropertyGroup> + <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + <None Include="ParserDebugger.cs" /> + <Compile Remove="ParserDebugger.cs" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.net20.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.net20.csproj deleted file mode 100644 index 2d3b350..0000000 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.net20.csproj +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.Runtime.Debug</RootNamespace> - <AssemblyName>Antlr3.Runtime.Debug</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Debug\Antlr3.Runtime.Debug.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Release\Antlr3.Runtime.Debug.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - </ItemGroup> - <ItemGroup> - <Compile Include="BlankDebugEventListener.cs" /> - <Compile Include="DebugEventHub.cs" /> - <Compile Include="DebugEventListenerConstants.cs" /> - <Compile Include="DebugEventRepeater.cs" /> - <Compile Include="DebugEventSocketProxy.cs" /> - <Compile Include="DebugParser.cs" /> - <Compile Include="DebugTokenStream.cs" /> - <Compile Include="DebugTreeAdaptor.cs" /> - <Compile Include="DebugTreeNodeStream.cs" /> - <Compile Include="DebugTreeParser.cs" /> - <Compile Include="JavaExtensions\ExceptionExtensions.cs" /> - <Compile Include="Misc\DoubleKeyMap`3.cs" /> - <Compile Include="Misc\Stats.cs" /> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - <None Include="ParserDebugger.cs" /> - <Compile Include="ParseTreeBuilder.cs" /> - <Compile Include="Profiler.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RemoteDebugEventSocketListener.cs" /> - <Compile Include="TraceDebugEventListener.cs" /> - <Compile Include="Tracer.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs index a089872..4e4960e 100644 --- a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs @@ -1,71 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Runtime.Debug" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Runtime.Debug" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9f8fa018-6766-404c-9e72-551407e1b173" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - * 3. Revision is the Perforce changelist number associated with the release. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 0682cef..bb1f003 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,147 +1,147 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> - <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/build/prep/Antlr3.Runtime.Debug.nuspec b/build/prep/Antlr3.Runtime.Debug.nuspec index 90c7dbd..558b30f 100644 --- a/build/prep/Antlr3.Runtime.Debug.nuspec +++ b/build/prep/Antlr3.Runtime.Debug.nuspec @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime.Debug</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The library includes the debug support for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime (Debug Library)</title> <summary>The optional debug component library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> - <file src="Tool\Antlr3.Runtime.Debug.dll" target="lib\net20"/> - <file src="Tool\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> - <file src="Tool\Antlr3.Runtime.Debug.xml" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.dll" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime.Debug\bin\$Configuration$\net20\Antlr3.Runtime.Debug.xml" target="lib\net20"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime.Debug\**\*.cs" target="src"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 861c537..e926070 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,252 +1,246 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } if (-not (Test-Path nuget)) { mkdir "nuget" } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } -.\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -If (-not $?) { - $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit 1 -} - .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 }
antlr/antlrcs
8b19b2e1683d008e864960927e75f384152a088f
Convert Antlr3 to the new project system
diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 14965bf..f8d662f 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Private>false</Private> </ProjectReference> - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.net35-client.csproj"> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index ea0a4ef..a2b7de9 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> - <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3\Antlr3.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index f088720..ebb6706 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.net35-client.csproj b/Antlr3/Antlr3.csproj similarity index 70% rename from Antlr3/Antlr3.net35-client.csproj rename to Antlr3/Antlr3.csproj index 2ad457b..cf9a3f5 100644 --- a/Antlr3/Antlr3.net35-client.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,510 +1,391 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> + <TargetFrameworks>net35-client</TargetFrameworks> <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3</RootNamespace> - <AssemblyName>Antlr3</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <OutputPath>..\bin\$(Configuration)\</OutputPath> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.XML" /> - <Reference Include="System.Xml.Linq"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Analysis\ActionLabel.cs" /> - <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> - <Compile Include="Analysis\AnalysisTimeoutException.cs" /> - <Compile Include="Analysis\Cyclic.cs" /> - <Compile Include="Analysis\DecisionProbe.cs" /> - <Compile Include="Analysis\DFA.cs" /> - <Compile Include="Analysis\DFAOptimizer.cs" /> - <Compile Include="Analysis\DFAState.cs" /> - <Compile Include="Analysis\Label.cs" /> - <Compile Include="Analysis\LL1Analyzer.cs" /> - <Compile Include="Analysis\LL1DFA.cs" /> - <Compile Include="Analysis\LookaheadSet.cs" /> - <Compile Include="Analysis\NFA.cs" /> - <Compile Include="Analysis\NFAConfiguration.cs" /> - <Compile Include="Analysis\NFAContext.cs" /> - <Compile Include="Analysis\NFAConversionThread.cs" /> - <Compile Include="Analysis\NFAState.cs" /> - <Compile Include="Analysis\NFAtoDFAConverter.cs" /> - <Compile Include="Analysis\NonLLStarDecisionException.cs" /> - <Compile Include="Analysis\PredicateLabel.cs" /> - <Compile Include="Analysis\Reachable.cs" /> - <Compile Include="Analysis\RuleClosureTransition.cs" /> - <Compile Include="Analysis\SemanticContext.cs" /> - <Compile Include="Analysis\State.cs" /> - <Compile Include="Analysis\StateCluster.cs" /> - <Compile Include="Analysis\Transition.cs" /> - <Compile Include="Codegen\CodeGenerator.cs" /> - <Compile Include="Codegen\Target.cs" /> - <Compile Include="Extensions\TemplateExtensions.cs" /> - <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> + <Compile Update="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> - <Compile Include="Misc\Barrier.cs" /> - <Compile Include="Misc\BitSet.cs" /> - <Compile Include="Misc\Interval.cs" /> - <Compile Include="Misc\IntervalSet.cs" /> - <Compile Include="Misc\MultiMap.cs" /> - <Compile Include="Misc\OrderedHashSet.cs" /> - <Compile Include="Misc\Utils.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="AntlrTool.cs" /> - <Compile Include="Tool\ErrorManager.cs" /> - <Compile Include="Tool\Grammar.cs" /> - <Compile Include="Tool\GrammarAST.cs" /> - <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> - <Compile Include="Tool\Message.cs" /> - <Compile Include="Tool\Rule.cs" /> - <Compile Include="Tool\ToolMessage.cs" /> - <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> - <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> - <Compile Include="Tool\Attribute.cs" /> - <Compile Include="Tool\AttributeScope.cs" /> - <Compile Include="Tool\CompositeGrammar.cs" /> - <Compile Include="Tool\CompositeGrammarTree.cs" /> - <Compile Include="Tool\GrammarSanity.cs" /> - <Compile Include="Tool\NameSpaceChecker.cs" /> - <Compile Include="Tool\NFAFactory.cs" /> - <Compile Include="Grammars\ActionTranslatorHelper.cs"> + <Compile Update="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> - <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> + <Compile Update="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> - <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> + <Compile Update="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> - <Compile Include="Grammars\ANTLRParserHelper.cs"> + <Compile Update="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> - <Compile Include="Grammars\ANTLRLexerHelper.cs"> + <Compile Update="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> - <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> + <Compile Update="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> - <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> + <Compile Update="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> - <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> + <Compile Update="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> + <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> - <Compile Include="Analysis\MachineProbe.cs" /> - <Compile Include="Extensions\EnumerableExtensions.cs" /> - <Compile Include="Extensions\ExceptionExtensions.cs" /> - <Compile Include="Extensions\FuncEqualityComparer.cs" /> - <Compile Include="Extensions\ListExtensions.cs" /> - <Compile Include="Misc\Graph.cs" /> - <Compile Include="Misc\IIntSet.cs" /> - <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> - <Compile Include="Tool\BuildDependencyGenerator.cs" /> - <Compile Include="Tool\DgmlGenerator.cs" /> - <Compile Include="Tool\DOTGenerator.cs" /> - <Compile Include="Tool\FASerializer.cs" /> - <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> - <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> - <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> - <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> - <Compile Include="Tool\GrammarReport.cs" /> - <Compile Include="Tool\GrammarReport2.cs" /> - <Compile Include="Tool\GrammarSemanticsMessage.cs" /> - <Compile Include="Tool\GrammarSpelunker.cs" /> - <Compile Include="Tool\GrammarSyntaxMessage.cs" /> - <Compile Include="Tool\GrammarType.cs" /> - <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> - <Compile Include="Tool\IAntlrErrorListener.cs" /> - <Compile Include="Tool\IGraphGenerator.cs" /> - <Compile Include="Tool\Interpreter.cs" /> - <Compile Include="Tool\LabelType.cs" /> - <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> - <Compile Include="Tool\NonRegularDecisionMessage.cs" /> - <Compile Include="Tool\RecursionOverflowMessage.cs" /> - <Compile Include="Tool\RuleLabelScope.cs" /> - <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> + <Compile Update="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> - <Compile Include="Tool\RuleType.cs" /> - <Compile Include="Tool\Strip.cs" /> </ItemGroup> + <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> + <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> + <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> - <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> - <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> - <Name>Antlr4.StringTemplate.Visualizer</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> - </ProjectReference> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3/Directory.Build.targets b/Antlr3/Directory.Build.targets new file mode 100644 index 0000000..ad35b3c --- /dev/null +++ b/Antlr3/Directory.Build.targets @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + + <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> + +</Project> diff --git a/Antlr3/Properties/AssemblyInfo.cs b/Antlr3/Properties/AssemblyInfo.cs index 9e126ff..c23a025 100644 --- a/Antlr3/Properties/AssemblyInfo.cs +++ b/Antlr3/Properties/AssemblyInfo.cs @@ -1,70 +1,45 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3" )] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1f192196-5fb0-4eea-91a1-e9249dd45317" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")]
antlr/antlrcs
e23cbd08ca0336fae9c9e5c2f51c61fbbb746083
Convert Antlr3.Runtime.Visualizer to the new project system
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj new file mode 100644 index 0000000..393a481 --- /dev/null +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net35-client</TargetFrameworks> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + + <PropertyGroup> + <!-- Workaround for lack of XAML support in the new project system --> + <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="WindowsBase" /> + <Reference Include="WindowsFormsIntegration" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + </ItemGroup> + + <ItemGroup> + <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> + <Link>Extensions\FlowDocumentExtensions.cs</Link> + </Compile> + <Compile Update="BaseTreeVisualizerForm.Designer.cs"> + <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> + </Compile> + <Compile Update="BaseTreeVisualizerViewControl.xaml.cs"> + <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> + </Compile> + <Compile Update="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Update="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Update="TokenStreamVisualizerForm.Designer.cs"> + <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> + </Compile> + </ItemGroup> + + <ItemGroup> + <EmbeddedResource Update="BaseTreeVisualizerForm.resx"> + <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Update="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <EmbeddedResource Update="TokenStreamVisualizerForm.resx"> + <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + <None Update="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + + <ItemGroup> + <Page Include="BaseTreeVisualizerViewControl.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj deleted file mode 100644 index e399666..0000000 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{2F59DA1C-A502-440C-ABE8-240BDE2D0664}</ProjectGuid> - <OutputType>library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Runtime.Visualizer</RootNamespace> - <AssemblyName>Antlr3.Runtime.Visualizer</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <WarningLevel>4</WarningLevel> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="WindowsBase" /> - <Reference Include="PresentationCore" /> - <Reference Include="PresentationFramework" /> - <Reference Include="WindowsFormsIntegration" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> - <Link>Extensions\FlowDocumentExtensions.cs</Link> - </Compile> - <Compile Include="Interval.cs" /> - <Compile Include="RuntimeVisualizerExtensions.cs" /> - <Compile Include="TreeViewModel.cs" /> - <Compile Include="BaseTreeVisualizerForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="BaseTreeVisualizerForm.Designer.cs"> - <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> - </Compile> - <Compile Include="BaseTreeVisualizerViewControl.xaml.cs"> - <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Include="Properties\Settings.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Settings.settings</DependentUpon> - <DesignTimeSharedInput>True</DesignTimeSharedInput> - </Compile> - <Compile Include="TokenStreamVisualizerForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="TokenStreamVisualizerForm.Designer.cs"> - <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> - </Compile> - <Compile Include="TreeVisualizerViewModel.cs" /> - <EmbeddedResource Include="BaseTreeVisualizerForm.resx"> - <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - <EmbeddedResource Include="TokenStreamVisualizerForm.resx"> - <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> - </EmbeddedResource> - <None Include="Properties\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <LastGenOutput>Settings.Designer.cs</LastGenOutput> - </None> - <AppDesigner Include="Properties\" /> - </ItemGroup> - <ItemGroup> - <Page Include="BaseTreeVisualizerViewControl.xaml"> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs index 7320ac9..cfe1c14 100644 --- a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs @@ -1,88 +1,61 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; using System.Windows; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Antlr3.Runtime.Visualizer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] -[assembly: AssemblyProduct("Antlr3.Runtime.Visualizer")] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.sln b/Antlr3.sln index bf48086..f088720 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal
antlr/antlrcs
55a2035874b7342059f8093264f19461c1f7ce63
Avoid changes to debug symbols during this switch to the new project system
diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 1a651e4..7a03244 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,92 +1,102 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> <GeneratePackageOnBuild>true</GeneratePackageOnBuild> <IncludeSymbols>true</IncludeSymbols> <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> <PropertyGroup> <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> <GeneratePackageOnBuild>false</GeneratePackageOnBuild> </PropertyGroup> </Target> <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> <PropertyGroup> <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> </PropertyGroup> </Target> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> </ItemGroup> </When> </Choose> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
982c8d53ad5b5b3cc9b76dc2e4c39cc0cf00cc24
Convert Antlr3.StringTemplate3 to the new project system
diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj new file mode 100644 index 0000000..75eb1fa --- /dev/null +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net35-client</TargetFrameworks> + <RootNamespace>Antlr.ST</RootNamespace> + + <Description>The C# port of StringTemplate 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <IncludeSymbols>true</IncludeSymbols> + <NuspecFile>..\build\prep\StringTemplate3.nuspec</NuspecFile> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=$(InformationalVersion)</NuspecProperties> + <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> + <PropertyGroup> + <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> + <PropertyGroup> + <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + + <PropertyGroup> + <DefineConstants>$(DefineConstants);COMPILE_EXPRESSIONS;CACHE_FUNCTORS</DefineConstants> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + </ItemGroup> + + <ItemGroup> + <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> + <Compile Update="Language\AngleBracketTemplateLexerHelper.cs"> + <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> + </Compile> + <Antlr3 Include="Language\Template.g3" /> + <Compile Update="Language\TemplateLexerHelper.cs"> + <DependentUpon>Template.g3</DependentUpon> + </Compile> + <Compile Update="Language\TemplateParserHelper.cs"> + <DependentUpon>Template.g3</DependentUpon> + </Compile> + <Antlr3 Include="Language\Interface.g3" /> + <Compile Update="Language\InterfaceLexerHelper.cs"> + <DependentUpon>Interface.g3</DependentUpon> + </Compile> + <Compile Update="Language\InterfaceParserHelper.cs"> + <DependentUpon>Interface.g3</DependentUpon> + </Compile> + <Antlr3 Include="Language\Group.g3" /> + <Compile Update="Language\GroupLexerHelper.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <Compile Update="Language\GroupParserHelper.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <Antlr3 Include="Language\Action.g3" /> + <Compile Update="Language\ActionLexerHelper.cs"> + <DependentUpon>Action.g3</DependentUpon> + </Compile> + <Compile Update="Language\ActionParserHelper.cs"> + <DependentUpon>Action.g3</DependentUpon> + </Compile> + <Antlr3 Include="Language\ActionEvaluator.g3" /> + <Compile Update="Language\ActionEvaluatorHelper.cs"> + <DependentUpon>ActionEvaluator.g3</DependentUpon> + </Compile> + </ItemGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj deleted file mode 100644 index 8fc27d7..0000000 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj +++ /dev/null @@ -1,144 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr.ST</RootNamespace> - <AssemblyName>Antlr3.StringTemplate</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\net35-client\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\net35-client\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net35-client\Debug\Antlr3.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\net35-client\Release\</OutputPath> - <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net35-client\Release\Antlr3.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="AttributeRenderer.cs" /> - <Compile Include="AutoIndentWriter.cs" /> - <Compile Include="CommonGroupLoader.cs" /> - <Compile Include="Extensions\ExceptionExtensions.cs" /> - <Compile Include="NoIndentWriter.cs" /> - <Compile Include="PathGroupLoader.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="StringTemplate.cs" /> - <Compile Include="StringTemplateErrorListener.cs" /> - <Compile Include="StringTemplateGroup.cs" /> - <Compile Include="StringTemplateGroupInterface.cs" /> - <Compile Include="StringTemplateGroupLoader.cs" /> - <Compile Include="StringTemplateWriter.cs" /> - </ItemGroup> - <ItemGroup> - <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> - <Compile Include="ITypeProxyFactory.cs" /> - <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> - <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> - <Compile Include="JavaExtensions\ListExtensions.cs" /> - <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> - <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> - </Compile> - <Antlr3 Include="Language\Template.g3" /> - <Compile Include="Language\ASTExpr.cs" /> - <Compile Include="Language\Cat.cs" /> - <Compile Include="Language\ChunkToken.cs" /> - <Compile Include="Language\ConditionalExpr.cs" /> - <Compile Include="Language\Expr.cs" /> - <Compile Include="Language\FormalArgument.cs" /> - <Compile Include="Language\NewlineRef.cs" /> - <Compile Include="Language\RegionType.cs" /> - <Compile Include="Language\StringRef.cs" /> - <Compile Include="Language\StringTemplateAST.cs" /> - <Compile Include="Language\StringTemplateToken.cs" /> - <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> - <Compile Include="Language\TemplateLexerHelper.cs"> - <DependentUpon>Template.g3</DependentUpon> - </Compile> - <Compile Include="Language\TemplateParserHelper.cs"> - <DependentUpon>Template.g3</DependentUpon> - </Compile> - <Antlr3 Include="Language\Interface.g3" /> - <Compile Include="Language\InterfaceLexerHelper.cs"> - <DependentUpon>Interface.g3</DependentUpon> - </Compile> - <Compile Include="Language\InterfaceParserHelper.cs"> - <DependentUpon>Interface.g3</DependentUpon> - </Compile> - <Antlr3 Include="Language\Group.g3" /> - <Compile Include="Language\GroupLexerHelper.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <Compile Include="Language\GroupParserHelper.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <Antlr3 Include="Language\Action.g3" /> - <Compile Include="Language\ActionLexerHelper.cs"> - <DependentUpon>Action.g3</DependentUpon> - </Compile> - <Compile Include="Language\ActionParserHelper.cs"> - <DependentUpon>Action.g3</DependentUpon> - </Compile> - <Antlr3 Include="Language\ActionEvaluator.g3" /> - <Compile Include="Language\ActionEvaluatorHelper.cs"> - <DependentUpon>ActionEvaluator.g3</DependentUpon> - </Compile> - <Compile Include="TypeRegistry`1.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Directory.Build.targets b/Antlr3.StringTemplate/Directory.Build.targets new file mode 100644 index 0000000..ad35b3c --- /dev/null +++ b/Antlr3.StringTemplate/Directory.Build.targets @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + + <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> + +</Project> diff --git a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs index 4afb444..71bcf92 100644 --- a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.StringTemplate" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.StringTemplate" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a4b023e1-07a4-48c5-b095-1e1beb854b3d" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index c7718ac..ea0a4ef 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> - <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index 785c9b7..bf48086 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,247 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index aa519e5..0682cef 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,147 +1,147 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> </ItemGroup> <ItemGroup> <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/build/prep/StringTemplate3.nuspec b/build/prep/StringTemplate3.nuspec index 49d5299..54e43ce 100644 --- a/build/prep/StringTemplate3.nuspec +++ b/build/prep/StringTemplate3.nuspec @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 3.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st3 stringtemplate3 template</tags> <title>StringTemplate 3</title> <summary>The C# port of StringTemplate 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> - <file src="ST3\Antlr3.StringTemplate.dll" target="lib\net35-client"/> - <file src="ST3\Antlr3.StringTemplate.pdb" target="lib\net35-client"/> - <file src="ST3\Antlr3.StringTemplate.xml" target="lib\net35-client"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\net35-client\Antlr3.StringTemplate.dll" target="lib\net35-client"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\net35-client\Antlr3.StringTemplate.pdb" target="lib\net35-client"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\net35-client\Antlr3.StringTemplate.xml" target="lib\net35-client"/> <!-- Source Code --> <file exclude="..\..\Antlr3.StringTemplate\obj\**\*.cs" src="..\..\Antlr3.StringTemplate\**\*.cs" target="src"/> - <file src="..\..\Antlr3.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> - <file src="..\..\Antlr3.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\net35-client\**\*.cs" target="src\obj\$Configuration$\net35-client"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\net35-client\**\*.tokens" target="src\obj\$Configuration$\net35-client"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 1df676b..861c537 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,258 +1,252 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } if (-not (Test-Path nuget)) { mkdir "nuget" } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } - -.\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -If (-not $?) { - $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit 1 -}
antlr/antlrcs
f3451ae32af2e723ad21fa1ddfbf27a12fb3bfdc
Generate StringTemplate 4 NuGet packages during the build
diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 73b9803..71eb347 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,107 +1,125 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> + + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <IncludeSymbols>true</IncludeSymbols> + <NuspecFile>..\build\prep\StringTemplate4.Visualizer.nuspec</NuspecFile> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> + <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> </PropertyGroup> + <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> + <PropertyGroup> + <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> + <PropertyGroup> + <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 6d97d2d..1a651e4 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,74 +1,92 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> + <GeneratePackageOnBuild>true</GeneratePackageOnBuild> + <IncludeSymbols>true</IncludeSymbols> + <NuspecFile>..\build\prep\StringTemplate4.nuspec</NuspecFile> + <NuspecProperties>Configuration=$(Configuration);version=$(InformationalVersion);ANTLRVersion=3.5.2-dev</NuspecProperties> + <PackageOutputPath>..\build\prep\nuget\</PackageOutputPath> + <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> + <Target Name="DisableCrazyPackageDeletion" BeforeTargets="Clean"> + <PropertyGroup> + <GeneratePackageValue>$(GeneratePackageOnBuild)</GeneratePackageValue> + <GeneratePackageOnBuild>false</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Target Name="EnablePackageGeneration" Condition="'$(GeneratePackageValue)' != ''" BeforeTargets="Build"> + <PropertyGroup> + <GeneratePackageOnBuild>$(GeneratePackageValue)</GeneratePackageOnBuild> + </PropertyGroup> + </Target> + <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> </ItemGroup> </When> </Choose> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <None Include="Debug\DebugTemplate.cs" /> <Compile Remove="Debug\DebugTemplate.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Update="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Update="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Update="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Update="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 39e224c..0452c36 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ version: 1.0.{build} -os: Visual Studio 2017 +os: Visual Studio 2017 Preview configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: - vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\net45\Antlr4.Test.StringTemplate.dll" - dotnet vstest /Framework:FrameworkCore10 /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\netcoreapp1.0\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z diff --git a/build/prep/StringTemplate4.Visualizer.nuspec b/build/prep/StringTemplate4.Visualizer.nuspec index 0bd5cff..3c9a8b0 100644 --- a/build/prep/StringTemplate4.Visualizer.nuspec +++ b/build/prep/StringTemplate4.Visualizer.nuspec @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4.Visualizer</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>Provides the visualizer runtime for StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 stviz template</tags> <title>StringTemplate 4 Visualizer</title> <summary>Provides the visualizer runtime for StringTemplate 4.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="StringTemplate4" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> - <file src="ST4\Antlr4.StringTemplate.Visualizer.dll" target="lib\net35-client"/> - <file src="ST4\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net35-client"/> - <file src="ST4\Antlr4.StringTemplate.Visualizer.xml" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.dll" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\bin\$Configuration$\net35-client\Antlr4.StringTemplate.Visualizer.xml" target="lib\net35-client"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate.Visualizer\obj\**\*.cs" src="..\..\Antlr4.StringTemplate.Visualizer\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\**\*.xaml" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> </files> </package> diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index 23b4c90..fe3d9d0 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> <group targetFramework="net35-client"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </group> <group targetFramework="netstandard1.3"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> - <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> - <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> - <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.dll" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\net35-client\Antlr4.StringTemplate.xml" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.cs" target="src\obj\$Configuration$\net35-client"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.tokens" target="src\obj\$Configuration$\net35-client"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.cs" target="src\obj\$Configuration$\netstandard"/> <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.tokens" target="src\obj\$Configuration$\netstandard"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 408907b..1df676b 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,270 +1,258 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } +if (-not (Test-Path nuget)) { + mkdir "nuget" +} + # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages -if (-not (Test-Path nuget)) { - mkdir "nuget" -} - .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit 1 } - -.\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -If (-not $?) { - $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit 1 -} - -.\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -If (-not $?) { - $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit 1 -}
antlr/antlrcs
e01f888349505381b5b97bdf122684e324f2ada0
Convert Antlr4.StringTemplate to the new project system
diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props index 4c3aa83..14965bf 100644 --- a/Antlr3.Targets/Directory.Build.props +++ b/Antlr3.Targets/Directory.Build.props @@ -1,53 +1,53 @@ <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <RootNamespace>Antlr3.Targets</RootNamespace> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <ItemGroup> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Private>false</Private> </ProjectReference> <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.net35-client.csproj"> <Private>false</Private> </ProjectReference> - <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Private>false</Private> </ProjectReference> </ItemGroup> </Project> diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index a2f1e1a..c7718ac 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <Description>The C# port of ANTLR 3</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>3.5.0.2</Version> <FileVersion>3.5.2.0</FileVersion> <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj" /> <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj" /> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index 297e2fc..785c9b7 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,253 +1,247 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU - {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.net35-client.csproj b/Antlr3/Antlr3.net35-client.csproj index 4efd4d8..2ad457b 100644 --- a/Antlr3/Antlr3.net35-client.csproj +++ b/Antlr3/Antlr3.net35-client.csproj @@ -1,510 +1,510 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug.net20</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> + <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index e8fd7e7..73b9803 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,107 +1,107 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net35-client</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.7.0</Version> <FileVersion>4.0.9.0</FileVersion> <InformationalVersion>4.0.9-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'net35-client'"> <PropertyGroup> <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> </When> </Choose> <PropertyGroup> <!-- Workaround for lack of XAML support in the new project system --> <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsBase" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> </ItemGroup> <ItemGroup> <Compile Update="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Update="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Update="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Update="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <EmbeddedResource Update="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj new file mode 100644 index 0000000..6d97d2d --- /dev/null +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net35-client;netstandard1.3</TargetFrameworks> + + <Description>The C# port of StringTemplate 4</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>4.0.7.0</Version> + <FileVersion>4.0.9.0</FileVersion> + <InformationalVersion>4.0.9-dev</InformationalVersion> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + </ItemGroup> + </When> + <When Condition="'$(TargetFramework)' == 'netstandard1.3'"> + <PropertyGroup> + <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> + </ItemGroup> + </When> + </Choose> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <None Include="Debug\DebugTemplate.cs" /> + <Compile Remove="Debug\DebugTemplate.cs" /> + </ItemGroup> + + <ItemGroup> + <Antlr3 Include="Compiler\CodeGenerator.g3" /> + <Compile Update="Compiler\CodeGenerator.g3.cs"> + <DependentUpon>CodeGenerator.g3</DependentUpon> + </Compile> + <Antlr3 Include="Compiler\Group.g3" /> + <Compile Update="Compiler\Group.g3.parser.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <Compile Update="Compiler\Group.g3.lexer.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> + <Antlr3 Include="Compiler\TemplateParser.g3" /> + <Compile Update="Compiler\TemplateParser.g3.cs"> + <DependentUpon>TemplateParser.g3</DependentUpon> + </Compile> + </ItemGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj deleted file mode 100644 index a11658f..0000000 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj +++ /dev/null @@ -1,166 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr4.StringTemplate</RootNamespace> - <AssemblyName>Antlr4.StringTemplate</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\net35-client\</BaseIntermediateOutputPath> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\net35-client\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net35-client\Debug\Antlr4.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\net35-client\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\net35-client\Release\Antlr4.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> - <Compile Include="Extensions\Arrays.cs" /> - <Compile Include="Extensions\PropertyInfoExtensions.cs" /> - <Compile Include="Extensions\TypeExtensions.cs" /> - <Compile Include="TemplateRawGroupDirectory.cs" /> - <Compile Include="Debug\IndentEvent.cs" /> - <Compile Include="Extensions\ExceptionExtensions.cs" /> - <Compile Include="IAttributeRenderer.cs" /> - <Compile Include="AutoIndentWriter.cs" /> - <Compile Include="Debug\DebugEvents.cs" /> - <Compile Include="Misc\AttributeNotFoundException.cs" /> - <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> - <Compile Include="Misc\TextWriterErrorListener.cs" /> - <Compile Include="Misc\DebugErrorListener.cs" /> - <Compile Include="Misc\HttpUtility.cs" /> - <Compile Include="RenderOption.cs" /> - <Compile Include="TemplateFrame.cs" /> - <Compile Include="Misc\Aggregate.cs" /> - <Compile Include="Misc\AggregateModelAdaptor.cs" /> - <Compile Include="TemplateGroupString.cs" /> - <Compile Include="TemplateName.cs" /> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - <Compile Include="DateRenderer.cs" /> - <Compile Include="Compiler\Instruction.cs" /> - <Compile Include="ITypeProxyFactory.cs" /> - <Compile Include="Misc\TypeRegistry`1.cs" /> - <Compile Include="Compiler\OperandType.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Compiler\Bytecode.cs" /> - <Compile Include="Compiler\BytecodeDisassembler.cs" /> - <Compile Include="Compiler\CompilationState.cs" /> - <Compile Include="Compiler\CompiledTemplate.cs" /> - <Compile Include="Compiler\TemplateCompiler.cs" /> - <Compile Include="Compiler\FormalArgument.cs" /> - <Compile Include="Compiler\TemplateException.cs" /> - <Compile Include="Compiler\TemplateLexer.cs" /> - <Compile Include="Compiler\StringTable.cs" /> - <Compile Include="Debug\AddAttributeEvent.cs" /> - <Compile Include="Debug\ConstructionEvent.cs" /> - <None Include="Debug\DebugTemplate.cs" /> - <Compile Include="Debug\EvalExprEvent.cs" /> - <Compile Include="Debug\EvalTemplateEvent.cs" /> - <Compile Include="Debug\InterpEvent.cs" /> - <Compile Include="Interpreter.cs" /> - <Compile Include="Misc\Coordinate.cs" /> - <Compile Include="Misc\ErrorBuffer.cs" /> - <Compile Include="Misc\ErrorManager.cs" /> - <Compile Include="Misc\ErrorType.cs" /> - <Compile Include="Misc\Interval.cs" /> - <Compile Include="Misc\MapModelAdaptor.cs" /> - <Compile Include="Misc\Utility.cs" /> - <Compile Include="Misc\MultiMap.cs" /> - <Compile Include="Misc\ObjectModelAdaptor.cs" /> - <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> - <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> - <Compile Include="Misc\TemplateLexerMessage.cs" /> - <Compile Include="Misc\TemplateMessage.cs" /> - <Compile Include="Misc\TemplateModelAdaptor.cs" /> - <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> - <Compile Include="Misc\TemplateRuntimeMessage.cs" /> - <Compile Include="IModelAdaptor.cs" /> - <Compile Include="NoIndentWriter.cs" /> - <Compile Include="NumberRenderer.cs" /> - <Compile Include="Template.cs" /> - <Compile Include="ITemplateErrorListener.cs" /> - <Compile Include="TemplateGroup.cs" /> - <Compile Include="TemplateGroupDirectory.cs" /> - <Compile Include="TemplateGroupFile.cs" /> - <Compile Include="StringRenderer.cs" /> - <Compile Include="ITemplateWriter.cs" /> - </ItemGroup> - <ItemGroup> - <Antlr3 Include="Compiler\CodeGenerator.g3" /> - <Compile Include="Compiler\CodeGenerator.g3.cs"> - <DependentUpon>CodeGenerator.g3</DependentUpon> - </Compile> - <Antlr3 Include="Compiler\Group.g3" /> - <Compile Include="Compiler\Group.g3.parser.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <Compile Include="Compiler\Group.g3.lexer.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> - <Antlr3 Include="Compiler\TemplateParser.g3" /> - <Compile Include="Compiler\TemplateParser.g3.cs"> - <DependentUpon>TemplateParser.g3</DependentUpon> - </Compile> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup /> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj deleted file mode 100644 index f580c08..0000000 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}</ProjectGuid> - <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr4.StringTemplate</RootNamespace> - <AssemblyName>Antlr4.StringTemplate</AssemblyName> - <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> - <TargetFrameworkProfile /> - <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\netstandard\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETSTANDARD</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\netstandard\Debug\Antlr4.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\netstandard\Release\</OutputPath> - <DefineConstants>TRACE;NETSTANDARD</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\netstandard\Release\Antlr4.StringTemplate.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> - <Compile Include="Extensions\Arrays.cs" /> - <Compile Include="Extensions\PropertyInfoExtensions.cs" /> - <Compile Include="Extensions\TypeExtensions.cs" /> - <Compile Include="TemplateRawGroupDirectory.cs" /> - <Compile Include="Debug\IndentEvent.cs" /> - <Compile Include="Extensions\ExceptionExtensions.cs" /> - <Compile Include="IAttributeRenderer.cs" /> - <Compile Include="AutoIndentWriter.cs" /> - <Compile Include="Debug\DebugEvents.cs" /> - <Compile Include="Misc\AttributeNotFoundException.cs" /> - <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> - <Compile Include="Misc\TextWriterErrorListener.cs" /> - <Compile Include="Misc\DebugErrorListener.cs" /> - <Compile Include="Misc\HttpUtility.cs" /> - <Compile Include="RenderOption.cs" /> - <Compile Include="TemplateFrame.cs" /> - <Compile Include="Misc\Aggregate.cs" /> - <Compile Include="Misc\AggregateModelAdaptor.cs" /> - <Compile Include="TemplateGroupString.cs" /> - <Compile Include="TemplateName.cs" /> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - <Compile Include="DateRenderer.cs" /> - <Compile Include="Compiler\Instruction.cs" /> - <Compile Include="ITypeProxyFactory.cs" /> - <Compile Include="Misc\TypeRegistry`1.cs" /> - <Compile Include="Compiler\OperandType.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Compiler\Bytecode.cs" /> - <Compile Include="Compiler\BytecodeDisassembler.cs" /> - <Compile Include="Compiler\CompilationState.cs" /> - <Compile Include="Compiler\CompiledTemplate.cs" /> - <Compile Include="Compiler\TemplateCompiler.cs" /> - <Compile Include="Compiler\FormalArgument.cs" /> - <Compile Include="Compiler\TemplateException.cs" /> - <Compile Include="Compiler\TemplateLexer.cs" /> - <Compile Include="Compiler\StringTable.cs" /> - <Compile Include="Debug\AddAttributeEvent.cs" /> - <Compile Include="Debug\ConstructionEvent.cs" /> - <None Include="Antlr4.StringTemplate.netstandard.project.json" /> - <None Include="Debug\DebugTemplate.cs" /> - <Compile Include="Debug\EvalExprEvent.cs" /> - <Compile Include="Debug\EvalTemplateEvent.cs" /> - <Compile Include="Debug\InterpEvent.cs" /> - <Compile Include="Interpreter.cs" /> - <Compile Include="Misc\Coordinate.cs" /> - <Compile Include="Misc\ErrorBuffer.cs" /> - <Compile Include="Misc\ErrorManager.cs" /> - <Compile Include="Misc\ErrorType.cs" /> - <Compile Include="Misc\Interval.cs" /> - <Compile Include="Misc\MapModelAdaptor.cs" /> - <Compile Include="Misc\Utility.cs" /> - <Compile Include="Misc\MultiMap.cs" /> - <Compile Include="Misc\ObjectModelAdaptor.cs" /> - <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> - <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> - <Compile Include="Misc\TemplateLexerMessage.cs" /> - <Compile Include="Misc\TemplateMessage.cs" /> - <Compile Include="Misc\TemplateModelAdaptor.cs" /> - <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> - <Compile Include="Misc\TemplateRuntimeMessage.cs" /> - <Compile Include="IModelAdaptor.cs" /> - <Compile Include="NoIndentWriter.cs" /> - <Compile Include="NumberRenderer.cs" /> - <Compile Include="Template.cs" /> - <Compile Include="ITemplateErrorListener.cs" /> - <Compile Include="TemplateGroup.cs" /> - <Compile Include="TemplateGroupDirectory.cs" /> - <Compile Include="TemplateGroupFile.cs" /> - <Compile Include="StringRenderer.cs" /> - <Compile Include="ITemplateWriter.cs" /> - </ItemGroup> - <ItemGroup> - <Antlr3 Include="Compiler\CodeGenerator.g3" /> - <Compile Include="Compiler\CodeGenerator.g3.cs"> - <DependentUpon>CodeGenerator.g3</DependentUpon> - </Compile> - <Antlr3 Include="Compiler\Group.g3" /> - <Compile Include="Compiler\Group.g3.parser.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <Compile Include="Compiler\Group.g3.lexer.cs"> - <DependentUpon>Group.g3</DependentUpon> - </Compile> - <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> - <Antlr3 Include="Compiler\TemplateParser.g3" /> - <Compile Include="Compiler\TemplateParser.g3.cs"> - <DependentUpon>TemplateParser.g3</DependentUpon> - </Compile> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj"> - <Project>{ac2c28ab-d93a-41e3-85a6-5ecb08cae5c3}</Project> - <Name>Antlr3.Runtime.netstandard</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json deleted file mode 100644 index 6986abf..0000000 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dependencies": { - "NETStandard.Library": "1.6.0" - }, - - "frameworks": { - "netstandard1.3": { - } - } -} diff --git a/Antlr4.StringTemplate/Directory.Build.targets b/Antlr4.StringTemplate/Directory.Build.targets new file mode 100644 index 0000000..ad35b3c --- /dev/null +++ b/Antlr4.StringTemplate/Directory.Build.targets @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + + <Import Project="$(MSBuildThisFileDirectory)..\build\Bootstrap\Antlr3.targets" /> + +</Project> diff --git a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs index 88f6d3c..3df7d65 100644 --- a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Labs, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Antlr4.StringTemplate")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] -[assembly: AssemblyProduct("Antlr4.StringTemplate")] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a4b023e1-07a4-48c5-b095-1e1beb854b3d")] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.9.0")] -[assembly: AssemblyInformationalVersion("4.0.9-dev")] diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index a2cb3a4..2e52ef6 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,55 +1,57 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.6.9004</Version> <FileVersion>4.0.6.9004</FileVersion> <InformationalVersion>4.0.6.9004-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> <ItemGroup> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> </ItemGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj" /> + </ItemGroup> + </Project> \ No newline at end of file diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index f9a6cc8..23b4c90 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> <group targetFramework="net35-client"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </group> <group targetFramework="netstandard1.3"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> - <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> - <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> - <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> + <file src="..\..\Antlr4.StringTemplate\bin\$Configuration$\netstandard1.3\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> - <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> - <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> - <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.cs" target="src\obj\netstandard\$Configuration$"/> - <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.tokens" target="src\obj\netstandard\$Configuration$"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.cs" target="src\obj\$Configuration$\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\net35-client\**\*.tokens" target="src\obj\$Configuration$\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.cs" target="src\obj\$Configuration$\netstandard"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\netstandard1.3\**\*.tokens" target="src\obj\$Configuration$\netstandard"/> </files> </package>
antlr/antlrcs
f74532f821b727f23b622ab64043c1bb8c2a36a9
Convert Antlr4.StringTemplate.Visualizer to the new project system
diff --git a/Antlr3.sln b/Antlr3.sln index 3eac523..297e2fc 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,253 +1,253 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.net35-client.csproj b/Antlr3/Antlr3.net35-client.csproj index e82d2c1..4efd4d8 100644 --- a/Antlr3/Antlr3.net35-client.csproj +++ b/Antlr3/Antlr3.net35-client.csproj @@ -1,510 +1,510 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug.net20</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> - <Name>Antlr4.StringTemplate.Visualizer.net35-client</Name> + <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj new file mode 100644 index 0000000..e8fd7e7 --- /dev/null +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net35-client</TargetFrameworks> + + <Description>The C# port of StringTemplate 4</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>4.0.7.0</Version> + <FileVersion>4.0.9.0</FileVersion> + <InformationalVersion>4.0.9-dev</InformationalVersion> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + + <PropertyGroup> + <!-- Workaround for lack of XAML support in the new project system --> + <LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <PropertyGroup> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <ItemGroup> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + <Reference Include="WindowsBase" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> + </ItemGroup> + + <ItemGroup> + <Compile Update="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Update="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Update="TemplateVisualizerFrame.xaml.cs"> + <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> + </Compile> + <Compile Update="TemplateVisualizerWindow.xaml.cs"> + <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> + </Compile> + </ItemGroup> + + <ItemGroup> + <EmbeddedResource Update="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + </ItemGroup> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> + </ItemGroup> + + <ItemGroup> + <Page Include="TemplateVisualizerFrame.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="TemplateVisualizerWindow.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj deleted file mode 100644 index 539b49f..0000000 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</ProjectGuid> - <OutputType>library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr4.StringTemplate.Visualizer</RootNamespace> - <AssemblyName>Antlr4.StringTemplate.Visualizer</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Debug\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Release\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup> - <SignAssembly>true</SignAssembly> - </PropertyGroup> - <PropertyGroup> - <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="WindowsBase" /> - <Reference Include="PresentationCore" /> - <Reference Include="PresentationFramework" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AstNodeToStringConverter.cs" /> - <Compile Include="AttributeViewModel.cs" /> - <Compile Include="Extensions\FlowDocumentExtensions.cs" /> - <Compile Include="Extensions\ListExtensions.cs" /> - <Compile Include="Extensions\TemplateExtensions.cs" /> - <Compile Include="Properties\AssemblyInfo.cs"> - <SubType>Code</SubType> - </Compile> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Include="Properties\Settings.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Settings.settings</DependentUpon> - <DesignTimeSharedInput>True</DesignTimeSharedInput> - </Compile> - <Compile Include="TemplateCallHierarchyViewModel.cs" /> - <Compile Include="TemplateFrameAttributeViewModel.cs" /> - <Compile Include="TemplateVisualizer.cs" /> - <Compile Include="TemplateVisualizerFrame.xaml.cs"> - <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> - </Compile> - <Compile Include="TemplateVisualizerViewModel.cs" /> - <Compile Include="TemplateVisualizerWindow.xaml.cs"> - <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> - </Compile> - <Compile Include="TreeViewItemDisplay.cs" /> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - <None Include="Properties\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <LastGenOutput>Settings.Designer.cs</LastGenOutput> - </None> - <AppDesigner Include="Properties\" /> - <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> - </ItemGroup> - <ItemGroup> - <Page Include="TemplateVisualizerFrame.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:Compile</Generator> - </Page> - <Page Include="TemplateVisualizerWindow.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:Compile</Generator> - </Page> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs index 3b881bb..b78aa10 100644 --- a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs @@ -1,88 +1,61 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; using System.Windows; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Antlr4.StringTemplate.Visualizer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] -[assembly: AssemblyProduct("Antlr4.StringTemplate.Visualizer")] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.9.0")] -[assembly: AssemblyInformationalVersion("4.0.9-dev")] diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index aaa6c0d..a2cb3a4 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,55 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> - <Description>The C# port of ANTLR 3</Description> + <Description>The C# port of StringTemplate 4</Description> <Company>Tunnel Vision Laboratories, LLC</Company> <Copyright>Copyright © Sam Harwell 2011</Copyright> <Version>4.0.6.9004</Version> <FileVersion>4.0.6.9004</FileVersion> <InformationalVersion>4.0.6.9004-dev</InformationalVersion> </PropertyGroup> <Choose> <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> <PropertyGroup> <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj" /> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> </ItemGroup> </When> <When Condition="'$(TargetFramework)' == 'net45'"> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj" /> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> </ItemGroup> </When> </Choose> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> </Project> \ No newline at end of file
antlr/antlrcs
496e1a308412a647b89b402e331da239718ef968
Convert AntlrBuildTask to the new project system
diff --git a/Antlr3.sln b/Antlr3.sln index 0fb87a4..3eac523 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,253 +1,253 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 736de0c..7e884bd 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,80 +1,57 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>AntlrBuildTask</RootNamespace> - <AssemblyName>AntlrBuildTask</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> + <TargetFrameworks>net35</TargetFrameworks> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <OutputPath>..\bin\$(Configuration)\</OutputPath> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>..\bin\Debug\AntlrBuildTask.xml</DocumentationFile> + <DebugSymbols>true</DebugSymbols> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <DocumentationFile>..\bin\Release\AntlrBuildTask.xml</DocumentationFile> + <DebugSymbols>true</DebugSymbols> </PropertyGroup> + <PropertyGroup> + <GenerateDocumentationFile>True</GenerateDocumentationFile> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35'"> + <ItemGroup> + <Reference Include="Microsoft.Build.Framework" /> + <Reference Include="Microsoft.Build.Tasks.v3.5" /> + <Reference Include="Microsoft.Build.Utilities.v3.5" /> + </ItemGroup> + </When> + </Choose> + <ItemGroup> - <Reference Include="Microsoft.Build.Engine" /> - <Reference Include="Microsoft.Build.Framework" /> - <Reference Include="Microsoft.Build.Utilities.v3.5"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="AntlrClassGenerationTask.cs" /> - <Compile Include="AntlrClassGenerationTaskInternal.cs" /> - <Compile Include="BuildMessage.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <Content Include="Antlr3.targets"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - <SubType>Designer</SubType> - </Content> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Antlr3.targets"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/AntlrBuildTask/Properties/AssemblyInfo.cs b/AntlrBuildTask/Properties/AssemblyInfo.cs index 39b3460..2784cd2 100644 --- a/AntlrBuildTask/Properties/AssemblyInfo.cs +++ b/AntlrBuildTask/Properties/AssemblyInfo.cs @@ -1,71 +1,44 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AntlrBuildTask")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] -[assembly: AssemblyProduct("AntlrBuildTask")] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("2028affe-3dfd-4164-9faf-2959ec04f7f7")] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - * 3. Revision is the Perforce changelist number associated with the release. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")]
antlr/antlrcs
5cc741f397a92397c1c6c5ba9711874b8c037126
Fix build script not failing when it should
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 9fdd617..408907b 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,270 +1,270 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') - exit $LASTEXITCODE + exit 1 } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") - exit $LASTEXITCODE + exit 1 } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") - exit $LASTEXITCODE + exit 1 } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") - exit $LASTEXITCODE + exit 1 }
antlr/antlrcs
d9f245791e5837b0f320e3a87d0c4502624dffd8
Convert the test projects to the new project system
diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 133b73c..a2f1e1a 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,148 +1,64 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{8B58597B-058E-4D7A-B83E-5269BDABBE2C}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> + <TargetFrameworks>net45</TargetFrameworks> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> + <DebugSymbols>true</DebugSymbols> </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + <ItemGroup> - <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="BaseTest.cs" /> - <Compile Include="DebugTestAutoAST.cs" /> - <Compile Include="DebugTestCompositeGrammars.cs" /> - <Compile Include="DebugTestRewriteAST.cs" /> - <Compile Include="ErrorQueue.cs" /> - <Compile Include="IRuntimeTestHarness.cs" /> - <Compile Include="JavaRuntimeTestHarness.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RuntimeTestHarness.cs" /> - <Compile Include="StringTemplateTests.cs" /> - <Compile Include="TestASTConstruction.cs" /> - <Compile Include="TestAttributes.cs" /> - <Compile Include="TestAutoAST.cs" /> - <Compile Include="TestBufferedTreeNodeStream.cs" /> - <Compile Include="TestCategories.cs" /> - <Compile Include="TestCharDFAConversion.cs" /> - <Compile Include="TestCommonTokenStream.cs" /> - <Compile Include="TestCompositeGrammars.cs" /> - <Compile Include="TestDFAConversion.cs" /> - <Compile Include="TestDFAMatching.cs" /> - <Compile Include="TestFastQueue.cs" /> - <Compile Include="TestHeteroAST.cs" /> - <Compile Include="TestInterpretedLexing.cs" /> - <Compile Include="TestInterpretedParsing.cs" /> - <Compile Include="TestIntervalSet.cs" /> - <Compile Include="TestJavaCodeGeneration.cs" /> - <Compile Include="TestLeftRecursion.cs" /> - <Compile Include="TestLexer.cs" /> - <Compile Include="TestLookaheadStream.cs" /> - <Compile Include="TestMessages.cs" /> - <Compile Include="TestNFAConstruction.cs" /> - <Compile Include="TestRewriteAST.cs" /> - <Compile Include="TestRewriteTemplates.cs" /> - <Compile Include="TestSemanticPredicateEvaluation.cs" /> - <Compile Include="TestSemanticPredicates.cs" /> - <Compile Include="TestSets.cs" /> - <Compile Include="TestSymbolDefinitions.cs" /> - <Compile Include="TestSyntacticPredicateEvaluation.cs" /> - <Compile Include="TestSyntaxErrors.cs" /> - <Compile Include="TestTemplates.cs" /> - <Compile Include="TestTokenRewriteStream.cs" /> - <Compile Include="TestTopologicalSort.cs" /> - <Compile Include="TestTreeGrammarRewriteAST.cs" /> - <Compile Include="TestTreeIterator.cs" /> - <Compile Include="TestTreeNodeStream.cs" /> - <Compile Include="TestTreeParsing.cs" /> - <Compile Include="TestTrees.cs" /> - <Compile Include="TestTreeWizard.cs" /> - </ItemGroup> - <ItemGroup> - <Content Include="AuthoringTests.txt" /> + <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> + <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> + <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> + <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> - <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj"> - <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> - <Name>Antlr3.Runtime.JavaExtensions.net35-client</Name> - </ProjectReference> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj"> - <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> - <Name>Antlr3.StringTemplate.net35-client</Name> - <Private>True</Private> - </ProjectReference> - <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>True</Private> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - </ProjectReference> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj" /> </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <PropertyGroup> - <PostBuildEvent> - </PostBuildEvent> - </PropertyGroup> + </Project> \ No newline at end of file diff --git a/Antlr3.Test/BaseTest.cs b/Antlr3.Test/BaseTest.cs index 2d66280..be36736 100644 --- a/Antlr3.Test/BaseTest.cs +++ b/Antlr3.Test/BaseTest.cs @@ -1,585 +1,580 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace AntlrUnitTests { using System; using System.Collections.Generic; using System.Linq; using Antlr.Runtime; using Antlr.Runtime.JavaExtensions; using Antlr3.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using AntlrTool = Antlr3.AntlrTool; using BindingFlags = System.Reflection.BindingFlags; using CultureInfo = System.Globalization.CultureInfo; using Debugger = System.Diagnostics.Debugger; using Directory = System.IO.Directory; using ErrorManager = Antlr3.Tool.ErrorManager; using FieldInfo = System.Reflection.FieldInfo; using GrammarSemanticsMessage = Antlr3.Tool.GrammarSemanticsMessage; using IANTLRErrorListener = Antlr3.Tool.IANTLRErrorListener; using IList = System.Collections.IList; using IOException = System.IO.IOException; using Label = Antlr3.Analysis.Label; using Message = Antlr3.Tool.Message; using Path = System.IO.Path; using Registry = Microsoft.Win32.Registry; using RegistryKey = Microsoft.Win32.RegistryKey; using RegistryValueOptions = Microsoft.Win32.RegistryValueOptions; using StringBuilder = System.Text.StringBuilder; using StringTemplate = Antlr4.StringTemplate.Template; using StringTemplateGroup = Antlr4.StringTemplate.TemplateGroup; [TestClass] -#if DEBUG - [DeploymentItem(@"bin\Debug\Codegen\", "Codegen")] - [DeploymentItem(@"bin\Debug\Targets\", "Targets")] - [DeploymentItem(@"bin\Debug\Tool\", "Tool")] -#else - [DeploymentItem(@"bin\Release\Codegen\", "Codegen")] - [DeploymentItem(@"bin\Release\Targets\", "Targets")] - [DeploymentItem(@"bin\Release\Tool\", "Tool")] -#endif + [DeploymentItem(@"Codegen\", "Codegen")] + [DeploymentItem(@"Antlr3.Targets.Java.dll", "Targets")] + [DeploymentItem(@"Antlr3.Targets.Java.pdb", "Targets")] + [DeploymentItem(@"Tool\", "Tool")] public abstract class BaseTest { public readonly string jikes = null; public static readonly string pathSep = System.IO.Path.PathSeparator.ToString(); public readonly string RuntimeJar = Path.Combine( Environment.CurrentDirectory, @"..\..\antlr-runtime-3.3.jar" ); public readonly string Runtime2Jar = Path.Combine( Environment.CurrentDirectory, @"..\..\antlr-2.7.7.jar" ); public readonly string StringTemplateJar = Path.Combine( Environment.CurrentDirectory, @"..\..\stringtemplate-3.2.1.jar" ); private static string javaHome; public string tmpdir; public TestContext TestContext { get; set; } /** If error during parser execution, store stderr here; can't return * stdout and stderr. This doesn't trap errors from running antlr. */ protected string stderrDuringParse; public static readonly string NewLine = Environment.NewLine; [ClassInitialize] public void ClassSetUp( TestContext testContext ) { TestContext = testContext; } public static long currentTimeMillis() { return DateTime.Now.ToFileTime() / 10000; } [TestInitialize] public void setUp() { #if DEBUG string configuration = "Debug"; #else string configuration = "Release"; #endif System.IO.DirectoryInfo currentAssemblyDirectory = new System.IO.FileInfo(typeof(BaseTest).Assembly.Location).Directory; AntlrTool.ToolPathRoot = Path.Combine(currentAssemblyDirectory.Parent.Parent.Parent.FullName, @"bin\" + configuration); // new output dir for each test tmpdir = Path.GetFullPath( Path.Combine( Path.GetTempPath(), "antlr-" + currentTimeMillis() ) ); ErrorManager.SetLocale(CultureInfo.GetCultureInfo("en-us")); ErrorManager.SetFormat("antlr"); ErrorManager.ResetErrorState(); StringTemplateGroup.DefaultGroup = new StringTemplateGroup(); // verify token constants in StringTemplate VerifyImportedTokens( typeof( Antlr3.ST.Language.ActionParser ), typeof( Antlr3.ST.Language.ActionLexer ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.ActionParser ), typeof( Antlr3.ST.Language.ActionEvaluator ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.TemplateParser ), typeof( Antlr3.ST.Language.TemplateLexer ) ); VerifyImportedTokens( typeof( Antlr3.ST.Language.TemplateParser ), typeof( Antlr3.ST.Language.AngleBracketTemplateLexer ) ); // verify token constants in the ANTLR Tool VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.ANTLRLexer ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.ANTLRTreePrinter ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.AssignTokenTypesWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.CodeGenTreeWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.DefineGrammarItemsWalker ) ); VerifyImportedTokens( typeof( Antlr3.Grammars.ANTLRParser ), typeof( Antlr3.Grammars.TreeToNFAConverter ) ); } [TestCleanup] public void tearDown() { // remove tmpdir if no error. how? if ( TestContext != null && TestContext.CurrentTestOutcome == UnitTestOutcome.Passed ) eraseTempDir(); } private void VerifyImportedTokens( Type source, Type target ) { FieldInfo namesField = source.GetField( "tokenNames", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public ); FieldInfo targetNamesField = target.GetField( "tokenNames", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public ); Assert.IsNotNull( namesField, string.Format( "No tokenNames field was found in grammar {0}.", source.Name ) ); string[] sourceNames = namesField.GetValue( null ) as string[]; string[] targetNames = ( targetNamesField != null ) ? targetNamesField.GetValue( null ) as string[] : null; Assert.IsNotNull( sourceNames, string.Format( "The tokenNames field in grammar {0} was null.", source.Name ) ); for ( int i = 0; i < sourceNames.Length; i++ ) { string tokenName = sourceNames[i]; if ( string.IsNullOrEmpty( tokenName ) || tokenName[0] == '<' ) continue; if ( tokenName[0] == '\'' ) { if ( targetNames != null && targetNames.Length > i ) { // make sure implicit tokens like 'new' that show up in code as T__45 refer to the same token Assert.AreEqual( sourceNames[i], targetNames[i], string.Format( "Implicit token {0} in grammar {1} doesn't match {2} in grammar {3}.", sourceNames[i], source.Name, targetNames[i], target.Name ) ); continue; } else { tokenName = "T__" + i.ToString(); } } FieldInfo sourceToken = source.GetField( tokenName ); FieldInfo targetToken = target.GetField( tokenName ); if ( source != null && target != null ) { int sourceValue = (int)sourceToken.GetValue( null ); int targetValue = (int)targetToken.GetValue( null ); Assert.AreEqual( sourceValue, targetValue, string.Format( "Token {0} with value {1} grammar {2} doesn't match value {3} in grammar {4}.", tokenName, sourceValue, source.Name, targetValue, target.Name ) ); } } } protected AntlrTool newTool(params string[] args) { AntlrTool tool = (args == null || args.Length == 0) ? new AntlrTool() : new AntlrTool(args); tool.SetOutputDirectory( tmpdir ); tool.TestMode = true; return tool; } protected static string JavaHome { get { string home = javaHome; bool debugger = Debugger.IsAttached; if (home == null || debugger) { home = Environment.GetEnvironmentVariable("JAVA_HOME"); if (string.IsNullOrEmpty(home) || !Directory.Exists(home)) { home = CheckForJavaHome(Registry.CurrentUser); if (home == null) home = CheckForJavaHome(Registry.LocalMachine); } if (home != null && !Directory.Exists(home)) home = null; if (!debugger) { javaHome = home; } } return home; } } protected static string CheckForJavaHome(RegistryKey key) { using (RegistryKey subkey = key.OpenSubKey(@"SOFTWARE\JavaSoft\Java Development Kit")) { if (subkey == null) return null; object value = subkey.GetValue("CurrentVersion", null, RegistryValueOptions.None); if (value != null) { using (RegistryKey currentHomeKey = subkey.OpenSubKey(value.ToString())) { if (currentHomeKey == null) return null; value = currentHomeKey.GetValue("JavaHome", null, RegistryValueOptions.None); if (value != null) return value.ToString(); } } } return null; } protected string ClassPath { get { return Path.GetFullPath( RuntimeJar ) + Path.PathSeparator + Path.GetFullPath( Runtime2Jar ) + Path.PathSeparator + Path.GetFullPath( StringTemplateJar ); } } protected string Compiler { get { return Path.Combine( Path.Combine( JavaHome, "bin" ), "javac.exe" ); } } protected string Jvm { get { return Path.Combine( Path.Combine( JavaHome, "bin" ), "java.exe" ); } } protected bool compile( string fileName ) { //String compiler = "javac"; string compiler = Compiler; string classpathOption = "-classpath"; if ( jikes != null ) { compiler = jikes; classpathOption = "-bootclasspath"; } string inputFile = Path.Combine(tmpdir, fileName); string[] args = new string[] { /*compiler,*/ "-d", tmpdir, classpathOption, tmpdir+pathSep+ClassPath, inputFile }; string cmdLine = compiler + " -d " + tmpdir + " " + classpathOption + " " + '"'+tmpdir + pathSep + ClassPath+'"' + " " + fileName; //System.out.println("compile: "+cmdLine); //File outputDir = new File( tmpdir ); try { System.Diagnostics.Process process = System.Diagnostics.Process.Start( new System.Diagnostics.ProcessStartInfo( compiler, '"' + string.Join( "\" \"", args ) + '"' ) { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, RedirectStandardError = true, WorkingDirectory = tmpdir } ); //Process process = // Runtime.getRuntime().exec( args, null, outputDir ); StreamVacuum stdout = new StreamVacuum( process.StandardOutput, inputFile ); StreamVacuum stderr = new StreamVacuum( process.StandardError, inputFile ); stdout.start(); stderr.start(); process.WaitForExit(); if ( stdout.ToString().Length > 0 ) { Console.Error.WriteLine( "compile stdout from: " + cmdLine ); Console.Error.WriteLine( stdout ); } if ( stderr.ToString().Length > 0 ) { Console.Error.WriteLine( "compile stderr from: " + cmdLine ); Console.Error.WriteLine( stderr ); } int ret = process.ExitCode; return ret == 0; } catch ( Exception e ) { Console.Error.WriteLine( "can't exec compilation" ); e.PrintStackTrace( Console.Error ); return false; } } /** Return true if all is ok, no errors */ protected bool antlr( string fileName, string grammarFileName, string grammarStr, bool debug ) { bool allIsWell = true; mkdir( tmpdir ); writeFile( tmpdir, fileName, grammarStr ); try { List<string> options = new List<string>(); options.Add( "-testmode" ); if ( debug ) { options.Add( "-debug" ); } options.Add( "-o" ); options.Add( tmpdir ); options.Add( "-lib" ); options.Add( tmpdir ); options.Add( Path.Combine( tmpdir, grammarFileName ) ); options.Add("-language"); options.Add("Java"); //String[] optionsA = new String[options.size()]; //options.toArray( optionsA ); string[] optionsA = options.ToArray(); /* final ErrorQueue equeue = new ErrorQueue(); ErrorManager.setErrorListener(equeue); */ AntlrTool antlr = new AntlrTool( optionsA ); antlr.Process(); IANTLRErrorListener listener = ErrorManager.GetErrorListener(); if ( listener is ErrorQueue ) { ErrorQueue equeue = (ErrorQueue)listener; if ( equeue.errors.Count > 0 ) { allIsWell = false; Console.Error.WriteLine( "antlr reports errors from [" + string.Join(", ", options) + ']' ); for ( int i = 0; i < equeue.errors.Count; i++ ) { Message msg = (Message)equeue.errors[i]; Console.Error.WriteLine( msg ); } Console.Out.WriteLine( "!!!\ngrammar:" ); Console.Out.WriteLine( grammarStr ); Console.Out.WriteLine( "###" ); } } } catch ( Exception e ) { allIsWell = false; Console.Error.WriteLine( "problems building grammar: " + e ); e.PrintStackTrace( Console.Error ); } return allIsWell; } protected string execLexer( string grammarFileName, string grammarStr, string lexerName, string input, bool debug ) { bool compiled = rawGenerateAndBuildRecognizer( grammarFileName, grammarStr, null, lexerName, debug ); Assert.IsTrue(compiled); writeFile(tmpdir, "input", input); return rawExecRecognizer( null, null, lexerName, null, null, false, false, false, debug ); } protected string execParser( string grammarFileName, string grammarStr, string parserName, string lexerName, string startRuleName, string input, bool debug ) { bool compiled = rawGenerateAndBuildRecognizer( grammarFileName, grammarStr, parserName, lexerName, debug ); Assert.IsTrue(compiled); writeFile(tmpdir, "input", input); bool parserBuildsTrees = grammarStr.IndexOf( "output=AST" ) >= 0 || grammarStr.IndexOf( "output = AST" ) >= 0; bool parserBuildsTemplate = grammarStr.IndexOf( "output=template" ) >= 0 || grammarStr.IndexOf( "output = template" ) >= 0; return rawExecRecognizer( parserName, null, lexerName, startRuleName, null, parserBuildsTrees, parserBuildsTemplate, false, debug ); } protected string execTreeParser( string parserGrammarFileName, string parserGrammarStr, string parserName, string treeParserGrammarFileName, string treeParserGrammarStr, string treeParserName, string lexerName, string parserStartRuleName, string treeParserStartRuleName, string input ) { return execTreeParser( parserGrammarFileName, parserGrammarStr, parserName, treeParserGrammarFileName, treeParserGrammarStr, treeParserName, lexerName, parserStartRuleName, treeParserStartRuleName, input, false ); } protected string execTreeParser( string parserGrammarFileName, string parserGrammarStr, string parserName, string treeParserGrammarFileName, string treeParserGrammarStr, string treeParserName, string lexerName, string parserStartRuleName, string treeParserStartRuleName, string input, bool debug ) { // build the parser bool compiled = rawGenerateAndBuildRecognizer( parserGrammarFileName, parserGrammarStr, parserName, lexerName, debug ); Assert.IsTrue(compiled); // build the tree parser compiled = rawGenerateAndBuildRecognizer( treeParserGrammarFileName, treeParserGrammarStr, treeParserName, lexerName, debug ); Assert.IsTrue(compiled); writeFile( tmpdir, "input", input ); bool parserBuildsTrees = parserGrammarStr.IndexOf( "output=AST" ) >= 0 || parserGrammarStr.IndexOf( "output = AST" ) >= 0; bool treeParserBuildsTrees = treeParserGrammarStr.IndexOf( "output=AST" ) >= 0 || treeParserGrammarStr.IndexOf( "output = AST" ) >= 0; bool parserBuildsTemplate = parserGrammarStr.IndexOf( "output=template" ) >= 0 || parserGrammarStr.IndexOf( "output = template" ) >= 0; return rawExecRecognizer( parserName, treeParserName, lexerName, parserStartRuleName, treeParserStartRuleName, parserBuildsTrees, parserBuildsTemplate, treeParserBuildsTrees, debug ); } /** Return true if all is well */ protected bool rawGenerateAndBuildRecognizer( string grammarFileName, string grammarStr, string parserName, string lexerName, bool debug ) { bool allIsWell = antlr( grammarFileName, grammarFileName, grammarStr, debug ); if (!allIsWell) return false; if ( lexerName != null ) { bool ok; if ( parserName != null ) { ok = compile( parserName + ".java" ); if ( !ok ) { allIsWell = false; } } ok = compile( lexerName + ".java" ); if ( !ok ) { allIsWell = false; } } else { bool ok = compile( parserName + ".java" ); if ( !ok ) { allIsWell = false; } } return allIsWell; } protected string rawExecRecognizer( string parserName, diff --git a/Antlr3.Test/Properties/AssemblyInfo.cs b/Antlr3.Test/Properties/AssemblyInfo.cs index d094520..f0c523c 100644 --- a/Antlr3.Test/Properties/AssemblyInfo.cs +++ b/Antlr3.Test/Properties/AssemblyInfo.cs @@ -1,68 +1,41 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "AntlrUnitTests" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Pixel Mine, Inc." )] -[assembly: AssemblyProduct( "AntlrUnitTests" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] - // Setting ComVisible to false makes the types in this assembly not visible // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a0f4c939-114e-4512-8eb1-fad6056493aa" )] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.sln b/Antlr3.sln index c2f98b5..0fb87a4 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,259 +1,253 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" ProjectSection(SolutionItems) = preProject Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.netstandard", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.netstandard.csproj", "{0FB5C69A-F894-45DC-B775-5FC273D41460}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU - {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj new file mode 100644 index 0000000..aaa6c0d --- /dev/null +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>net45;netcoreapp1.0</TargetFrameworks> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>4.0.6.9004</Version> + <FileVersion>4.0.6.9004</FileVersion> + <InformationalVersion>4.0.6.9004-dev</InformationalVersion> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'netcoreapp1.0'"> + <PropertyGroup> + <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj" /> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj" /> + </ItemGroup> + </When> + <When Condition="'$(TargetFramework)' == 'net45'"> + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj" /> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj" /> + </ItemGroup> + </When> + </Choose> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> + <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> + <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> + </ItemGroup> + +</Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj deleted file mode 100644 index 3d7071d..0000000 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion> - </ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> - <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <BaseIntermediateOutputPath>obj\net40\</BaseIntermediateOutputPath> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\net40\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\net40\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> - <Visible>False</Visible> - </CodeAnalysisDependentAssemblyPaths> - </ItemGroup> - <ItemGroup> - <Compile Include="Extensions\ListExtensions.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="TestAggregates.cs" /> - <Compile Include="TestCategories.cs" /> - <Compile Include="TestEarlyEvaluation.cs" /> - <Compile Include="TestNoNewlineTemplates.cs" /> - <Compile Include="TestTemplateNames.cs" /> - <Compile Include="TestTemplateRawGroupDirectory.cs" /> - <Compile Include="TestVisualizer.cs" /> - </ItemGroup> - <ItemGroup> - <Compile Include="BaseTest.cs" /> - <Compile Include="ErrorBufferAllErrors.cs" /> - <Compile Include="TestCompiler.cs" /> - <Compile Include="TestCoreBasics.cs" /> - <Compile Include="TestDebugEvents.cs" /> - <Compile Include="TestDictionaries.cs" /> - <Compile Include="TestDollarDelimiters.cs" /> - <Compile Include="TestFunctions.cs" /> - <Compile Include="TestGroups.cs" /> - <Compile Include="TestGroupSyntax.cs" /> - <Compile Include="TestGroupSyntaxErrors.cs" /> - <Compile Include="TestImports.cs" /> - <Compile Include="TestIndentation.cs" /> - <Compile Include="TestIndirectionAndEarlyEval.cs" /> - <Compile Include="TestInterptimeErrors.cs" /> - <Compile Include="TestLexer.cs" /> - <Compile Include="TestLineWrap.cs" /> - <Compile Include="TestLists.cs" /> - <Compile Include="TestModelAdaptors.cs" /> - <Compile Include="TestNullAndEmptyValues.cs" /> - <Compile Include="TestOptions.cs" /> - <Compile Include="TestRegions.cs" /> - <Compile Include="TestRenderers.cs" /> - <Compile Include="TestScopes.cs" /> - <Compile Include="TestSubtemplates.cs" /> - <Compile Include="TestSyntaxErrors.cs" /> - <Compile Include="TestTokensForDollarDelimiters.cs" /> - <Compile Include="TestWhitespace.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj"> - <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> - <Name>Antlr4.StringTemplate.Visualizer.net35-client</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj deleted file mode 100644 index b60ff32..0000000 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion> - </ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{0FB5C69A-F894-45DC-B775-5FC273D41460}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> - <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> - <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> - <TargetFrameworkProfile /> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\netstandard\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;NETSTANDARD</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\netstandard\Release\</OutputPath> - <DefineConstants>TRACE;NETSTANDARD</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup> - <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> - <Reference Include="System" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Extensions\ListExtensions.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="TestAggregates.cs" /> - <Compile Include="TestCategories.cs" /> - <Compile Include="TestEarlyEvaluation.cs" /> - <Compile Include="TestNoNewlineTemplates.cs" /> - <Compile Include="TestTemplateNames.cs" /> - <Compile Include="TestTemplateRawGroupDirectory.cs" /> - <Compile Include="TestVisualizer.cs" /> - </ItemGroup> - <ItemGroup> - <Compile Include="BaseTest.cs" /> - <Compile Include="ErrorBufferAllErrors.cs" /> - <Compile Include="TestCompiler.cs" /> - <Compile Include="TestCoreBasics.cs" /> - <Compile Include="TestDebugEvents.cs" /> - <Compile Include="TestDictionaries.cs" /> - <Compile Include="TestDollarDelimiters.cs" /> - <Compile Include="TestFunctions.cs" /> - <Compile Include="TestGroups.cs" /> - <Compile Include="TestGroupSyntax.cs" /> - <Compile Include="TestGroupSyntaxErrors.cs" /> - <Compile Include="TestImports.cs" /> - <Compile Include="TestIndentation.cs" /> - <Compile Include="TestIndirectionAndEarlyEval.cs" /> - <Compile Include="TestInterptimeErrors.cs" /> - <Compile Include="TestLexer.cs" /> - <Compile Include="TestLineWrap.cs" /> - <Compile Include="TestLists.cs" /> - <Compile Include="TestModelAdaptors.cs" /> - <Compile Include="TestNullAndEmptyValues.cs" /> - <Compile Include="TestOptions.cs" /> - <Compile Include="TestRegions.cs" /> - <Compile Include="TestRenderers.cs" /> - <Compile Include="TestScopes.cs" /> - <Compile Include="TestSubtemplates.cs" /> - <Compile Include="TestSyntaxErrors.cs" /> - <Compile Include="TestTokensForDollarDelimiters.cs" /> - <Compile Include="TestWhitespace.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="Antlr4.Test.StringTemplate.netstandard.project.json" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj"> - <Project>{7e0e3f5c-54d4-49b5-beef-8c3d364a8061}</Project> - <Name>Antlr4.StringTemplate.netstandard</Name> - </ProjectReference> - <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj"> - <Project>{ac2c28ab-d93a-41e3-85a6-5ecb08cae5c3}</Project> - <Name>Antlr3.Runtime.netstandard</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json deleted file mode 100644 index aba507a..0000000 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "dependencies": { - "NETStandard.Library": "1.6.0" - }, - - "frameworks": { - "net46": { - } - }, - - "runtimes": { - "win": { - } - } -} diff --git a/Antlr4.Test.StringTemplate/BaseTest.cs b/Antlr4.Test.StringTemplate/BaseTest.cs index af35420..c3529fe 100644 --- a/Antlr4.Test.StringTemplate/BaseTest.cs +++ b/Antlr4.Test.StringTemplate/BaseTest.cs @@ -1,222 +1,229 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using Antlr.Runtime; using Antlr4.StringTemplate; using Antlr4.StringTemplate.Compiler; using Microsoft.VisualStudio.TestTools.UnitTesting; using ArgumentException = System.ArgumentException; using CultureInfo = System.Globalization.CultureInfo; using DateTime = System.DateTime; using Directory = System.IO.Directory; using Environment = System.Environment; using File = System.IO.File; using Path = System.IO.Path; using StringBuilder = System.Text.StringBuilder; +#if !NETSTANDARD using Thread = System.Threading.Thread; +#endif [TestClass] public abstract class BaseTest { public static string tmpdir; public static readonly string newline = Environment.NewLine; public TestContext TestContext { get; set; } [TestInitialize] public void setUp() { setUpImpl(); } protected virtual void setUpImpl() { - Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-us"); + // Ideally we wanted en-US, but invariant provides a suitable default for testing. +#if NETSTANDARD + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; +#else + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; +#endif TemplateGroup.DefaultGroup = new TemplateGroup(); TemplateCompiler.subtemplateCount = 0; // new output dir for each test tmpdir = Path.GetFullPath(Path.Combine(Path.GetTempPath(), "st4-" + currentTimeMillis())); } [TestCleanup] public void tearDown() { // Remove tmpdir if no error. how? if (TestContext != null && TestContext.CurrentTestOutcome == UnitTestOutcome.Passed) eraseTempDir(); } protected virtual void eraseTempDir() { if (Directory.Exists(tmpdir)) Directory.Delete(tmpdir, true); } public static long currentTimeMillis() { return DateTime.Now.ToFileTime() / 10000; } public static void writeFile(string dir, string fileName, string content) { if (Path.IsPathRooted(fileName)) throw new ArgumentException(); string fullPath = Path.GetFullPath(Path.Combine(dir, fileName)); dir = Path.GetDirectoryName(fullPath); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); File.WriteAllText(fullPath, content); } public void checkTokens(string template, string expected) { checkTokens(template, expected, '<', '>'); } public void checkTokens(string template, string expected, char delimiterStartChar, char delimiterStopChar) { TemplateLexer lexer = new TemplateLexer(TemplateGroup.DefaultErrorManager, new ANTLRStringStream(template), null, delimiterStartChar, delimiterStopChar); CommonTokenStream tokens = new CommonTokenStream(lexer); StringBuilder buf = new StringBuilder(); buf.Append("["); int i = 1; IToken t = tokens.LT(i); while (t.Type != CharStreamConstants.EndOfFile) { if (i > 1) buf.Append(", "); buf.Append(t); i++; t = tokens.LT(i); } buf.Append("]"); string result = buf.ToString(); Assert.AreEqual(expected, result); } public class User { public int id; public string name; public static string StaticField = "field_value"; public User(int id, string name) { this.id = id; this.name = name; } public virtual bool IsManager { get { return true; } } public virtual bool HasParkingSpot { get { return true; } } public virtual string Name { get { return name; } } public static string GetStaticMethod() { return "method_result"; } public static string StaticProperty { get { return "property_result"; } } } public class HashableUser : User { public HashableUser(int id, string name) : base(id, name) { } public override int GetHashCode() { return id; } public override bool Equals(object o) { HashableUser hu = o as HashableUser; if (hu != null) return this.id == hu.id && string.Equals(this.name, hu.name); return false; } } #if false public static string getRandomDir() { string randomDir = tmpdir + "dir" + String.valueOf((int)(Math.random() * 100000)); File f = new File(randomDir); f.mkdirs(); return randomDir; } #endif } } diff --git a/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs index 81d2682..62484c9 100644 --- a/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs @@ -1,69 +1,45 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Antlr4.Test.StringTemplate")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] -[assembly: AssemblyProduct("Antlr4.Test.StringTemplate")] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b9f5baf7-993e-434d-a217-1c8a4e2337a9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("4.0.6.9004")] -[assembly: AssemblyFileVersion("4.0.6.9004")] -[assembly: AssemblyInformationalVersion("4.0.6.9004-dev")] diff --git a/Antlr4.Test.StringTemplate/TestRenderers.cs b/Antlr4.Test.StringTemplate/TestRenderers.cs index 0e9edaf..68ef39a 100644 --- a/Antlr4.Test.StringTemplate/TestRenderers.cs +++ b/Antlr4.Test.StringTemplate/TestRenderers.cs @@ -1,390 +1,390 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using System.Collections.Generic; using Antlr4.StringTemplate; using Microsoft.VisualStudio.TestTools.UnitTesting; using CultureInfo = System.Globalization.CultureInfo; using DateTime = System.DateTime; using DateTimeOffset = System.DateTimeOffset; using Path = System.IO.Path; [TestClass] public class TestRenderers : BaseTest { [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererForGroup() { string templates = "dateThing(created) ::= \"datetime: <created>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); - string expecting = "datetime: 7/5/2005 12:00 AM"; + string expecting = "datetime: 07/05/2005 00:00"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithFormat() { string templates = "dateThing(created) ::= << date: <created; format=\"yyyy.MM.dd\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: 2005.07.05 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat() { string templates = "dateThing(created) ::= << datetime: <created; format=\"short\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); - string expecting = " datetime: 7/5/2005 12:00 AM "; + string expecting = " datetime: 07/05/2005 00:00 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat2() { string templates = "dateThing(created) ::= << datetime: <created; format=\"full\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); - string expecting = " datetime: Tuesday, July 5, 2005 12:00:00 AM "; + string expecting = " datetime: Tuesday, 05 July 2005 00:00:00 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat3() { string templates = "dateThing(created) ::= << date: <created; format=\"date:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: Jul 5, 2005 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat4() { string templates = "dateThing(created) ::= << time: <created; format=\"time:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " time: 12:00:00 AM "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithPrintfFormat() { string templates = "foo(x) ::= << <x; format=\"{0,6}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndList() { string template = "The names: <names; format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TERTOMSRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparator() { string template = "The names: <names; separator=\" and \", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TER and TOM and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparatorAndNull() { string template = "The names: <names; separator=\" and \", null=\"n/a\", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); List<string> names = new List<string>(); names.Add("ter"); names.Add(null); names.Add("sriram"); st.Add("names", names); string expecting = "The names: TER and N/A and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithTemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <(t()); format=\"cap\"> >>\n" + "t() ::= <<ack>>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithSubtemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <({ack}); format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap_emptyValue() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", ""); string expecting = " ";//FIXME: why not two spaces? string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_url_encode() { string templates = "foo(x) ::= << <x; format=\"url-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a b"); string expecting = " a+b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a<b> &\t\b"); string expecting = " a&lt;b&gt; &amp;\t\b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode_null() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", null); string expecting = " "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestNumberRendererWithPrintfFormat() { //string templates = "foo(x,y) ::= << <x; format=\"%d\"> <y; format=\"%2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); string expecting = " -2100 3.142 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestInstanceofRenderer() { string templates = "numberThing(x,y,z) ::= \"numbers: <x>, <y>; <z>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("numberThing"); st.Add("x", -2100); st.Add("y", 3.14159); st.Add("z", "hi"); string expecting = "numbers: -2100, 3.14159; hi"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestLocaleWithNumberRenderer() { //string templates = "foo(x,y) ::= << <x; format=\"%,d\"> <y; format=\"%,2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0:#,#}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); // Polish uses ' ' (ASCII 160) for ',' and ',' for '.' string expecting = " -2 100 3,142 "; // Ê string result = st.Render(new CultureInfo("pl")); Assert.AreEqual(expecting, result); } } } diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index c801869..aa519e5 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,190 +1,147 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Runtime.Test</RootNamespace> - <AssemblyName>Antlr3.Runtime.Test</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> + <TargetFrameworks>net45</TargetFrameworks> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> </PropertyGroup> + <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> + <ItemGroup> - <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - <Reference Include="System.Numerics" /> + <PackageReference Include="MSTest.TestAdapter" Version="1.1.18" /> + <PackageReference Include="MSTest.TestFramework" Version="1.1.18" /> </ItemGroup> + <ItemGroup> - <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj"> - <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> - <Name>Antlr3.StringTemplate.net35-client</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> - <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug.net20</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj"> - <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> - <Name>Antlr3.Runtime.JavaExtensions.net35-client</Name> - </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - </ProjectReference> + <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj" /> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj" /> </ItemGroup> + <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> + + <ItemGroup> + <Compile Remove="BuildOptions\DebugGrammarLexer.cs" /> + <Compile Remove="BuildOptions\DebugGrammarParser.cs" /> + <Compile Remove="BuildOptions\DebugTreeGrammar.cs" /> + <Compile Remove="BuildOptions\ProfileGrammarLexer.cs" /> + <Compile Remove="BuildOptions\ProfileGrammarParser.cs" /> + <Compile Remove="BuildOptions\ProfileTreeGrammar.cs" /> + </ItemGroup> + <ItemGroup> - <Compile Include="Composition\Program.cs" /> - <Compile Include="PreprocessorLexer.g3.cs"> + <Compile Update="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> - <Compile Include="PreprocessorTests.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> + <Compile Update="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> - <Compile Include="SemanticPredicateReduction.g3.parser.cs"> + <Compile Update="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> - <Compile Include="SimpleExpressionLexerHelper.cs"> + <Compile Update="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> - <Compile Include="SimpleExpressionParserHelper.cs"> + <Compile Update="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> - <Compile Include="FastSimpleExpressionLexerHelper.cs"> + <Compile Update="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> - <Compile Include="FastSimpleExpressionParserHelper.cs"> + <Compile Update="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> - <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> + <Compile Update="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> - <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> + <Compile Update="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> - <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> + <Compile Update="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> - <Compile Include="SlimParsing\ITokenSource`1.cs" /> - <Compile Include="SlimParsing\ITokenStream`1.cs" /> - <Compile Include="SlimParsing\SlimLexer.cs" /> - <Compile Include="SlimParsing\SlimStringStream.cs" /> - <Compile Include="SlimParsing\SlimToken.cs" /> - <Compile Include="SlimParsing\SlimTokenStream.cs" /> - <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> - <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> - <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> - <Compile Include="StringTemplateOutput.g3.lexer.cs"> + <Compile Update="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> - <Compile Include="StringTemplateOutput.g3.parser.cs"> + <Compile Update="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> - <Compile Include="SynpredTreeParser.g3.cs"> + <Compile Update="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> - <Compile Include="TestActionFeatures.g3.lexer.cs"> + <Compile Update="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> - <Compile Include="TestActionFeatures.g3.parser.cs"> + <Compile Update="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> - <Compile Include="TestDotTreeGenerator.cs" /> - <Compile Include="TestExpressionFeatures.g3.lexer.cs"> + <Compile Update="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> - <Compile Include="TestExpressionFeatures.g3.parser.cs"> + <Compile Update="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> - <Compile Include="TestFastLexer.cs" /> </ItemGroup> + <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> + + <Compile Remove="BuildOptions\ProfileGrammarLexerHelper.cs" /> + <Compile Remove="BuildOptions\ProfileGrammarParserHelper.cs" /> </ItemGroup> + <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> + + <Compile Remove="BuildOptions\ProfileTreeGrammarHelper.cs" /> </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\..\build\Bootstrap</AntlrBuildTaskPath> - <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> - </PropertyGroup> - <Import Project="$(ProjectDir)..\..\build\Bootstrap\Antlr3.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Directory.Build.targets b/Runtime/Antlr3.Runtime.Test/Directory.Build.targets new file mode 100644 index 0000000..d3a6081 --- /dev/null +++ b/Runtime/Antlr3.Runtime.Test/Directory.Build.targets @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(MSBuildThisFileDirectory)..\..\build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(MSBuildThisFileDirectory)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + + <Import Project="$(MSBuildThisFileDirectory)..\..\build\Bootstrap\Antlr3.targets" /> + +</Project> diff --git a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs index 2c18c25..64dec9e 100644 --- a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs @@ -1,71 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Runtime.Test" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Pixel Mine, Inc." )] -[assembly: AssemblyProduct( "Antlr3.Runtime.Test" )] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1352b15b-eded-4380-9122-acde32f7ff38" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - * 3. Revision is the Perforce changelist number associated with the release. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/appveyor.yml b/appveyor.yml index 5ec729b..39e224c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ version: 1.0.{build} os: Visual Studio 2017 configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: -- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\net40\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" -- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\netstandard\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" +- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\net45\Antlr4.Test.StringTemplate.dll" +- dotnet vstest /Framework:FrameworkCore10 /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\%CONFIGURATION%\netcoreapp1.0\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z
antlr/antlrcs
407a344523fa4bd1bf9492827156bc2dfd9b2982
Disable parallel builds until all the projects use the new project system
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 3582596..9fdd617 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,270 +1,270 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" $msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If (-not (Test-Path $msbuild)) { $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") exit 1 } If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 -&$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath +&$msbuild /nologo /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files -&$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath +&$msbuild /nologo /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
4b0ae50a1fcc01e1f149c0d79272fb69da0a423b
Convert the ANTLR 3 targets assembly projects to the new project system
diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj index 4fb23b6..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj @@ -1,66 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.ActionScript</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="ActionScriptTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs index 84e0913..57382c1 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.ActionScript" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.ActionScript" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "aa95e5e0-ddff-4ced-a130-69b0cd02f755" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj index 993e51e..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj +++ b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.C</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="CTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs index fc14cd3..6ceac4a 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.C" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.C" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "b8dcb19a-ffa0-4d55-8fd2-747d6c70c8ae" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj index d9737a6..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.CSharp2</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="CSharp2Target.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs index af54327..a8ff7e7 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.CSharp2" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.CSharp2" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "c30b57a2-68f1-44ec-b14b-3436d52a6233" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj index 83da090..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj @@ -1,72 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{67012F41-94F9-48E6-9677-E3C56E42917F}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.CSharp3</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <DelaySign>false</DelaySign> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="CSharp3Target.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs index 8d99fd4..3933f0d 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Target.CSharp3" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Target.CSharp3" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "efdd8135-be27-45be-8fd2-9070ff9df797" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj index 7734415..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{46171154-755A-4595-99AA-537D684BCA28}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Cpp</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="CPPTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs index b3baec6..e7d0d49 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Cpp" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Cpp" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "8e891174-fb0e-45c6-953d-d847b757bcc9" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj index 79158a4..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj @@ -1,66 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{6689F268-CE30-4CEC-AAD5-2DF72C43623C}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Delphi</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="DelphiTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs index 3a9de5e..a364f20 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Delphi" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Delphi" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "0987d253-96de-4d56-9387-dc6f4293a374" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj index 64a383c..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj @@ -1,66 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{696F611F-003B-477D-AFA0-4F15478C9D32}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Java</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="JavaTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs index d7d294d..b665bf3 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Java" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Java" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "2388a4ff-439f-48b3-80fd-364f7bccfb9d" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj index 12465c9..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj @@ -1,66 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{1551D1E7-D515-4488-A889-5DEBB4950880}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.JavaScript</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="JavaScriptTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs index 0305d7e..5209c77 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.JavaScript" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.JavaScript" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "4fbc2549-85b3-43fa-8994-cb4ac111a33c" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj index 059a1c4..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{8EFEA650-B9F6-498B-8865-A78103CCB590}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.ObjC</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="ObjCTarget.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs index c0423c3..e6f333d 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.ObjC" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.ObjC" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a8b15bc5-58a3-49d3-982d-051730d2bd79" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj index 3bed604..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj @@ -1,66 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{9444ACEF-784D-47B0-B317-F374782FA511}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Perl5</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Perl5Target.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs index 07581ee..c7552e5 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Perl5" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Perl5" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "3d2be877-baf6-4b83-961a-b91aed7b8258" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj index f53651d..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Python</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="PythonTarget.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs index 7e79304..aa5f1f8 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Python" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Python" )] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj index e55aafc..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Python3</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Python3Target.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> - <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime.net20</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs index 7e79304..aa5f1f8 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Python" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Python" )] -[assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj index 2954138..d2086db 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj @@ -1,71 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Antlr3.Targets</RootNamespace> - <AssemblyName>Antlr3.Targets.Ruby</AssemblyName> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <TargetFrameworks>net35-client</TargetFrameworks> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\bin\Debug\Targets\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>..\..\bin\Release\Targets\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core"> - <RequiredTargetFramework>3.5</RequiredTargetFramework> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="RubyTarget.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> - <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3.net35-client</Name> - <Private>False</Private> - </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> - <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate.net35-client</Name> - <Private>False</Private> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="..\..\..\..\..\keys\antlr\Key.snk"> - <Link>Key.snk</Link> - </None> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> + </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs index acc1f04..41adbff 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs @@ -1,70 +1,44 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; -using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle( "Antlr3.Targets.Ruby" )] -[assembly: AssemblyDescription( "" )] -[assembly: AssemblyConfiguration( "" )] -[assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] -[assembly: AssemblyProduct( "Antlr3.Targets.Ruby" )] -[assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] -[assembly: AssemblyTrademark( "" )] -[assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9471023a-b241-4aed-a706-c8e8fa621dbf" )] - -/* Version information for an assembly consists of four values in the following order: - * - * Major.Minor.Build.Revision - * - * These values are updated according to the following: - * 1. Major.Minor follows the ANTLR release schedule - * 2. Build is incremented each time the C# port is packaged for release (regardless - * of whether it's an incremental or nightly). The value resets to zero whenever - * the Major or Minor version is incremented. - */ -[assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.2.0")] -[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Directory.Build.props b/Antlr3.Targets/Directory.Build.props new file mode 100644 index 0000000..4c3aa83 --- /dev/null +++ b/Antlr3.Targets/Directory.Build.props @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <PropertyGroup> + <RootNamespace>Antlr3.Targets</RootNamespace> + + <Description>The C# port of ANTLR 3</Description> + <Company>Tunnel Vision Laboratories, LLC</Company> + <Copyright>Copyright © Sam Harwell 2011</Copyright> + <Version>3.5.0.2</Version> + <FileVersion>3.5.2.0</FileVersion> + <InformationalVersion>3.5.2-dev</InformationalVersion> + + <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)\Targets\</OutputPath> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + + <Choose> + <When Condition="'$(TargetFramework)' == 'net35-client'"> + <PropertyGroup> + <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + </PropertyGroup> + </When> + </Choose> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <DebugType>full</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <DebugType>pdbonly</DebugType> + <DebugSymbols>true</DebugSymbols> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> + <Private>false</Private> + </ProjectReference> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr3\Antlr3.net35-client.csproj"> + <Private>false</Private> + </ProjectReference> + <ProjectReference Include="$(MSBuildThisFileDirectory)..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> + <Private>false</Private> + </ProjectReference> + </ItemGroup> + +</Project> diff --git a/Antlr3.Targets/Directory.Build.targets b/Antlr3.Targets/Directory.Build.targets new file mode 100644 index 0000000..368e02e --- /dev/null +++ b/Antlr3.Targets/Directory.Build.targets @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + + <ItemGroup> + <None Include="$(AssemblyOriginatorKeyFile)" Link="%(Filename)%(Extension)" /> + </ItemGroup> + + <Target Name="RemoveTransitiveProjectReferences" AfterTargets="IncludeTransitiveProjectReferences"> + <ItemGroup> + <ProjectReference Remove="@(_TransitiveProjectReferences)" /> + </ItemGroup> + </Target> + +</Project> diff --git a/Antlr3.sln b/Antlr3.sln index b659479..c2f98b5 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,252 +1,259 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26724.1 +MinimumVisualStudioVersion = 15.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" + ProjectSection(SolutionItems) = preProject + Antlr3.Targets\Directory.Build.props = Antlr3.Targets\Directory.Build.props + Antlr3.Targets\Directory.Build.targets = Antlr3.Targets\Directory.Build.targets + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.netstandard", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.netstandard.csproj", "{0FB5C69A-F894-45DC-B775-5FC273D41460}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.ActiveCfg = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {46CE14C6-8A1E-4634-A720-69B2E14873EE} + EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml index 4f7d5b3..5ec729b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ version: 1.0.{build} -os: Visual Studio 2015 +os: Visual Studio 2017 configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: - vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\net40\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" - vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\netstandard\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 4c15f00..3582596 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,265 +1,270 @@ param ( [switch]$Debug, - [string]$VisualStudioVersion = '14.0', + [string]$VisualStudioVersion = '15.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project -$msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" +$visualStudio = (Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7')."$VisualStudioVersion" +$msbuild = "$visualStudio\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" +If (-not (Test-Path $msbuild)) { + $host.UI.WriteErrorLine("Couldn't find MSBuild.exe") + exit 1 +} If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self -.\NuGet.exe restore $SolutionPath +.\NuGet.exe restore $SolutionPath -Project2ProjectTimeOut 1200 &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" $STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
3acad6935288855bb9d309007e373a200dee118e
Prepare for next StringTemplate 4 development iteration
diff --git a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs index a8cde08..3b881bb 100644 --- a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs @@ -1,88 +1,88 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.8.0")] -[assembly: AssemblyInformationalVersion("4.0.8")] +[assembly: AssemblyFileVersion("4.0.9.0")] +[assembly: AssemblyInformationalVersion("4.0.9-dev")] diff --git a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs index cf8c428..88f6d3c 100644 --- a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Labs, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a4b023e1-07a4-48c5-b095-1e1beb854b3d")] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.8.0")] -[assembly: AssemblyInformationalVersion("4.0.8")] +[assembly: AssemblyFileVersion("4.0.9.0")] +[assembly: AssemblyInformationalVersion("4.0.9-dev")] diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 2f34ead..4c15f00 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,265 +1,265 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '14.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.2-dev" -$STVersion = "4.0.8" +$STVersion = "4.0.9-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
37b85c59a7e855911bcb5da57cb73f8b6a8d6b9c
Prepare for next ANTLR development iteration
diff --git a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs index 5014b35..7320ac9 100644 --- a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs @@ -1,88 +1,88 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr3.Runtime.Visualizer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr3.Runtime.Visualizer")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs index b4e5378..4afb444 100644 --- a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.StringTemplate" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.StringTemplate" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a4b023e1-07a4-48c5-b095-1e1beb854b3d" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs index 28ba9c8..84e0913 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.ActionScript" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.ActionScript" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "aa95e5e0-ddff-4ced-a130-69b0cd02f755" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs index 1a38a4f..fc14cd3 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.C" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.C" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "b8dcb19a-ffa0-4d55-8fd2-747d6c70c8ae" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs index c85bf09..af54327 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.CSharp2" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.CSharp2" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "c30b57a2-68f1-44ec-b14b-3436d52a6233" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs index 388e79f..8d99fd4 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Target.CSharp3" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Target.CSharp3" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "efdd8135-be27-45be-8fd2-9070ff9df797" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs index e175c99..b3baec6 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Cpp" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Cpp" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "8e891174-fb0e-45c6-953d-d847b757bcc9" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs index e9156f5..3a9de5e 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Delphi" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Delphi" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "0987d253-96de-4d56-9387-dc6f4293a374" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs index 0f8221c..d7d294d 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Java" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Java" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "2388a4ff-439f-48b3-80fd-364f7bccfb9d" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs index b9704ac..0305d7e 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.JavaScript" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.JavaScript" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "4fbc2549-85b3-43fa-8994-cb4ac111a33c" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs index e69a9c6..c0423c3 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.ObjC" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.ObjC" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a8b15bc5-58a3-49d3-982d-051730d2bd79" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs index 086c38f..07581ee 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Perl5" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Perl5" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "3d2be877-baf6-4b83-961a-b91aed7b8258" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs index 43409cc..7e79304 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Python" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Python" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs index 43409cc..7e79304 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Python" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Python" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs index f128b4d..acc1f04 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Ruby" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Ruby" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9471023a-b241-4aed-a706-c8e8fa621dbf" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3.Test/Properties/AssemblyInfo.cs b/Antlr3.Test/Properties/AssemblyInfo.cs index 953cc6d..d094520 100644 --- a/Antlr3.Test/Properties/AssemblyInfo.cs +++ b/Antlr3.Test/Properties/AssemblyInfo.cs @@ -1,68 +1,68 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "AntlrUnitTests" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Pixel Mine, Inc." )] [assembly: AssemblyProduct( "AntlrUnitTests" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] // Setting ComVisible to false makes the types in this assembly not visible // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a0f4c939-114e-4512-8eb1-fad6056493aa" )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Antlr3/Properties/AssemblyInfo.cs b/Antlr3/Properties/AssemblyInfo.cs index 398d381..9e126ff 100644 --- a/Antlr3/Properties/AssemblyInfo.cs +++ b/Antlr3/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1f192196-5fb0-4eea-91a1-e9249dd45317" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/AntlrBuildTask/Properties/AssemblyInfo.cs b/AntlrBuildTask/Properties/AssemblyInfo.cs index 9f0158c..39b3460 100644 --- a/AntlrBuildTask/Properties/AssemblyInfo.cs +++ b/AntlrBuildTask/Properties/AssemblyInfo.cs @@ -1,71 +1,71 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("AntlrBuildTask")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("AntlrBuildTask")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("2028affe-3dfd-4164-9faf-2959ec04f7f7")] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs index 1e7ad50..a089872 100644 --- a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs @@ -1,71 +1,71 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.Debug" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime.Debug" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9f8fa018-6766-404c-9e72-551407e1b173" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs index 5fb76ce..9ca84cb 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.JavaExtensions" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime.JavaExtensions" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "ad48c7f7-0b1d-4b1e-9602-83425cb5699f" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs index aa4d567..2c18c25 100644 --- a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs @@ -1,71 +1,71 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.Test" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Pixel Mine, Inc." )] [assembly: AssemblyProduct( "Antlr3.Runtime.Test" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1352b15b-eded-4380-9122-acde32f7ff38" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs index 6cf801c..e8d624b 100644 --- a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs @@ -1,78 +1,78 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Security; #if !PORTABLE using System.Runtime.InteropServices; #endif // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] [assembly: AllowPartiallyTrustedCallers] #if !PORTABLE // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "7a0b4db7-f127-4cf5-ac2c-e294957efcd6" )] #endif /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.1.0")] -[assembly: AssemblyInformationalVersion("3.5.1")] +[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyInformationalVersion("3.5.2-dev")] diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 7dc9c7a..2f34ead 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,265 +1,265 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '14.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages -$AntlrVersion = "3.5.1" +$AntlrVersion = "3.5.2-dev" $STVersion = "4.0.8" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
22eecc51046ccc4e03f6e7468ed5e1970dc71d19
Provide explicit dependencies for all supported frameworks
diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 7da969c..597f33a 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,48 +1,51 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> + <group targetFramework="net20" /> + <group targetFramework="net40-client" /> + <group targetFramework="portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1" /> <group targetFramework="netstandard1.1"> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
bd59131d9ecf1766cecb66fe2d6ed136183b947d
Avoid requiring a binding redirect for StringTemplate 4 patch release
diff --git a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs index e039bf7..e279409 100644 --- a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs @@ -1,88 +1,88 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.8.0")] +[assembly: AssemblyVersion("4.0.7.0")] [assembly: AssemblyFileVersion("4.0.8.0")] [assembly: AssemblyInformationalVersion("4.0.8.0-dev")] diff --git a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs index 48870b9..d6cba35 100644 --- a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs @@ -1,70 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Labs, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a4b023e1-07a4-48c5-b095-1e1beb854b3d")] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ -[assembly: AssemblyVersion("4.0.8.0")] +[assembly: AssemblyVersion("4.0.7.0")] [assembly: AssemblyFileVersion("4.0.8.0")] [assembly: AssemblyInformationalVersion("4.0.8.0-dev")]
antlr/antlrcs
4f09e39a192cd5a3a3f9d2c360efca065392685c
Use the assembly informational version where possible
diff --git a/Antlr3/AntlrTool.cs b/Antlr3/AntlrTool.cs index f9d88f7..6d8fad8 100644 --- a/Antlr3/AntlrTool.cs +++ b/Antlr3/AntlrTool.cs @@ -1,1448 +1,1460 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3 { using System; using System.Collections.Generic; using System.Linq; + using System.Reflection; using Antlr3.Analysis; using Antlr3.Codegen; using Antlr3.Misc; using Antlr3.Tool; using File = System.IO.File; using FileInfo = System.IO.FileInfo; using IOException = System.IO.IOException; using Path = System.IO.Path; using Stats = Antlr.Runtime.Misc.Stats; using Stopwatch = System.Diagnostics.Stopwatch; using StringReader = System.IO.StringReader; using StringWriter = System.IO.StringWriter; using TextWriter = System.IO.TextWriter; public class AntlrTool { public const string UninitializedDir = "<unset-dir>"; private IList<string> grammarFileNames = new List<string>(); private List<string> generatedFiles = new List<string>(); private bool generate_NFA_dot = false; private bool generate_DFA_dot = false; private bool _generateDgmlGraphs = false; private string outputDirectory = "."; private bool haveOutputDir = false; private string inputDirectory; private string parentGrammarDirectory; private string grammarOutputDirectory; private bool haveInputDir = false; private string libDirectory = "."; private bool debug = false; private bool trace = false; private bool profile = false; private bool report = false; private bool printGrammar = false; private bool depend = false; private bool forceAllFilesToOutputDir = false; private bool forceRelativeOutput = false; private bool deleteTempLexer = true; private bool verbose = false; /** Don't process grammar file if generated files are newer than grammar */ private bool make = false; private bool showBanner = true; // true when we are in a unit test private bool testMode = false; private bool _showTimer = false; private static bool exitNow = false; internal static bool EnableTemplateCache = false; // The internal options are for my use on the command line during dev // public static bool internalOption_PrintGrammarTree = false; public static bool internalOption_PrintDFA = false; public static bool internalOption_ShowNFAConfigsInDFA = false; public static bool internalOption_watchNFAConversion = false; readonly string[] GrammarExtensions = { ".g", ".g3" }; [STAThread] public static void Main( string[] args ) { if (args.Contains("-Xcachetemplates")) EnableTemplateCache = true; bool repeat = false; if (args.Contains("-Xrepeat")) repeat = true; for (int i = 0; i < (repeat ? 2 : 1); i++) { if (i == 1) Console.In.ReadLine(); AntlrTool antlr = new AntlrTool(args); if (!exitNow) { antlr.Process(); Environment.ExitCode = (ErrorManager.GetNumErrors() > 0) ? 1 : 0; } } } static AntlrTool() { ToolPathRoot = Path.GetDirectoryName(typeof(CodeGenerator).Assembly.Location); } public AntlrTool() : this((string)null) { } public AntlrTool(string toolPathRoot) { if (!string.IsNullOrEmpty(toolPathRoot)) ToolPathRoot = toolPathRoot; TargetsDirectory = Path.Combine(ToolPathRoot, @"Targets"); TemplatesDirectory = Path.Combine(Path.Combine(ToolPathRoot, @"Codegen"), "Templates"); ErrorManager.Initialize(); } public AntlrTool( string[] args ) : this() { ProcessArgs( args ); } public static Version AssemblyVersion { get { var assembly = typeof(AntlrTool).Assembly; return assembly.GetName().Version; } } + public static string AssemblyInformationalVersion + { + get + { + var assembly = typeof(AntlrTool).Assembly; + var attributes = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), true); + var informationalVersion = attributes.OfType<AssemblyInformationalVersionAttribute>().FirstOrDefault(); + return informationalVersion?.InformationalVersion ?? AssemblyVersion.ToString(4); + } + } + public static string ToolPathRoot { get; set; } public string TargetsDirectory { get; set; } public string TemplatesDirectory { get; set; } public string ForcedLanguageOption { get; set; } public virtual void ProcessArgs(string[] args) { if (verbose) { - ErrorManager.Info("ANTLR Parser Generator Version " + AssemblyVersion.ToString(4)); + ErrorManager.Info("ANTLR Parser Generator Version " + AssemblyInformationalVersion); showBanner = false; } if (args == null || args.Length == 0) { Help(); return; } for (int i = 0; i < args.Length; i++) { switch (args[i]) { case "-o": case "-fo": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing output directory with -fo/-o option; ignoring"); } else { if (args[i] == "-fo") ForceAllFilesToOutputDir = true; i++; outputDirectory = args[i]; if (outputDirectory.LastIndexOfAny(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }) == outputDirectory.Length - 1) outputDirectory = outputDirectory.Substring(0, OutputDirectory.Length - 1); haveOutputDir = true; if (System.IO.File.Exists(outputDirectory)) { ErrorManager.Error(ErrorManager.MSG_OUTPUT_DIR_IS_FILE, outputDirectory); LibraryDirectory = "."; } } break; case "-lib": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing library directory with -lib option; ignoring"); } else { i++; LibraryDirectory = args[i]; if (LibraryDirectory.LastIndexOfAny(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }) == LibraryDirectory.Length - 1) { LibraryDirectory = LibraryDirectory.Substring(0, LibraryDirectory.Length - 1); } if (!System.IO.Directory.Exists(libDirectory)) { ErrorManager.Error(ErrorManager.MSG_DIR_NOT_FOUND, LibraryDirectory); LibraryDirectory = "."; } } break; case "-language": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing language name; ignoring"); } else { i++; ForcedLanguageOption = args[i]; } break; case "-nfa": Generate_NFA_dot = true; break; case "-dfa": Generate_DFA_dot = true; break; case "-dgml": GenerateDgmlGraphs = true; break; case "-debug": Debug = true; break; case "-trace": Trace = true; break; case "-report": Report = true; break; case "-profile": Profile = true; break; case "-print": PrintGrammar = true; break; case "-depend": Depend = true; break; case "-testmode": TestMode = true; break; case "-verbose": Verbose = true; break; case "-version": Version(); exitNow = true; break; case "-make": Make = true; break; case "-message-format": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing output format with -message-format option; using default"); } else { i++; ErrorManager.SetFormat(args[i]); } break; case "-Xgrtree": internalOption_PrintGrammarTree = true; break; case "-Xdfa": internalOption_PrintDFA = true; break; case "-Xnoprune": DFAOptimizer.PRUNE_EBNF_EXIT_BRANCHES = false; break; case "-Xnocollapse": DFAOptimizer.COLLAPSE_ALL_PARALLEL_EDGES = false; break; case "-Xdbgconversion": NFAToDFAConverter.debug = true; break; case "-Xmultithreaded": //NFAToDFAConverter.SINGLE_THREADED_NFA_CONVERSION = false; Console.Error.WriteLine("Multithreaded NFA conversion is not currently supported."); break; case "-Xnomergestopstates": DFAOptimizer.MergeStopStates = false; break; case "-Xdfaverbose": internalOption_ShowNFAConfigsInDFA = true; break; case "-Xwatchconversion": internalOption_watchNFAConversion = true; break; #if DEBUG case "-XdbgST": CodeGenerator.LaunchTemplateInspector = true; break; #endif case "-Xmaxinlinedfastates": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max inline dfa states -Xmaxinlinedfastates option; ignoring"); } else { i++; CodeGenerator.MaxAcyclicDfaStatesInline = int.Parse(args[i]); } break; case "-Xmaxswitchcaselabels": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max switch case labels -Xmaxswitchcaselabels option; ignoring"); } else { i++; int value; if (int.TryParse(args[i], out value)) CodeGenerator.MaxSwitchCaseLabels = value; else Console.Error.WriteLine(string.Format("invalid value '{0}' for max switch case labels -Xmaxswitchcaselabels option; ignoring", args[i])); } break; case "-Xminswitchalts": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing min switch alternatives -Xminswitchalts option; ignoring"); } else { i++; int value; if (int.TryParse(args[i], out value)) CodeGenerator.MinSwitchAlts = value; else Console.Error.WriteLine(string.Format("invalid value '{0}' for min switch alternatives -Xminswitchalts option; ignoring", args[i])); } break; case "-Xm": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max recursion with -Xm option; ignoring"); } else { i++; NFAContext.MAX_SAME_RULE_INVOCATIONS_PER_NFA_CONFIG_STACK = int.Parse(args[i]); } break; case "-Xmaxdfaedges": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max number of edges with -Xmaxdfaedges option; ignoring"); } else { i++; DFA.MAX_STATE_TRANSITIONS_FOR_TABLE = int.Parse(args[i]); } break; case "-Xconversiontimeout": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max time in ms -Xconversiontimeout option; ignoring"); } else { i++; DFA.MAX_TIME_PER_DFA_CREATION = TimeSpan.FromMilliseconds(int.Parse(args[i])); } break; case "-Xnfastates": DecisionProbe.verbose = true; break; case "-Xsavelexer": deleteTempLexer = false; break; case "-Xtimer": _showTimer = true; break; case "-Xcachetemplates": EnableTemplateCache = true; break; case "-Xrepeat": break; case "-X": ExtendedHelp(); break; default: if (args[i][0] != '-') { // Must be the grammar file AddGrammarFile(args[i]); } break; } } } #if false protected virtual void CheckForInvalidArguments( string[] args, Antlr.Runtime.BitSet cmdLineArgValid ) { // check for invalid command line args for ( int a = 0; a < args.Length; a++ ) { if ( !cmdLineArgValid.Member( a ) ) { Console.Error.WriteLine( "invalid command-line argument: " + args[a] + "; ignored" ); } } } #endif /** * Checks to see if the list of outputFiles all exist, and have * last-modified timestamps which are later than the last-modified * timestamp of all the grammar files involved in build the output * (imports must be checked). If these conditions hold, the method * returns false, otherwise, it returns true. * * @param grammarFileName The grammar file we are checking * @param outputFiles * @return */ public virtual bool BuildRequired( string grammarFileName ) { BuildDependencyGenerator bd = new BuildDependencyGenerator( this, grammarFileName ); IList<string> outputFiles = bd.GetGeneratedFileList(); IList<string> inputFiles = bd.GetDependenciesFileList(); DateTime grammarLastModified = File.GetLastWriteTime( grammarFileName ); foreach ( string outputFile in outputFiles ) { if ( !File.Exists( outputFile ) || grammarLastModified > File.GetLastWriteTime( outputFile ) ) { // One of the output files does not exist or is out of date, so we must build it if (Verbose) { if (!File.Exists(outputFile)) Console.Out.WriteLine("Output file " + outputFile + " does not exist: must build " + grammarFileName); else Console.Out.WriteLine("Output file " + outputFile + " is not up-to-date: must build " + grammarFileName); } return true; } // Check all of the imported grammars and see if any of these are younger // than any of the output files. if ( inputFiles != null ) { foreach ( string inputFile in inputFiles ) { if ( File.GetLastWriteTime( inputFile ) > File.GetLastWriteTime( outputFile ) ) { // One of the imported grammar files has been updated so we must build if (Verbose) Console.Out.WriteLine("Input file " + inputFile + " is newer than output: must rebuild " + grammarFileName); return true; } } } } if ( Verbose ) { Console.Out.WriteLine( "Grammar " + grammarFileName + " is up to date - build skipped" ); } return false; } public virtual void Process() { bool exceptionWhenWritingLexerFile = false; string lexerGrammarFileName = null; // necessary at this scope to have access in the catch below Stopwatch timer = Stopwatch.StartNew(); // Have to be tricky here when Maven or build tools call in and must new Tool() // before setting options. The banner won't display that way! if ( Verbose && showBanner ) { - ErrorManager.Info( "ANTLR Parser Generator Version " + AssemblyVersion.ToString(4) ); + ErrorManager.Info( "ANTLR Parser Generator Version " + AssemblyInformationalVersion ); showBanner = false; } try { SortGrammarFiles(); // update grammarFileNames } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, e ); } foreach ( string grammarFileName in GrammarFileNames ) { // If we are in make mode (to support build tools like Maven) and the // file is already up to date, then we do not build it (and in verbose mode // we will say so). if ( Make ) { try { if ( !BuildRequired( grammarFileName ) ) continue; } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, e ); } } if ( Verbose && !Depend ) { Console.Out.WriteLine( grammarFileName ); } try { if ( Depend ) { BuildDependencyGenerator dep = new BuildDependencyGenerator( this, grammarFileName ); #if false IList<string> outputFiles = dep.getGeneratedFileList(); IList<string> dependents = dep.getDependenciesFileList(); Console.Out.WriteLine( "output: " + outputFiles ); Console.Out.WriteLine( "dependents: " + dependents ); #endif Console.Out.WriteLine( dep.GetDependencies().Render() ); continue; } Grammar rootGrammar = GetRootGrammar( grammarFileName ); // we now have all grammars read in as ASTs // (i.e., root and all delegates) rootGrammar.composite.AssignTokenTypes(); //rootGrammar.composite.TranslateLeftRecursiveRules(); rootGrammar.AddRulesForSyntacticPredicates(); rootGrammar.composite.DefineGrammarSymbols(); rootGrammar.composite.CreateNFAs(); GenerateRecognizer( rootGrammar ); if ( PrintGrammar ) { rootGrammar.PrintGrammar( Console.Out ); } if (Report) { GrammarReport2 greport = new GrammarReport2(rootGrammar); Console.WriteLine(greport.ToString()); } if ( Profile ) { GrammarReport report = new GrammarReport(rootGrammar); Stats.WriteReport( GrammarReport.GRAMMAR_STATS_FILENAME, report.ToNotifyString() ); } // now handle the lexer if one was created for a merged spec string lexerGrammarStr = rootGrammar.GetLexerGrammar(); //JSystem.@out.println("lexer grammar:\n"+lexerGrammarStr); if ( rootGrammar.type == GrammarType.Combined && lexerGrammarStr != null ) { lexerGrammarFileName = rootGrammar.ImplicitlyGeneratedLexerFileName; try { TextWriter w = GetOutputFile( rootGrammar, lexerGrammarFileName ); w.Write( lexerGrammarStr ); w.Close(); } catch (IOException) { // emit different error message when creating the implicit lexer fails // due to write permission error exceptionWhenWritingLexerFile = true; throw; } try { StringReader sr = new StringReader( lexerGrammarStr ); Grammar lexerGrammar = new Grammar(this); lexerGrammar.composite.WatchNFAConversion = internalOption_watchNFAConversion; lexerGrammar.implicitLexer = true; if ( TestMode ) lexerGrammar.DefaultRuleModifier = "public"; FileInfo lexerGrammarFullFile = new FileInfo( System.IO.Path.Combine( GetFileDirectory( lexerGrammarFileName ), lexerGrammarFileName ) ); lexerGrammar.FileName = lexerGrammarFullFile.ToString(); lexerGrammar.ImportTokenVocabulary( rootGrammar ); lexerGrammar.ParseAndBuildAST( sr ); sr.Close(); lexerGrammar.composite.AssignTokenTypes(); lexerGrammar.AddRulesForSyntacticPredicates(); lexerGrammar.composite.DefineGrammarSymbols(); lexerGrammar.composite.CreateNFAs(); GenerateRecognizer( lexerGrammar ); } finally { // make sure we clean up if ( deleteTempLexer ) { System.IO.DirectoryInfo outputDir = GetOutputDirectory( lexerGrammarFileName ); FileInfo outputFile = new FileInfo( System.IO.Path.Combine( outputDir.FullName, lexerGrammarFileName ) ); outputFile.Delete(); } } } } catch ( IOException e ) { if ( exceptionWhenWritingLexerFile ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, e ); } else { ErrorManager.Error( ErrorManager.MSG_CANNOT_OPEN_FILE, grammarFileName, e ); } } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, grammarFileName, e ); } #if false finally { Console.Out.WriteLine( "creates=" + Interval.creates ); Console.Out.WriteLine( "hits=" + Interval.hits ); Console.Out.WriteLine( "misses=" + Interval.misses ); Console.Out.WriteLine( "outOfRange=" + Interval.outOfRange ); } #endif } if (_showTimer) { Console.WriteLine("Total parse time: {0}ms", timer.ElapsedMilliseconds); } } public virtual void SortGrammarFiles() { //Console.Out.WriteLine( "Grammar names " + GrammarFileNames ); Graph<string> g = new Graph<string>(); foreach ( string gfile in GrammarFileNames ) { GrammarSpelunker grammar = new GrammarSpelunker( inputDirectory, gfile ); grammar.Parse(); string vocabName = grammar.TokenVocab; string grammarName = grammar.GrammarName; // Make all grammars depend on any tokenVocab options if ( vocabName != null ) g.AddEdge( gfile, vocabName + CodeGenerator.VocabFileExtension ); // Make all generated tokens files depend on their grammars g.AddEdge( grammarName + CodeGenerator.VocabFileExtension, gfile ); } List<string> sorted = g.Sort(); //Console.Out.WriteLine( "sorted=" + sorted ); GrammarFileNames.Clear(); // wipe so we can give new ordered list for ( int i = 0; i < sorted.Count; i++ ) { string f = (string)sorted[i]; if ( GrammarExtensions.Any( ext => f.EndsWith( ext, StringComparison.OrdinalIgnoreCase ) ) ) AddGrammarFile( f ); } //Console.Out.WriteLine( "new grammars=" + grammarFileNames ); } /** Get a grammar mentioned on the command-line and any delegates */ public virtual Grammar GetRootGrammar( string grammarFileName ) { //StringTemplate.setLintMode(true); // grammars mentioned on command line are either roots or single grammars. // create the necessary composite in case it's got delegates; even // single grammar needs it to get token types. CompositeGrammar composite = new CompositeGrammar(); Grammar grammar = new Grammar( this, grammarFileName, composite ); if ( TestMode ) grammar.DefaultRuleModifier = "public"; composite.SetDelegationRoot( grammar ); string f = null; if ( haveInputDir ) { f = Path.Combine( inputDirectory, grammarFileName ); } else { f = grammarFileName; } // Store the location of this grammar as if we import files, we can then // search for imports in the same location as the original grammar as well as in // the lib directory. // parentGrammarDirectory = Path.GetDirectoryName( f ); if ( grammarFileName.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) == -1 ) { grammarOutputDirectory = "."; } else { grammarOutputDirectory = grammarFileName.Substring( 0, grammarFileName.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) ); } StringReader reader = new StringReader( System.IO.File.ReadAllText( f ) ); grammar.ParseAndBuildAST( reader ); composite.WatchNFAConversion = internalOption_watchNFAConversion; return grammar; } /** Create NFA, DFA and generate code for grammar. * Create NFA for any delegates first. Once all NFA are created, * it's ok to create DFA, which must check for left-recursion. That check * is done by walking the full NFA, which therefore must be complete. * After all NFA, comes DFA conversion for root grammar then code gen for * root grammar. DFA and code gen for delegates comes next. */ protected virtual void GenerateRecognizer( Grammar grammar ) { string language = (string)grammar.GetOption( "language" ); if ( language != null ) { CodeGenerator generator = new CodeGenerator( this, grammar, language ); grammar.CodeGenerator = generator; generator.Debug = Debug; generator.Profile = Profile; generator.Trace = Trace; // generate NFA early in case of crash later (for debugging) if ( Generate_NFA_dot ) { GenerateNFAs( grammar ); } // GENERATE CODE generator.GenRecognizer(); if ( Generate_DFA_dot ) { GenerateDFAs( grammar ); } IList<Grammar> delegates = grammar.GetDirectDelegates(); for ( int i = 0; delegates != null && i < delegates.Count; i++ ) { Grammar @delegate = (Grammar)delegates[i]; if ( @delegate != grammar ) { // already processing this one GenerateRecognizer( @delegate ); } } } } public virtual void GenerateDFAs( Grammar g ) { for ( int d = 1; d <= g.NumberOfDecisions; d++ ) { DFA dfa = g.GetLookaheadDFA( d ); if ( dfa == null ) { continue; // not there for some reason, ignore } IGraphGenerator generator; if (GenerateDgmlGraphs) { generator = new DgmlGenerator(g); } else { generator = new DOTGenerator(g); } string graph = generator.GenerateGraph( dfa.StartState ); string graphFileName = g.name + "." + "dec-" + d; if ( g.implicitLexer ) { graphFileName = g.name + Grammar.grammarTypeToFileNameSuffix[(int)g.type] + "." + "dec-" + d; } try { WriteGraphFile( g, graphFileName, graph, generator.FileExtension ); } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_GEN_DOT_FILE, graphFileName, ioe ); } } } protected virtual void GenerateNFAs( Grammar g ) { IGraphGenerator generator = GenerateDgmlGraphs ? (IGraphGenerator)new DgmlGenerator(g) : new DOTGenerator(g); HashSet<Rule> rules = g.GetAllImportedRules(); rules.UnionWith( g.Rules ); foreach ( Rule r in rules ) { try { string dot = generator.GenerateGraph( r.StartState ); if ( dot != null ) { WriteGraphFile( g, r, dot, generator.FileExtension ); } } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe ); } } } protected virtual void WriteGraphFile( Grammar g, Rule r, string graph, string formatExtension ) { WriteGraphFile( g, r.Grammar.name + "." + r.Name, graph, formatExtension ); } protected virtual void WriteGraphFile( Grammar g, string name, string graph, string formatExtension ) { TextWriter fw = GetOutputFile( g, name + formatExtension ); fw.Write( graph ); fw.Close(); } private static void Version() { - ErrorManager.Info( "ANTLR Parser Generator Version " + AntlrTool.AssemblyVersion.ToString(4) ); + ErrorManager.Info( "ANTLR Parser Generator Version " + AntlrTool.AssemblyInformationalVersion ); } private static void Help() { Version(); Console.Error.WriteLine( "usage: java org.antlr.Tool [args] file.g [file2.g file3.g ...]" ); Console.Error.WriteLine( " -o outputDir specify output directory where all output is generated" ); Console.Error.WriteLine( " -fo outputDir same as -o but force even files with relative paths to dir" ); Console.Error.WriteLine( " -lib dir specify location of token files" ); Console.Error.WriteLine( " -depend generate file dependencies" ); Console.Error.WriteLine( " -verbose generate ANTLR version and other information" ); Console.Error.WriteLine( " -report print out a report about the grammar(s) processed" ); Console.Error.WriteLine( " -print print out the grammar without actions" ); Console.Error.WriteLine( " -debug generate a parser that emits debugging events" ); Console.Error.WriteLine( " -trace generate a recognizer that traces rule entry/exit" ); Console.Error.WriteLine( " -profile generate a parser that computes profiling information" ); Console.Error.WriteLine( " -nfa generate an NFA for each rule" ); Console.Error.WriteLine( " -dfa generate a DFA for each decision point" ); Console.Error.WriteLine( " -dgml generate graphs in DGML format." ); Console.Error.WriteLine( " -message-format name specify output style for messages" ); Console.Error.WriteLine( " -verbose generate ANTLR version and other information" ); Console.Error.WriteLine( " -make only build if generated files older than grammar" ); Console.Error.WriteLine( " -version print the version of ANTLR and exit." ); Console.Error.WriteLine( " -language L override language grammar option; generate L" ); Console.Error.WriteLine( " -X display extended argument list" ); } private static void ExtendedHelp() { Version(); Console.Error.WriteLine(" -Xgrtree print the grammar AST"); Console.Error.WriteLine(" -Xdfa print DFA as text "); Console.Error.WriteLine(" -Xnoprune test lookahead against EBNF block exit branches"); Console.Error.WriteLine(" -Xnocollapse collapse incident edges into DFA states"); Console.Error.WriteLine(" -Xdbgconversion dump lots of info during NFA conversion"); Console.Error.WriteLine(" -Xmultithreaded run the analysis in 2 threads"); Console.Error.WriteLine(" -Xnomergestopstates do not merge stop states"); Console.Error.WriteLine(" -Xdfaverbose generate DFA states in DOT with NFA configs"); Console.Error.WriteLine(" -Xwatchconversion print a message for each NFA before converting"); #if DEBUG Console.Error.WriteLine(" -XdbgST put tags at start/stop of all templates in output"); #endif Console.Error.WriteLine(" -Xnfastates for nondeterminisms, list NFA states for each path"); Console.Error.WriteLine(" -Xm m max number of rule invocations during conversion [" + NFAContext.MAX_SAME_RULE_INVOCATIONS_PER_NFA_CONFIG_STACK + "]"); Console.Error.WriteLine(" -Xmaxdfaedges m max \"comfortable\" number of edges for single DFA state [" + DFA.MAX_STATE_TRANSITIONS_FOR_TABLE + "]"); Console.Error.WriteLine(" -Xmaxinlinedfastates m max DFA states before table used rather than inlining [" + CodeGenerator.DefaultMaxSwitchCaseLabels + "]"); Console.Error.WriteLine(" -Xmaxswitchcaselabels m don't generate switch() statements for dfas bigger than m [" + CodeGenerator.DefaultMaxSwitchCaseLabels + "]"); Console.Error.WriteLine(" -Xminswitchalts m don't generate switch() statements for dfas smaller than m [" + CodeGenerator.DefaultMinSwitchAlts + "]"); Console.Error.WriteLine(" -Xsavelexer don't delete temporary lexers generated from combined grammars"); } /// <summary> /// Set the location (base directory) where output files should be produced by the ANTLR tool. /// </summary> /// <param name="outputDirectory"></param> public virtual void SetOutputDirectory( string outputDirectory ) { haveOutputDir = true; this.outputDirectory = outputDirectory; } /** * Used by build tools to force the output files to always be * relative to the base output directory, even though the tool * had to set the output directory to an absolute path as it * cannot rely on the workign directory like command line invocation * can. * * @param forceRelativeOutput true if output files hould always be relative to base output directory */ public virtual void SetForceRelativeOutput( bool forceRelativeOutput ) { this.forceRelativeOutput = forceRelativeOutput; } /** * Set the base location of input files. Normally (when the tool is * invoked from the command line), the inputDirectory is not set, but * for build tools such as Maven, we need to be able to locate the input * files relative to the base, as the working directory could be anywhere and * changing workig directories is not a valid concept for JVMs because of threading and * so on. Setting the directory just means that the getFileDirectory() method will * try to open files relative to this input directory. * * @param inputDirectory Input source base directory */ public virtual void SetInputDirectory( string inputDirectory ) { this.inputDirectory = inputDirectory; haveInputDir = true; } public virtual TextWriter GetOutputFile( Grammar g, string fileName ) { if ( OutputDirectory == null ) return new StringWriter(); // output directory is a function of where the grammar file lives // for subdir/T.g, you get subdir here. Well, depends on -o etc... // But, if this is a .tokens file, then we force the output to // be the base output directory (or current directory if there is not a -o) // #if false System.IO.DirectoryInfo outputDir; if ( fileName.EndsWith( CodeGenerator.VOCAB_FILE_EXTENSION ) ) { if ( haveOutputDir ) { outputDir = new System.IO.DirectoryInfo( OutputDirectory ); } else { outputDir = new System.IO.DirectoryInfo( "." ); } } else { outputDir = getOutputDirectory( g.FileName ); } #else System.IO.DirectoryInfo outputDir = GetOutputDirectory( g.FileName ); #endif FileInfo outputFile = new FileInfo( System.IO.Path.Combine( outputDir.FullName, fileName ) ); if ( !outputDir.Exists ) outputDir.Create(); if ( outputFile.Exists ) outputFile.Delete(); GeneratedFiles.Add(outputFile.FullName); return new System.IO.StreamWriter( new System.IO.BufferedStream( outputFile.OpenWrite() ) ); } /** * Return the location where ANTLR will generate output files for a given file. This is a * base directory and output files will be relative to here in some cases * such as when -o option is used and input files are given relative * to the input directory. * * @param fileNameWithPath path to input source * @return */ public virtual System.IO.DirectoryInfo GetOutputDirectory( string fileNameWithPath ) { string outputDir = OutputDirectory; if ( fileNameWithPath.IndexOfAny( System.IO.Path.GetInvalidPathChars() ) >= 0 ) return new System.IO.DirectoryInfo( outputDir ); if ( !System.IO.Path.IsPathRooted( fileNameWithPath ) ) fileNameWithPath = System.IO.Path.GetFullPath( fileNameWithPath ); string fileDirectory; // Some files are given to us without a PATH but should should // still be written to the output directory in the relative path of // the output directory. The file directory is either the set of sub directories // or just or the relative path recorded for the parent grammar. This means // that when we write the tokens files, or the .java files for imported grammars // taht we will write them in the correct place. // if ( fileNameWithPath.IndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) == -1 ) { // No path is included in the file name, so make the file // directory the same as the parent grammar (which might sitll be just "" // but when it is not, we will write the file in the correct place. // fileDirectory = grammarOutputDirectory; } else { fileDirectory = fileNameWithPath.Substring( 0, fileNameWithPath.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) ); } if ( haveOutputDir ) { // -o /tmp /var/lib/t.g => /tmp/T.java // -o subdir/output /usr/lib/t.g => subdir/output/T.java // -o . /usr/lib/t.g => ./T.java if ( ( fileDirectory != null && !forceRelativeOutput ) && ( System.IO.Path.IsPathRooted( fileDirectory ) || fileDirectory.StartsWith( "~" ) ) || // isAbsolute doesn't count this :( ForceAllFilesToOutputDir ) { // somebody set the dir, it takes precendence; write new file there outputDir = OutputDirectory; } else { // -o /tmp subdir/t.g => /tmp/subdir/t.g if ( fileDirectory != null ) { outputDir = System.IO.Path.Combine( OutputDirectory, fileDirectory ); } else { outputDir = OutputDirectory; } } } else { // they didn't specify a -o dir so just write to location // where grammar is, absolute or relative, this will only happen // with command line invocation as build tools will always // supply an output directory. // outputDir = fileDirectory; } return new System.IO.DirectoryInfo( outputDir ); } /** * Name a file from the -lib dir. Imported grammars and .tokens files * * If we do not locate the file in the library directory, then we try * the location of the originating grammar. * * @param fileName input name we are looking for * @return Path to file that we think shuold be the import file * * @throws java.io.IOException */ public virtual string GetLibraryFile( string fileName ) { // First, see if we can find the file in the library directory // string f = Path.Combine( LibraryDirectory, fileName ); if ( File.Exists( f ) ) { // Found in the library directory // return Path.GetFullPath( f ); } // Need to assume it is in the same location as the input file. Note that // this is only relevant for external build tools and when the input grammar // was specified relative to the source directory (working directory if using // the command line. // return Path.Combine( parentGrammarDirectory, fileName ); } /** Return the directory containing the grammar file for this grammar. * normally this is a relative path from current directory. People will * often do "java org.antlr.Tool grammars/*.g3" So the file will be * "grammars/foo.g3" etc... This method returns "grammars". * * If we have been given a specific input directory as a base, then * we must find the directory relative to this directory, unless the * file name is given to us in absolute terms. */ public virtual string GetFileDirectory( string fileName ) { string f; if ( haveInputDir && !( fileName.StartsWith( Path.DirectorySeparatorChar.ToString() ) || fileName.StartsWith( Path.AltDirectorySeparatorChar.ToString() ) ) ) { f = Path.Combine( inputDirectory, fileName ); } else { f = fileName; } // And ask .NET what the base directory of this location is // return Path.GetDirectoryName( f ); } /** Return a File descriptor for vocab file. Look in library or * in -o output path. antlr -o foo T.g U.g where U needs T.tokens * won't work unless we look in foo too. If we do not find the * file in the lib directory then must assume that the .tokens file * is going to be generated as part of this build and we have defined * .tokens files so that they ALWAYS are generated in the base output * directory, which means the current directory for the command line tool if there * was no output directory specified. */ public virtual string GetImportedVocabFile( string vocabName ) { // first look at files we're generating string path = (from file in GeneratedFiles where Path.GetFileName(file).Equals(vocabName + CodeGenerator.VocabFileExtension) && File.Exists(file) select file) .FirstOrDefault(); if (path != null) return path; path = Path.Combine( LibraryDirectory, vocabName + CodeGenerator.VocabFileExtension ); if ( File.Exists( path ) ) return path; // We did not find the vocab file in the lib directory, so we need // to look for it in the output directory which is where .tokens // files are generated (in the base, not relative to the input // location.) // if ( haveOutputDir ) { path = Path.Combine( OutputDirectory, vocabName + CodeGenerator.VocabFileExtension ); } else { path = vocabName + CodeGenerator.VocabFileExtension; } return path; } /** If the tool needs to panic/exit, how do we do that? */ public virtual void Panic() { throw new Exception( "ANTLR panic" ); } /// <summary> /// Return a time stamp string accurate to sec: yyyy-mm-dd hh:mm:ss /// </summary> public static string GetCurrentTimeStamp() { return DateTime.Now.ToString( "yyyy\\-MM\\-dd HH\\:mm\\:ss" ); } /** * Provide the List of all grammar file names that the ANTLR tool will * process or has processed. * * @return the grammarFileNames */ public virtual IList<string> GrammarFileNames { get { return grammarFileNames; } } public IList<string> GeneratedFiles { get { return generatedFiles; } } /** * Indicates whether ANTLR has gnerated or will generate a description of * all the NFAs in <a href="http://www.graphviz.org">Dot format</a> * * @return the generate_NFA_dot */ public virtual bool Generate_NFA_dot { get { return generate_NFA_dot; } set { this.generate_NFA_dot = value; } } /** * Indicates whether ANTLR has generated or will generate a description of * all the NFAs in <a href="http://www.graphviz.org">Dot format</a> * * @return the generate_DFA_dot */ public virtual bool Generate_DFA_dot { get { return generate_DFA_dot; } set { this.generate_DFA_dot = value; } } public virtual bool GenerateDgmlGraphs { get { return _generateDgmlGraphs; } set { _generateDgmlGraphs = value; } } /** * Return the Path to the base output directory, where ANTLR * will generate all the output files for the current language target as * well as any ancillary files such as .tokens vocab files. * * @return the output Directory */ public virtual string OutputDirectory { get { return outputDirectory; } } /** * Return the Path to the directory in which ANTLR will search for ancillary * files such as .tokens vocab files and imported grammar files. * * @return the lib Directory */ public virtual string LibraryDirectory { get { return libDirectory; } set { this.libDirectory = value; } } /** * Indicate if ANTLR has generated, or will generate a debug version of the * recognizer. Debug versions of a parser communicate with a debugger such * as that contained in ANTLRWorks and at start up will 'hang' waiting for * a connection on an IP port (49100 by default). * * @return the debug flag */ public virtual bool Debug { get { return debug; } set { debug = value; } } /** * Indicate whether ANTLR has generated, or will generate a version of the * recognizer that prints trace messages on entry and exit of each rule. * * @return the trace flag */ public virtual bool Trace { get { return trace; } set { trace = value; } } /** * Indicates whether ANTLR has generated or will generate a version of the * recognizer that gathers statistics about its execution, which it prints when * it terminates. * * @return the profile */ public virtual bool Profile { get { return profile; } set { profile = value; } } /** * Indicates whether ANTLR has generated or will generate a report of various * elements of the grammar analysis, once it it has finished analyzing a grammar * file. * * @return the report flag */ public virtual bool Report { get { return report; } set { report = value; } } /** * Indicates whether ANTLR has printed, or will print, a version of the input grammar * file(s) that is stripped of any action code embedded within. * * @return the printGrammar flag */ public virtual bool PrintGrammar diff --git a/Antlr3/Codegen/CodeGenerator.cs b/Antlr3/Codegen/CodeGenerator.cs index 163e35f..dd75455 100644 --- a/Antlr3/Codegen/CodeGenerator.cs +++ b/Antlr3/Codegen/CodeGenerator.cs @@ -282,1026 +282,1026 @@ namespace Antlr3.Codegen debug = value; } } [CLSCompliant(false)] public bool Profile { get { return profile; } set { profile = value; if ( profile ) { // requires debug events Debug = true; } } } [CLSCompliant(false)] public bool Trace { get { return trace; } set { trace = value; } } #endregion public static Target LoadLanguageTarget( string language, string targetsDirectory ) { lock (_targets) { Target target; if (!_targets.TryGetValue(language, out target)) { // first try to load the target via a satellite DLL string assembly = "Antlr3.Targets." + language + ".dll"; string[] paths = { targetsDirectory }; System.Reflection.Assembly targetAssembly = null; System.Type targetType = null; string targetName = "Antlr3.Targets." + language + "Target"; foreach (string path in paths) { string filename = System.IO.Path.Combine(path, assembly); if (System.IO.File.Exists(filename)) { try { targetAssembly = System.Reflection.Assembly.LoadFrom(filename); targetType = targetAssembly.GetType(targetName, false); } catch { } } } // then try to load from the current file if (targetType == null) { targetType = System.Type.GetType(targetName); if (targetType == null) { ErrorManager.Error(ErrorManager.MSG_CANNOT_CREATE_TARGET_GENERATOR, targetName); return null; } } target = (Target)Activator.CreateInstance(targetType); _targets[language] = target; } return target; } } /** load the main language.stg template group file */ public virtual void LoadTemplates( string language ) { string outputOption = (string)this._grammar.GetOption("output") ?? string.Empty; LoadTemplates(tool, language, _grammar.type, outputOption, debug, out baseTemplates, out _templates); } private static readonly Dictionary<string, TemplateGroup> _coreTemplates = new Dictionary<string, TemplateGroup>(); #if AGGREGATE_TEMPLATE_GROUPS private static readonly Dictionary<string, Dictionary<string, TemplateGroup>> _languageBaseTemplates = new Dictionary<string, Dictionary<string, TemplateGroup>>(); #endif private static readonly Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>> _languageTemplates = new Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>>(ObjectReferenceEqualityComparer<TemplateGroup>.Default); private sealed class ObjectReferenceEqualityComparer<T> : EqualityComparer<T> where T : class { private static readonly ObjectReferenceEqualityComparer<T> _default = new ObjectReferenceEqualityComparer<T>(); private ObjectReferenceEqualityComparer() { } public static new ObjectReferenceEqualityComparer<T> Default { get { return _default; } } public override bool Equals(T x, T y) { return object.ReferenceEquals(x, y); } public override int GetHashCode(T obj) { return RuntimeHelpers.GetHashCode(obj); } } private static void LoadTemplates(AntlrTool tool, string language, GrammarType grammarType, string outputOption, bool debug, out TemplateGroup baseTemplates, out TemplateGroup templates) { // first load main language template TemplateGroup coreTemplates = GetOrCacheTemplateGroup(tool, language, null, null); baseTemplates = coreTemplates; outputOption = outputOption ?? string.Empty; // dynamically add subgroups that act like filters to apply to // their supergroup. E.g., Java:Dbg:AST:ASTParser::ASTDbg. if (outputOption.Equals("AST")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", dbgTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } TemplateGroup astDbgTemplates = GetOrCacheTemplateGroup(tool, language, "ASTDbg", astParserTemplates); templates = astDbgTemplates; } else { TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", coreTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } templates = astParserTemplates; } } else if (outputOption.Equals("template")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup stTemplates = GetOrCacheTemplateGroup(tool, language, "ST", dbgTemplates); templates = stTemplates; } else { templates = GetOrCacheTemplateGroup(tool, language, "ST", coreTemplates); } } else if (debug && grammarType != GrammarType.Lexer) { templates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = templates; } else { templates = coreTemplates; } } private static TemplateGroup GetOrCacheTemplateGroup(AntlrTool tool, string language, string name, TemplateGroup superGroup) { if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group; if (_coreTemplates.TryGetValue(language, out group)) return group; } else { Dictionary<string, TemplateGroup> languageTemplates; if (_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { TemplateGroup group; if (languageTemplates.TryGetValue(name, out group)) return group; } } string[] templateDirectories = { tool.TemplatesDirectory, Path.Combine(tool.TemplatesDirectory, language) }; return CacheTemplateGroup(templateDirectories, language, name, superGroup); } #if AGGREGATE_TEMPLATE_GROUPS private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { TemplateGroup baseTemplateGroup; if (string.IsNullOrEmpty(name)) { _coreTemplates.TryGetValue(language, out baseTemplateGroup); } else { Dictionary<string, TemplateGroup> baseTemplates; if (!_languageBaseTemplates.TryGetValue(language, out baseTemplates)) { baseTemplates = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = baseTemplates; } baseTemplates.TryGetValue(name, out baseTemplateGroup); } if (baseTemplateGroup == null) { baseTemplateGroup = CacheBaseTemplateGroup(templateDirectories, language, name); } if (superGroup == null) return baseTemplateGroup; TemplateGroup group = new TemplateGroup(); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; group.ImportTemplates(baseTemplateGroup); group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> languageTemplates; if (!_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { languageTemplates = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = languageTemplates; } languageTemplates[name] = group; return group; } private static TemplateGroup CacheBaseTemplateGroup(string[] templateDirectories, string language, string name) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name)) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; Dictionary<string, TemplateGroup> groups; if (!_languageBaseTemplates.TryGetValue(language, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = groups; } groups[name] = group; return group; } } #else private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); #if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; #endif group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); #if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; #endif group.IterateAcrossValues = true; group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> groups; if (!_languageTemplates.TryGetValue(superGroup, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = groups; } groups[name] = group; return group; } } #endif internal static string FindTemplateFile(string[] templateDirectories, string fileName) { foreach (var directory in templateDirectories) { string templateFileName = Path.Combine(directory, fileName); if (File.Exists(templateFileName)) return templateFileName; } throw new FileNotFoundException(); } /** Given the grammar to which we are attached, walk the AST associated * with that grammar to create NFAs. Then create the DFAs for all * decision points in the grammar by converting the NFAs to DFAs. * Finally, walk the AST again to generate code. * * Either 1 or 2 files are written: * * recognizer: the main parser/lexer/treewalker item * header file: language like C/C++ need extern definitions * * The target, such as JavaTarget, dictates which files get written. */ public virtual StringTemplate GenRecognizer() { //JSystem.@out.println("### generate "+grammar.name+" recognizer"); // LOAD OUTPUT TEMPLATES LoadTemplates( _language ); if ( _templates == null ) { return null; } // CREATE NFA FROM GRAMMAR, CREATE DFA FROM NFA if ( ErrorManager.DoNotAttemptAnalysis() ) { return null; } _target.PerformGrammarAnalysis( this, _grammar ); // some grammar analysis errors will not yield reliable DFA if ( ErrorManager.DoNotAttemptCodeGen() ) { return null; } // OPTIMIZE DFA DFAOptimizer optimizer = new DFAOptimizer( _grammar ); optimizer.Optimize(); // OUTPUT FILE (contains recognizerST) outputFileST = _templates.GetInstanceOf( "outputFile" ); // HEADER FILE if ( _templates.IsDefined( "headerFile" ) ) { headerFileST = _templates.GetInstanceOf( "headerFile" ); } else { // create a dummy to avoid null-checks all over code generator headerFileST = new StringTemplate( _templates, string.Empty ); // it normally sees this from outputFile headerFileST.Add("cyclicDFAs", null); headerFileST.impl.Name = "dummy-header-file"; } bool filterMode = _grammar.GetOption( "filter" ) != null && _grammar.GetOption( "filter" ).Equals( "true" ); bool canBacktrack = _grammar.composite.RootGrammar.atLeastOneBacktrackOption || _grammar.SyntacticPredicates != null || filterMode; // TODO: move this down further because generating the recognizer // alters the model with info on who uses predefined properties etc... // The actions here might refer to something. // The only two possible output files are available at this point. // Verify action scopes are ok for target and dump actions into output // Templates can say <actions.parser.header> for example. var actions = _grammar.Actions; VerifyActionScopesOkForTarget( actions ); // translate $x::y references TranslateActionAttributeReferences( actions ); StringTemplate gateST = _templates.GetInstanceOf( "actionGate" ); if ( filterMode ) { // if filtering, we need to set actions to execute at backtracking // level 1 not 0. gateST = _templates.GetInstanceOf( "filteringActionGate" ); } _grammar.SetSynPredGateIfNotAlready( gateST ); headerFileST.SetAttribute( "actions", actions ); outputFileST.SetAttribute( "actions", actions ); headerFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); outputFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); headerFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); headerFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); outputFileST.SetAttribute( "backtracking", canBacktrack ); headerFileST.SetAttribute( "backtracking", canBacktrack ); // turn on memoize attribute at grammar level so we can create ruleMemo. // each rule has memoize attr that hides this one, indicating whether // it needs to save results string memoize = (string)_grammar.GetOption( "memoize" ); outputFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); headerFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); outputFileST.SetAttribute( "trace", trace ); headerFileST.SetAttribute( "trace", trace ); outputFileST.SetAttribute( "profile", profile ); headerFileST.SetAttribute( "profile", profile ); // RECOGNIZER if ( _grammar.type == GrammarType.Lexer ) { recognizerST = _templates.GetInstanceOf( "lexer" ); outputFileST.SetAttribute( "LEXER", true ); headerFileST.SetAttribute( "LEXER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } else if ( _grammar.type == GrammarType.Parser || _grammar.type == GrammarType.Combined ) { recognizerST = _templates.GetInstanceOf( "parser" ); outputFileST.SetAttribute( "PARSER", true ); headerFileST.SetAttribute( "PARSER", true ); } else { recognizerST = _templates.GetInstanceOf( "treeParser" ); outputFileST.SetAttribute( "TREE_PARSER", true ); headerFileST.SetAttribute( "TREE_PARSER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } outputFileST.SetAttribute( "recognizer", recognizerST ); headerFileST.SetAttribute( "recognizer", recognizerST ); outputFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); headerFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); string targetAppropriateFileNameString = _target.GetTargetStringLiteralFromString( _grammar.FileName ); outputFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); headerFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); - outputFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyVersion.ToString(4) ); - headerFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyVersion.ToString(4) ); + outputFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyInformationalVersion ); + headerFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyInformationalVersion ); outputFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); headerFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); { // GENERATE RECOGNIZER // Walk the AST holding the input grammar, this time generating code // Decisions are generated by using the precomputed DFAs // Fill in the various templates with data CodeGenTreeWalker gen = new CodeGenTreeWalker( new Antlr.Runtime.Tree.CommonTreeNodeStream( _grammar.Tree ) ); try { gen.grammar_( _grammar, recognizerST, outputFileST, headerFileST ); } catch ( RecognitionException re ) { ErrorManager.Error( ErrorManager.MSG_BAD_AST_STRUCTURE, re ); } } GenTokenTypeConstants( recognizerST ); GenTokenTypeConstants( outputFileST ); GenTokenTypeConstants( headerFileST ); if ( _grammar.type != GrammarType.Lexer ) { GenTokenTypeNames( recognizerST ); GenTokenTypeNames( outputFileST ); GenTokenTypeNames( headerFileST ); } // Now that we know what synpreds are used, we can set into template HashSet<string> synpredNames = null; if ( _grammar.synPredNamesUsedInDFA.Count > 0 ) { synpredNames = _grammar.synPredNamesUsedInDFA; } outputFileST.SetAttribute( "synpreds", synpredNames ); headerFileST.SetAttribute( "synpreds", synpredNames ); // all recognizers can see Grammar object recognizerST.SetAttribute( "grammar", _grammar ); // do not render templates to disk if errors occurred if (ErrorManager.GetErrorState().errors > 0) return null; #if DEBUG if (CodeGenerator.LaunchTemplateInspector) { outputFileST.Visualize(); if (_templates.IsDefined("headerFile")) headerFileST.Visualize(); } #endif // WRITE FILES try { _target.GenRecognizerFile( tool, this, _grammar, outputFileST ); if ( _templates.IsDefined( "headerFile" ) ) { StringTemplate extST = _templates.GetInstanceOf( "headerFileExtension" ); _target.GenRecognizerHeaderFile( tool, this, _grammar, headerFileST, extST.Render() ); } // write out the vocab interchange file; used by antlr, // does not change per target StringTemplate tokenVocabSerialization = GenTokenVocabOutput(); string vocabFileName = VocabFileName; if ( vocabFileName != null ) { Write( tokenVocabSerialization, vocabFileName ); } //JSystem.@out.println(outputFileST.getDOTForDependencyGraph(false)); } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe ); } /* JSystem.@out.println("num obj.prop refs: "+ ASTExpr.totalObjPropRefs); JSystem.@out.println("num reflection lookups: "+ ASTExpr.totalReflectionLookups); */ return outputFileST; } /** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected virtual void VerifyActionScopesOkForTarget( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; if ( !_target.IsValidActionScope( _grammar.type, scope ) ) { // get any action from the scope to get error location var scopeActions = action.Value; GrammarAST actionAST = scopeActions.Values.Cast<GrammarAST>().First(); ErrorManager.GrammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE, _grammar, actionAST.Token, scope, _grammar.GrammarTypeString ); } } } /** Actions may reference $x::y attributes, call translateAction on * each action and replace that action in the Map. */ protected virtual void TranslateActionAttributeReferences( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; var scopeActions = action.Value; TranslateActionAttributeReferencesForSingleScope( null, scopeActions ); } } /** Use for translating rule @init{...} actions that have no scope */ protected internal virtual void TranslateActionAttributeReferencesForSingleScope( Rule r, IDictionary<string,object> scopeActions ) { string ruleName = null; if ( r != null ) { ruleName = r.Name; } foreach ( var scopeAction in scopeActions.ToArray() ) { string name = scopeAction.Key; object action = scopeAction.Value; GrammarAST actionAST = action as GrammarAST; IList<object> chunks = TranslateAction( ruleName, actionAST ); scopeActions[name] = chunks; // replace with translation } } /** Error recovery in ANTLR recognizers. * * Based upon original ideas: * * Algorithms + Data Structures = Programs by Niklaus Wirth * * and * * A note on error recovery in recursive descent parsers: * http://portal.acm.org/citation.cfm?id=947902.947905 * * Later, Josef Grosch had some good ideas: * Efficient and Comfortable Error Recovery in Recursive Descent Parsers: * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip * * Like Grosch I implemented local FOLLOW sets that are combined at run-time * upon error to avoid parsing overhead. */ public virtual void GenerateLocalFollow( GrammarAST referencedElementNode, string referencedElementName, string enclosingRuleName, int elementIndex ) { if (elementIndex < 0) { throw new ArgumentOutOfRangeException("elementIndex", "elementIndex cannot be less than zero."); } /* JSystem.@out.println("compute FOLLOW "+grammar.name+"."+referencedElementNode.toString()+ " for "+referencedElementName+"#"+elementIndex +" in "+ enclosingRuleName+ " line="+referencedElementNode.getLine()); */ NFAState followingNFAState = referencedElementNode.followingNFAState; LookaheadSet follow = null; if ( followingNFAState != null ) { // compute follow for this element and, as side-effect, track // the rule LOOK sensitivity. follow = _grammar.First( followingNFAState ); } if ( follow == null ) { ErrorManager.InternalError( "no follow state or cannot compute follow" ); follow = new LookaheadSet(); } if ( follow.Member( Label.EOF ) ) { // TODO: can we just remove? Seems needed here: // compilation_unit : global_statement* EOF // Actually i guess we resync to EOF regardless follow.Remove( Label.EOF ); } //JSystem.@out.println(" "+follow); IList<int> tokenTypeList = null; ulong[] words = null; if ( follow.TokenTypeSet == null ) { words = new ulong[1]; tokenTypeList = new List<int>(); } else { BitSet bits = BitSet.Of( follow.TokenTypeSet ); words = bits.ToPackedArray(); tokenTypeList = follow.TokenTypeSet.ToList(); } // use the target to convert to hex strings (typically) string[] wordStrings = new string[words.Length]; for ( int j = 0; j < words.Length; j++ ) { ulong w = words[j]; wordStrings[j] = _target.GetTarget64BitStringFromValue( w ); } recognizerST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); outputFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); headerFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); } // L O O K A H E A D D E C I S I O N G E N E R A T I O N /** Generate code that computes the predicted alt given a DFA. The * recognizerST can be either the main generated recognizerTemplate * for storage in the main parser file or a separate file. It's up to * the code that ultimately invokes the codegen.g grammar rule. * * Regardless, the output file and header file get a copy of the DFAs. */ public virtual StringTemplate GenLookaheadDecision( StringTemplate recognizerST, DFA dfa ) { StringTemplate decisionST; // If we are doing inline DFA and this one is acyclic and LL(*) // I have to check for is-non-LL(*) because if non-LL(*) the cyclic // check is not done by DFA.verify(); that is, verify() avoids // doesStateReachAcceptState() if non-LL(*) if ( dfa.CanInlineDecision ) { decisionST = _acyclicDFAGenerator.GenFixedLookaheadDecision( Templates, dfa ); } else { // generate any kind of DFA here (cyclic or acyclic) dfa.CreateStateTables( this ); outputFileST.SetAttribute( "cyclicDFAs", dfa ); headerFileST.SetAttribute( "cyclicDFAs", dfa ); decisionST = _templates.GetInstanceOf( "dfaDecision" ); string description = dfa.NFADecisionStartState.Description; description = _target.GetTargetStringLiteralFromString( description ); if ( description != null ) { decisionST.SetAttribute( "description", description ); } decisionST.SetAttribute( "decisionNumber", dfa.NfaStartStateDecisionNumber ); } return decisionST; } /** A special state is huge (too big for state tables) or has a predicated * edge. Generate a simple if-then-else. Cannot be an accept state as * they have no emanating edges. Don't worry about switch vs if-then-else * because if you get here, the state is super complicated and needs an * if-then-else. This is used by the new DFA scheme created June 2006. */ public virtual StringTemplate GenerateSpecialState( DFAState s ) { StringTemplate stateST; stateST = _templates.GetInstanceOf( "cyclicDFAState" ); stateST.SetAttribute( "needErrorClause", true ); stateST.SetAttribute( "semPredState", s.IsResolvedWithPredicates ); stateST.SetAttribute( "stateNumber", s.StateNumber ); stateST.SetAttribute( "decisionNumber", s.Dfa.DecisionNumber ); bool foundGatedPred = false; StringTemplate eotST = null; for ( int i = 0; i < s.NumberOfTransitions; i++ ) { Transition edge = (Transition)s.GetTransition( i ); StringTemplate edgeST; if ( edge.Label.Atom == Label.EOT ) { // this is the default clause; has to held until last edgeST = _templates.GetInstanceOf( "eotDFAEdge" ); stateST.RemoveAttribute( "needErrorClause" ); eotST = edgeST; } else { edgeST = _templates.GetInstanceOf( "cyclicDFAEdge" ); StringTemplate exprST = GenLabelExpr( _templates, edge, 1 ); edgeST.SetAttribute( "labelExpr", exprST ); } edgeST.SetAttribute( "edgeNumber", i + 1 ); edgeST.SetAttribute( "targetStateNumber", edge.Target.StateNumber ); // stick in any gated predicates for any edge if not already a pred if ( !edge.Label.IsSemanticPredicate ) { DFAState t = (DFAState)edge.Target; SemanticContext preds = t.GetGatedPredicatesInNFAConfigurations(); if ( preds != null ) { foundGatedPred = true; StringTemplate predST = preds.GenExpr( this, Templates, t.Dfa ); edgeST.SetAttribute( "predicates", predST.Render() ); } } if ( edge.Label.Atom != Label.EOT ) { stateST.SetAttribute( "edges", edgeST ); } } if ( foundGatedPred ) { // state has >= 1 edge with a gated pred (syn or sem) // must rewind input first, set flag. stateST.SetAttribute( "semPredState", foundGatedPred ); } if ( eotST != null ) { stateST.SetAttribute( "edges", eotST ); } return stateST; } /** Generate an expression for traversing an edge. */ protected internal virtual StringTemplate GenLabelExpr( TemplateGroup templates, Transition edge, int k ) { Label label = edge.Label; if ( label.IsSemanticPredicate ) { return GenSemanticPredicateExpr( templates, edge ); } if ( label.IsSet ) { return GenSetExpr( templates, label.Set, k, true ); } // must be simple label StringTemplate eST = templates.GetInstanceOf( "lookaheadTest" ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( label.Atom ) ); eST.SetAttribute( "atomAsInt", label.Atom ); eST.SetAttribute( "k", k ); return eST; } protected internal virtual StringTemplate GenSemanticPredicateExpr( TemplateGroup templates, Transition edge ) { DFA dfa = ( (DFAState)edge.Target ).Dfa; // which DFA are we in Label label = edge.Label; SemanticContext semCtx = label.SemanticContext; return semCtx.GenExpr( this, templates, dfa ); } /** For intervals such as [3..3, 30..35], generate an expression that * tests the lookahead similar to LA(1)==3 || (LA(1)>=30&amp;&amp;LA(1)&lt;=35) */ public virtual StringTemplate GenSetExpr( TemplateGroup templates, IIntSet set, int k, bool partOfDFA ) { if ( !( set is IntervalSet ) ) { throw new ArgumentException( "unable to generate expressions for non IntervalSet objects" ); } IntervalSet iset = (IntervalSet)set; if ( iset.Intervals == null || iset.Intervals.Count == 0 ) { StringTemplate emptyST = new StringTemplate( templates, "" ); emptyST.impl.Name = "empty-set-expr"; return emptyST; } string testSTName = "lookaheadTest"; string testRangeSTName = "lookaheadRangeTest"; string testSetSTName = "lookaheadSetTest"; string varSTName = "lookaheadVarName"; if (!partOfDFA) { testSTName = "isolatedLookaheadTest"; testRangeSTName = "isolatedLookaheadRangeTest"; testSetSTName = "isolatedLookaheadSetTest"; varSTName = "isolatedLookaheadVarName"; } StringTemplate setST = templates.GetInstanceOf( "setTest" ); // If the SetTest template exists, separate the ranges: // flatten the small ones into one list and make that a range, // and leave the others as they are. if (templates.IsDefined(testSetSTName)) { // Flatten the IntervalSet into a list of integers. StringTemplate sST = templates.GetInstanceOf(testSetSTName); int rangeNumber2 = 1; foreach (Interval I in iset.Intervals) { int a = I.a; int b = I.b; // Not flattening the large ranges helps us avoid making a // set that contains 90% of Unicode when we could just use // a simple range like (LA(1)>=123 && LA(1)<=65535). // This flattens all ranges of length 4 or less. if (b - a < 4) { for (int i = a; i <= b; i++) { sST.Add("values", GetTokenTypeAsTargetLabel(i)); sST.Add("valuesAsInt", i); } } else { StringTemplate eST = templates.GetInstanceOf(testRangeSTName); eST.Add("lower", GetTokenTypeAsTargetLabel(a)); eST.Add("lowerAsInt", a); eST.Add("upper", GetTokenTypeAsTargetLabel(b)); eST.Add("upperAsInt", b); eST.Add("rangeNumber", rangeNumber2); eST.Add("k", k); setST.Add("ranges", eST); rangeNumber2++; } } sST.Add("k", k); setST.Add("ranges", sST); return setST; } int rangeNumber = 1; foreach ( Interval I in iset.Intervals ) { int a = I.a; int b = I.b; StringTemplate eST; if ( a == b ) { eST = templates.GetInstanceOf( testSTName ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "atomAsInt", a ); //eST.setAttribute("k",Utils.integer(k)); } else { eST = templates.GetInstanceOf( testRangeSTName ); eST.SetAttribute( "lower", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "lowerAsInt", a ); eST.SetAttribute( "upper", GetTokenTypeAsTargetLabel( b ) ); eST.SetAttribute( "upperAsInt", b ); eST.SetAttribute( "rangeNumber", rangeNumber ); } eST.SetAttribute( "k", k ); setST.SetAttribute( "ranges", eST ); rangeNumber++; } return setST; } // T O K E N D E F I N I T I O N G E N E R A T I O N /** Set attributes tokens and literals attributes in the incoming * code template. This is not the token vocab interchange file, but * rather a list of token type ID needed by the recognizer. */ protected virtual void GenTokenTypeConstants( StringTemplate code ) { // make constants for the token types foreach (var token in _grammar.composite.TokenIDToTypeMap.OrderBy(i => i.Value)) { if (token.Value == Label.EOF || token.Value >= Label.MIN_TOKEN_TYPE) code.SetAttribute("tokens.{name,type}", token.Key, token.Value); } } /** Generate a token names table that maps token type to a printable * name: either the label like INT or the literal like "begin". */ protected virtual void GenTokenTypeNames( StringTemplate code ) { for ( int t = Label.MIN_TOKEN_TYPE; t <= _grammar.MaxTokenType; t++ ) {
antlr/antlrcs
f28d005d864473da7da263b0c2bfc9e9ecd0f3b6
Mark GetObjectData with SecurityCriticalAttribute
diff --git a/Runtime/Antlr3.Runtime/EarlyExitException.cs b/Runtime/Antlr3.Runtime/EarlyExitException.cs index 9e08fb4..c72de38 100644 --- a/Runtime/Antlr3.Runtime/EarlyExitException.cs +++ b/Runtime/Antlr3.Runtime/EarlyExitException.cs @@ -1,111 +1,113 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif /** <summary>The recognizer did not match anything for a (..)+ loop.</summary> */ [System.Serializable] public class EarlyExitException : RecognitionException { private readonly int _decisionNumber; public EarlyExitException() { } public EarlyExitException(string message) : base(message) { } public EarlyExitException(string message, Exception innerException) : base(message, innerException) { } public EarlyExitException(int decisionNumber, IIntStream input) : base(input) { this._decisionNumber = decisionNumber; } public EarlyExitException(string message, int decisionNumber, IIntStream input) : base(message, input) { this._decisionNumber = decisionNumber; } public EarlyExitException(string message, int decisionNumber, IIntStream input, Exception innerException) : base(message, input, innerException) { this._decisionNumber = decisionNumber; } #if !PORTABLE protected EarlyExitException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._decisionNumber = info.GetInt32("DecisionNumber"); } #endif public int DecisionNumber { get { return _decisionNumber; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("DecisionNumber", DecisionNumber); } #endif } } diff --git a/Runtime/Antlr3.Runtime/FailedPredicateException.cs b/Runtime/Antlr3.Runtime/FailedPredicateException.cs index c7bfaaf..aad10d5 100644 --- a/Runtime/Antlr3.Runtime/FailedPredicateException.cs +++ b/Runtime/Antlr3.Runtime/FailedPredicateException.cs @@ -1,136 +1,138 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif /** <summary> * A semantic predicate failed during validation. Validation of predicates * occurs when normally parsing the alternative just like matching a token. * Disambiguating predicate evaluation occurs when we hoist a predicate into * a prediction decision. * </summary> */ [System.Serializable] public class FailedPredicateException : RecognitionException { private readonly string _ruleName; private readonly string _predicateText; public FailedPredicateException() { } public FailedPredicateException(string message) : base(message) { } public FailedPredicateException(string message, Exception innerException) : base(message, innerException) { } public FailedPredicateException(IIntStream input, string ruleName, string predicateText) : base(input) { this._ruleName = ruleName; this._predicateText = predicateText; } public FailedPredicateException(string message, IIntStream input, string ruleName, string predicateText) : base(message, input) { this._ruleName = ruleName; this._predicateText = predicateText; } public FailedPredicateException(string message, IIntStream input, string ruleName, string predicateText, Exception innerException) : base(message, input, innerException) { this._ruleName = ruleName; this._predicateText = predicateText; } #if !PORTABLE protected FailedPredicateException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._ruleName = info.GetString("RuleName"); this._predicateText = info.GetString("PredicateText"); } #endif public string RuleName { get { return _ruleName; } } public string PredicateText { get { return _predicateText; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("RuleName", _ruleName); info.AddValue("PredicateText", _predicateText); } #endif public override string ToString() { return "FailedPredicateException(" + RuleName + ",{" + PredicateText + "}?)"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedRangeException.cs b/Runtime/Antlr3.Runtime/MismatchedRangeException.cs index 209e586..7b4b361 100644 --- a/Runtime/Antlr3.Runtime/MismatchedRangeException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedRangeException.cs @@ -1,129 +1,131 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif [System.Serializable] public class MismatchedRangeException : RecognitionException { private readonly int _a; private readonly int _b; public MismatchedRangeException() { } public MismatchedRangeException(string message) : base(message) { } public MismatchedRangeException(string message, Exception innerException) : base(message, innerException) { } public MismatchedRangeException(int a, int b, IIntStream input) : base(input) { this._a = a; this._b = b; } public MismatchedRangeException(string message, int a, int b, IIntStream input) : base(message, input) { this._a = a; this._b = b; } public MismatchedRangeException(string message, int a, int b, IIntStream input, Exception innerException) : base(message, input, innerException) { this._a = a; this._b = b; } #if !PORTABLE protected MismatchedRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._a = info.GetInt32("A"); this._b = info.GetInt32("B"); } #endif public int A { get { return _a; } } public int B { get { return _b; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("A", _a); info.AddValue("B", _b); } #endif public override string ToString() { return "MismatchedRangeException(" + UnexpectedType + " not in [" + A + "," + B + "])"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedSetException.cs b/Runtime/Antlr3.Runtime/MismatchedSetException.cs index 0e4bfce..36e2952 100644 --- a/Runtime/Antlr3.Runtime/MismatchedSetException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedSetException.cs @@ -1,115 +1,117 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif [System.Serializable] public class MismatchedSetException : RecognitionException { private readonly BitSet _expecting; public MismatchedSetException() { } public MismatchedSetException(string message) : base(message) { } public MismatchedSetException(string message, Exception innerException) : base(message, innerException) { } public MismatchedSetException( BitSet expecting, IIntStream input ) : base( input ) { this._expecting = expecting; } public MismatchedSetException(string message, BitSet expecting, IIntStream input) : base(message, input) { this._expecting = expecting; } public MismatchedSetException(string message, BitSet expecting, IIntStream input, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; } #if !PORTABLE protected MismatchedSetException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = (BitSet)info.GetValue("Expecting", typeof(BitSet)); } #endif public BitSet Expecting { get { return _expecting; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); } #endif public override string ToString() { return "MismatchedSetException(" + UnexpectedType + "!=" + Expecting + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedTokenException.cs b/Runtime/Antlr3.Runtime/MismatchedTokenException.cs index 3785f0f..d108196 100644 --- a/Runtime/Antlr3.Runtime/MismatchedTokenException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedTokenException.cs @@ -1,146 +1,148 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using System.Collections.ObjectModel; using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif /** <summary>A mismatched char or Token or tree node</summary> */ [System.Serializable] public class MismatchedTokenException : RecognitionException { private readonly int _expecting = TokenTypes.Invalid; private readonly ReadOnlyCollection<string> _tokenNames; public MismatchedTokenException() { } public MismatchedTokenException(string message) : base(message) { } public MismatchedTokenException(string message, Exception innerException) : base(message, innerException) { } public MismatchedTokenException(int expecting, IIntStream input) : this(expecting, input, null) { } public MismatchedTokenException(int expecting, IIntStream input, IList<string> tokenNames) : base(input) { this._expecting = expecting; if (tokenNames != null) this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames) : base(message, input) { this._expecting = expecting; if (tokenNames != null) this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; if (tokenNames != null) this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } #if !PORTABLE protected MismatchedTokenException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = info.GetInt32("Expecting"); this._tokenNames = new ReadOnlyCollection<string>((string[])info.GetValue("TokenNames", typeof(string[]))); } #endif public int Expecting { get { return _expecting; } } public ReadOnlyCollection<string> TokenNames { get { return _tokenNames; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); info.AddValue("TokenNames", (_tokenNames != null) ? new List<string>(_tokenNames).ToArray() : default(string[])); } #endif public override string ToString() { int unexpectedType = UnexpectedType; string unexpected = ( TokenNames != null && unexpectedType >= 0 && unexpectedType < TokenNames.Count ) ? TokenNames[unexpectedType] : unexpectedType.ToString(); string expected = ( TokenNames != null && Expecting >= 0 && Expecting < TokenNames.Count ) ? TokenNames[Expecting] : Expecting.ToString(); return "MismatchedTokenException(" + unexpected + "!=" + expected + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs b/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs index 9d33b60..36b6e4b 100644 --- a/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs @@ -1,116 +1,118 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; using ITreeNodeStream = Antlr.Runtime.Tree.ITreeNodeStream; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif [System.Serializable] public class MismatchedTreeNodeException : RecognitionException { private readonly int _expecting; public MismatchedTreeNodeException() { } public MismatchedTreeNodeException(string message) : base(message) { } public MismatchedTreeNodeException(string message, Exception innerException) : base(message, innerException) { } public MismatchedTreeNodeException( int expecting, ITreeNodeStream input ) : base( input ) { this._expecting = expecting; } public MismatchedTreeNodeException(string message, int expecting, ITreeNodeStream input) : base(message, input) { this._expecting = expecting; } public MismatchedTreeNodeException(string message, int expecting, ITreeNodeStream input, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; } #if !PORTABLE protected MismatchedTreeNodeException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = info.GetInt32("Expecting"); } #endif public int Expecting { get { return _expecting; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); } #endif public override string ToString() { return "MismatchedTreeNodeException(" + UnexpectedType + "!=" + Expecting + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/NoViableAltException.cs b/Runtime/Antlr3.Runtime/NoViableAltException.cs index 897f67c..c291a66 100644 --- a/Runtime/Antlr3.Runtime/NoViableAltException.cs +++ b/Runtime/Antlr3.Runtime/NoViableAltException.cs @@ -1,172 +1,174 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif [System.Serializable] public class NoViableAltException : RecognitionException { private readonly string _grammarDecisionDescription; private readonly int _decisionNumber; private readonly int _stateNumber; public NoViableAltException() { } public NoViableAltException(string grammarDecisionDescription) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string message, string grammarDecisionDescription) : base(message) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string message, string grammarDecisionDescription, Exception innerException) : base(message, innerException) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input) : this(grammarDecisionDescription, decisionNumber, stateNumber, input, 1) { } public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k) : base(input, k) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input) : this(message, grammarDecisionDescription, decisionNumber, stateNumber, input, 1) { } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k) : base(message, input, k) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, Exception innerException) : this(message, grammarDecisionDescription, decisionNumber, stateNumber, input, 1, innerException) { } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k, Exception innerException) : base(message, input, k, innerException) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } #if !PORTABLE protected NoViableAltException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._grammarDecisionDescription = info.GetString("GrammarDecisionDescription"); this._decisionNumber = info.GetInt32("DecisionNumber"); this._stateNumber = info.GetInt32("StateNumber"); } #endif public int DecisionNumber { get { return _decisionNumber; } } public string GrammarDecisionDescription { get { return _grammarDecisionDescription; } } public int StateNumber { get { return _stateNumber; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("GrammarDecisionDescription", _grammarDecisionDescription); info.AddValue("DecisionNumber", _decisionNumber); info.AddValue("StateNumber", _stateNumber); } #endif public override string ToString() { if ( Input is ICharStream ) { return "NoViableAltException('" + (char)UnexpectedType + "'@[" + GrammarDecisionDescription + "])"; } else { return "NoViableAltException(" + UnexpectedType + "@[" + GrammarDecisionDescription + "])"; } } } } diff --git a/Runtime/Antlr3.Runtime/RecognitionException.cs b/Runtime/Antlr3.Runtime/RecognitionException.cs index f97d03e..80bda65 100644 --- a/Runtime/Antlr3.Runtime/RecognitionException.cs +++ b/Runtime/Antlr3.Runtime/RecognitionException.cs @@ -1,481 +1,483 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using Antlr.Runtime.Tree; using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; using NotSupportedException = System.NotSupportedException; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif /** <summary>The root of the ANTLR exception hierarchy.</summary> * * <remarks> * To avoid English-only error messages and to generally make things * as flexible as possible, these exceptions are not created with strings, * but rather the information necessary to generate an error. Then * the various reporting methods in Parser and Lexer can be overridden * to generate a localized error message. For example, MismatchedToken * exceptions are built with the expected token type. * So, don't expect getMessage() to return anything. * * Note that as of Java 1.4, you can access the stack trace, which means * that you can compute the complete trace of rules from the start symbol. * This gives you considerable context information with which to generate * useful error messages. * * ANTLR generates code that throws exceptions upon recognition error and * also generates code to catch these exceptions in each rule. If you * want to quit upon first error, you can turn off the automatic error * handling mechanism using rulecatch action, but you still need to * override methods mismatch and recoverFromMismatchSet. * * In general, the recognition exceptions can track where in a grammar a * problem occurred and/or what was the expected input. While the parser * knows its state (such as current input symbol and line info) that * state can change before the exception is reported so current token index * is computed and stored at exception time. From this info, you can * perhaps print an entire line of input not just a single token, for example. * Better to just say the recognizer had a problem and then let the parser * figure out a fancy report. * </remarks> */ [System.Serializable] public class RecognitionException : Exception { /** <summary>What input stream did the error occur in?</summary> */ private IIntStream _input; /// <summary> /// What was the lookahead index when this exception was thrown? /// </summary> private int _k; /** <summary>What is index of token/char were we looking at when the error occurred?</summary> */ private int _index; /** <summary> * The current Token when an error occurred. Since not all streams * can retrieve the ith Token, we have to track the Token object. * For parsers. Even when it's a tree parser, token might be set. * </summary> */ private IToken _token; /** <summary> * If this is a tree parser exception, node is set to the node with * the problem. * </summary> */ private object _node; /** <summary>The current char when an error occurred. For lexers.</summary> */ private int _c; /** <summary> * Track the line (1-based) at which the error occurred in case this is * generated from a lexer. We need to track this since the * unexpected char doesn't carry the line info. * </summary> */ private int _line; /// <summary> /// The 0-based index into the line where the error occurred. /// </summary> private int _charPositionInLine; /** <summary> * If you are parsing a tree node stream, you will encounter som * imaginary nodes w/o line/col info. We now search backwards looking * for most recent token with line/col info, but notify getErrorHeader() * that info is approximate. * </summary> */ private bool _approximateLineInfo; /** <summary>Used for remote debugger deserialization</summary> */ public RecognitionException() : this("A recognition error occurred.", null, null) { } public RecognitionException(IIntStream input) : this("A recognition error occurred.", input, 1, null) { } public RecognitionException(IIntStream input, int k) : this("A recognition error occurred.", input, k, null) { } public RecognitionException(string message) : this(message, null, null) { } public RecognitionException(string message, IIntStream input) : this(message, input, 1, null) { } public RecognitionException(string message, IIntStream input, int k) : this(message, input, k, null) { } public RecognitionException(string message, Exception innerException) : this(message, null, innerException) { } public RecognitionException(string message, IIntStream input, Exception innerException) : this(message, input, 1, innerException) { } public RecognitionException(string message, IIntStream input, int k, Exception innerException) : base(message, innerException) { this._input = input; this._k = k; if (input != null) { this._index = input.Index + k - 1; if (input is ITokenStream) { this._token = ((ITokenStream)input).LT(k); this._line = _token.Line; this._charPositionInLine = _token.CharPositionInLine; } ITreeNodeStream tns = input as ITreeNodeStream; if (tns != null) { ExtractInformationFromTreeNodeStream(tns, k); } else { ICharStream charStream = input as ICharStream; if (charStream != null) { int mark = input.Mark(); try { for (int i = 0; i < k - 1; i++) input.Consume(); this._c = input.LA(1); this._line = ((ICharStream)input).Line; this._charPositionInLine = ((ICharStream)input).CharPositionInLine; } finally { input.Rewind(mark); } } else { this._c = input.LA(k); } } } } #if !PORTABLE protected RecognitionException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); _index = info.GetInt32("Index"); _c = info.GetInt32("C"); _line = info.GetInt32("Line"); _charPositionInLine = info.GetInt32("CharPositionInLine"); _approximateLineInfo = info.GetBoolean("ApproximateLineInfo"); } #endif /** <summary>Return the token type or char of the unexpected input element</summary> */ public virtual int UnexpectedType { get { if ( _input is ITokenStream ) { return _token.Type; } ITreeNodeStream treeNodeStream = _input as ITreeNodeStream; if ( treeNodeStream != null ) { ITreeAdaptor adaptor = treeNodeStream.TreeAdaptor; return adaptor.GetType( _node ); } return _c; } } public bool ApproximateLineInfo { get { return _approximateLineInfo; } protected set { _approximateLineInfo = value; } } public IIntStream Input { get { return _input; } protected set { _input = value; } } public int Lookahead { get { return _k; } } public IToken Token { get { return _token; } set { _token = value; } } public object Node { get { return _node; } protected set { _node = value; } } public int Character { get { return _c; } protected set { _c = value; } } public int Index { get { return _index; } protected set { _index = value; } } public int Line { get { return _line; } set { _line = value; } } public int CharPositionInLine { get { return _charPositionInLine; } set { _charPositionInLine = value; } } #if !PORTABLE + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Index", _index); info.AddValue("C", _c); info.AddValue("Line", _line); info.AddValue("CharPositionInLine", _charPositionInLine); info.AddValue("ApproximateLineInfo", _approximateLineInfo); } #endif protected virtual void ExtractInformationFromTreeNodeStream(ITreeNodeStream input) { this._node = input.LT(1); object positionNode = null; IPositionTrackingStream positionTrackingStream = input as IPositionTrackingStream; if (positionTrackingStream != null) { positionNode = positionTrackingStream.GetKnownPositionElement(false); if (positionNode == null) { positionNode = positionTrackingStream.GetKnownPositionElement(true); this._approximateLineInfo = positionNode != null; } } ITokenStreamInformation streamInformation = input as ITokenStreamInformation; if (streamInformation != null) { IToken lastToken = streamInformation.LastToken; IToken lastRealToken = streamInformation.LastRealToken; if (lastRealToken != null) { this._token = lastRealToken; this._line = lastRealToken.Line; this._charPositionInLine = lastRealToken.CharPositionInLine; this._approximateLineInfo = lastRealToken.Equals(lastToken); } } else { ITreeAdaptor adaptor = input.TreeAdaptor; IToken payload = adaptor.GetToken(positionNode ?? _node); if (payload != null) { this._token = payload; if (payload.Line <= 0) { // imaginary node; no line/pos info; scan backwards int i = -1; object priorNode = input.LT(i); while (priorNode != null) { IToken priorPayload = adaptor.GetToken(priorNode); if (priorPayload != null && priorPayload.Line > 0) { // we found the most recent real line / pos info this._line = priorPayload.Line; this._charPositionInLine = priorPayload.CharPositionInLine; this._approximateLineInfo = true; break; } --i; try { priorNode = input.LT(i); } catch (NotSupportedException) { priorNode = null; } } } else { // node created from real token this._line = payload.Line; this._charPositionInLine = payload.CharPositionInLine; } } else if (this._node is Tree.ITree) { this._line = ((Tree.ITree)this._node).Line; this._charPositionInLine = ((Tree.ITree)this._node).CharPositionInLine; if (this._node is CommonTree) { this._token = ((CommonTree)this._node).Token; } } else { int type = adaptor.GetType(this._node); string text = adaptor.GetText(this._node); this._token = new CommonToken(type, text); } } } protected virtual void ExtractInformationFromTreeNodeStream(ITreeNodeStream input, int k) { int mark = input.Mark(); try { for (int i = 0; i < k - 1; i++) input.Consume(); ExtractInformationFromTreeNodeStream(input); } finally { input.Rewind(mark); } } } } diff --git a/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs b/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs index ef3a628..fef5c8d 100644 --- a/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs +++ b/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs @@ -1,101 +1,103 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; #if !PORTABLE + using SecurityCriticalAttribute = System.Security.SecurityCriticalAttribute; using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; #endif /** <summary> * Base class for all exceptions thrown during AST rewrite construction. * This signifies a case where the cardinality of two or more elements * in a subrule are different: (ID INT)+ where |ID|!=|INT| * </summary> */ [System.Serializable] public class RewriteCardinalityException : Exception { private readonly string _elementDescription; public RewriteCardinalityException() { } public RewriteCardinalityException(string elementDescription) : this(elementDescription, elementDescription) { this._elementDescription = elementDescription; } public RewriteCardinalityException(string elementDescription, Exception innerException) : this(elementDescription, elementDescription, innerException) { } public RewriteCardinalityException(string message, string elementDescription) : base(message) { _elementDescription = elementDescription; } public RewriteCardinalityException(string message, string elementDescription, Exception innerException) : base(message, innerException) { _elementDescription = elementDescription; } #if !PORTABLE protected RewriteCardinalityException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); _elementDescription = info.GetString("ElementDescription"); } + [SecurityCritical] public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("ElementDescription", _elementDescription); } #endif } }
antlr/antlrcs
fb0391f8ef186563683a7c70a46402cf1b791552
Reference a single license file
diff --git a/Antlr3.sln b/Antlr3.sln index df90686..b659479 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,253 +1,252 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec - build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.netstandard", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.netstandard.csproj", "{0FB5C69A-F894-45DC-B775-5FC273D41460}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.ActiveCfg = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/LICENSE.txt b/LICENSE.txt index 0cd1bab..5f030c9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,27 +1,27 @@ [The "BSD license"] -Copyright (c) 2010 The ANTLR Project +Copyright (c) 2011 The ANTLR Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/prep/Antlr3.Runtime.Debug.nuspec b/build/prep/Antlr3.Runtime.Debug.nuspec index 7198c25..90c7dbd 100644 --- a/build/prep/Antlr3.Runtime.Debug.nuspec +++ b/build/prep/Antlr3.Runtime.Debug.nuspec @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime.Debug</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The library includes the debug support for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime (Debug Library)</title> <summary>The optional debug component library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Tool\Antlr3.Runtime.Debug.dll" target="lib\net20"/> <file src="Tool\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> <file src="Tool\Antlr3.Runtime.Debug.xml" target="lib\net20"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime.Debug\**\*.cs" target="src"/> </files> </package> diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 600387f..7da969c 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <group targetFramework="netstandard1.1"> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package> diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index f086964..8699360 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,35 +1,35 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Tools --> <file src="Bootstrap\**\*.*" target="tools"/> <!-- Build Configuration --> <file src="Tool\Antlr3.props" target="build"/> <file src="Tool\Antlr3.targets" target="build"/> <file src="Tool\AntlrBuildTask.dll" target="build"/> </files> </package> diff --git a/build/prep/LICENSE.txt b/build/prep/LICENSE.txt deleted file mode 100644 index f63a069..0000000 --- a/build/prep/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -[The "BSD license"] -Copyright (c) 2011 Terence Parr -C# Port (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build/prep/StringTemplate3.nuspec b/build/prep/StringTemplate3.nuspec index 46ce81f..49d5299 100644 --- a/build/prep/StringTemplate3.nuspec +++ b/build/prep/StringTemplate3.nuspec @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 3.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st3 stringtemplate3 template</tags> <title>StringTemplate 3</title> <summary>The C# port of StringTemplate 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST3\Antlr3.StringTemplate.dll" target="lib\net35-client"/> <file src="ST3\Antlr3.StringTemplate.pdb" target="lib\net35-client"/> <file src="ST3\Antlr3.StringTemplate.xml" target="lib\net35-client"/> <!-- Source Code --> <file exclude="..\..\Antlr3.StringTemplate\obj\**\*.cs" src="..\..\Antlr3.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr3.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr3.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> </files> </package> diff --git a/build/prep/StringTemplate4.Visualizer.nuspec b/build/prep/StringTemplate4.Visualizer.nuspec index a75bae3..0bd5cff 100644 --- a/build/prep/StringTemplate4.Visualizer.nuspec +++ b/build/prep/StringTemplate4.Visualizer.nuspec @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4.Visualizer</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>Provides the visualizer runtime for StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 stviz template</tags> <title>StringTemplate 4 Visualizer</title> <summary>Provides the visualizer runtime for StringTemplate 4.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="StringTemplate4" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST4\Antlr4.StringTemplate.Visualizer.dll" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.Visualizer.xml" target="lib\net35-client"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate.Visualizer\obj\**\*.cs" src="..\..\Antlr4.StringTemplate.Visualizer\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\**\*.xaml" target="src"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> </files> </package> diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index 18c3f02..f9a6cc8 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> + <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> <group targetFramework="net35-client"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> </group> <group targetFramework="netstandard1.3"> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.cs" target="src\obj\netstandard\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.tokens" target="src\obj\netstandard\$Configuration$"/> </files> </package> diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 0df0e36..7f7e2b3 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,265 +1,265 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '14.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If ($Logger) { $LoggerArgument = "/logger:$Logger" } # Restore packages .\NuGet.exe update -self .\NuGet.exe restore $SolutionPath &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" -copy "LICENSE.txt" ".\Runtime" +copy "..\..\LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" -copy "LICENSE.txt" ".\Tool" +copy "..\..\LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" -copy "LICENSE.txt" ".\ST3" +copy "..\..\LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" -copy "LICENSE.txt" ".\ST4" +copy "..\..\LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-dev" $STVersion = "4.0.8.0-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
69dce9ebd013a23ae6a9b64a23fd76d091a3f928
Add documentation links to top-level readme
diff --git a/README.md b/README.md index a13220f..435ca19 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,25 @@ # ANTLR 3 C# Target [![Join the chat at https://gitter.im/antlr/antlrcs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/antlr/antlrcs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build status](https://ci.appveyor.com/api/projects/status/x21gyx4ikxsa9n3t/branch/master?svg=true)](https://ci.appveyor.com/project/sharwell/antlrcs/branch/master) This repository contains C# versions of 3 major projects, some of which have multiple build artifacts: * ANTLR 3 * [Antlr3](https://www.nuget.org/packages/Antlr3): Code generator for ANTLR 3 * [Antlr3.Runtime](https://www.nuget.org/packages/Antlr3.Runtime): Runtime library for ANTLR 3 * [Antlr3.Runtime.Debug](https://www.nuget.org/packages/Antlr3.Runtime.Debug): Runtime library debugging tools for ANTLR 3 * StringTemplate 3 * [StringTemplate3](https://www.nuget.org/packages/StringTemplate3): Runtime library * StringTemplate 4 * [StringTemplate4](https://www.nuget.org/packages/StringTemplate4): Runtime library * [StringTemplate4.Visualizer](https://www.nuget.org/packages/StringTemplate4.Visualizer): WPF visualizer for rendering StringTemplate 4 templates + +## Documentation + +The following pages provide documentation for this project: + +* [Visual Studio and the ANTLR C# Target](doc/README.md) +* [ANTLR v3 Home](http://www.antlr3.org) +* [StringTemplate Home](http://www.stringtemplate.org/) diff --git a/doc/README.md b/doc/README.md index 6d385bf..7f63db0 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,378 +1,380 @@ # Visual Studio and the ANTLR C# Target +:warning: This document was written several years ago, and sections may be out of date. + ## Introduction This document gives a basic overview of using ANTLR and its CSharp2 or CSharp3 target with C# projects in Visual Studio. ### Visual Studio 2010 Support for ANTLR 3 Grammars The following extension for Visual Studio 2010 offers preliminary support for ANTLR grammars. This is an early release of this tool, so I value any feedback you may have. The tool offers the following features. * Syntax highlighting (Figure 1) * Editor navigation bar (Figure 2) * QuickInfo tooltips (Figure 3) * Auto-completion (Figure 4) * Project item templates for lexer, parser, combined, and tree grammars (Figure 5). These templates **DO NOT** perform steps 1.2 to 1.5, so you'll need to manually do that first. The templates **DO** take care of the steps in section 2 automatically. * StringTemplate 4 support (Figure 6) #### Note for Existing Users If you previously downloaded and installed a release of these tools *before* they were added to the Visual Studio Gallery, you'll need to manually uninstall them before installing the latest versions. In the future, upgrades to versions you download from the Visual Studio Gallery should work automatically without requiring a manual uninstall. If you need to manually uninstall the old extensions, you can find them in the Visual Studio Extension Manager with the following names: * ANTLR Language Support * StringTemplate 4 Language Support * Visual Studio Extensibility Framework #### Download Links The extensions can be downloaded from the Visual Studio Gallery. * Tunnel Vision Labs' ANTLR 3 Language Support for Visual Studio 2010 http://visualstudiogallery.msdn.microsoft.com/25b991db-befd-441b-b23b-bb5f8d07ee9f * Tunnel Vision Labs' StringTemplate 4 Language Support for Visual Studio 2010 http://visualstudiogallery.msdn.microsoft.com/5ca30e58-96b4-4edf-b95e-3030daf474ff ![Syntax highlighting for ANTLR grammars](AntlrHighlighting.png) Figure 1. Syntax highlighting for ANTLR grammars ![Editor navigation bars for parser and lexer rules](AntlrEditorNavigation.png) Figure 2. Editor navigation bars for parser and lexer rules ![QuickInfo tooltips for ANTLR v3 grammars](AntlrQuickInfo.png) Figure 3. QuickInfo tooltips for ANTLR v3 grammars ![IntelliSense autocomplete for ANTLR v3 grammars](AntlrCompletion.png) Figure 4. IntelliSense autocomplete for ANTLR v3 grammars ![ANTLR project item templates for Visual C# projects](AntlrTemplates.png) Figure 5. ANTLR project item templates for Visual C# projects ![StringTemplate support](StringTemplateSupport.png) Figure 6. StringTemplate support ### Base Project Layout * C:\dev\CoolTool\ * CoolProject\ * CoolProject.csproj * CoolTool.sln ### Adding ANTLR to the Project Structure 1. Download either the "Bootstrap" or "Tool" ANTLR C# port from the following location: http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases 2. Extract the files to C:\dev\CoolTool\Reference\Antlr. After these steps, your folder should resemble the following. * C:\dev\CoolTool\ * CoolProject\... * Reference\ * Antlr\ * CodeGen\... * Targets\... * Tool\... * Antlr3.exe * Antlr3.exe.config * ... * CoolTool.sln ### MSBuild Support for ANTLR Since the steps include manual modification of the Visual Studio project files, I ***very strongly*** recommend you back up your project before attempting this (whether or not you are already comfortable with editing these files). 1. Open CoolTool.sln 2. Unload the CoolProject project (by right-clicking the project in Solution Explorer and selecting Unload Project) 3. Open CoolProject.csproj for editing (by right-clicking the unloaded project in Solution Explorer and selecting Edit CoolProject.csproj) 4. For reference, locate the following line: ```xml <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ``` 5. After the line in step 4, add the code from Figure 6, below. 6. Save and close CoolProject.csproj. 7. Reload the CoolProject project (by right-clicking the project in Solution Explorer and selecting Reload Project). ```xml <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\Reference\Antlr</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\Reference\Antlr\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\Reference\Antlr\Antlr3.targets" /> ``` Figure 7. MSBuild targets file reference ### Adding a Reference to the CSharp3 Runtime 1. In the CoolProject project, add a reference to Antlr3.Runtime.dll, which is located at "C:\dev\CoolTool\Reference\Antlr\Antlr3.Runtime.dll" ## Grammars The generated classes are declared with the `partial` specifier, which encourages clean separation of the grammar's rules and helper code. When used with Visual Studio, this configuration also enables the IDE's C# features. The following table summarizes the files which get added to the project based on the type of grammar you are writing. | Grammar Type | Declaration | Project Files | | --- | --- | --- | | **Lexer** | lexer grammar T; | T.g3<br>T.g3.cs | | **Parser** | parser grammar T; | T.g3<br>T.g3.cs | | **Combined (Lexer and Parser)** | grammar T; | T.g3<br>T.g3.lexer.cs<br>T.g3.parser.cs | | **Tree** | tree grammar T; | T.g3<br>T.g3.cs | Table 1. User-created files by grammar type ### Building Grammars with the Project After adding a grammar T.g3 to the project, the following steps set the build action. 1. Right click the file T.g3 in Solution Explorer and select Properties. 2. In the Properties pane, set the Build Action to `Antlr3`. ## Custom Token Specifications (*.tokens) The `tokenVocab` grammar option tells ANTLR to import tokens from a particular file. Normally, this file is automatically generated while compiling another grammar from the same project, so there is no need to locate it and add it to the project. However, if your grammar depends on a particular tokens file that is not generated by a grammar in the same project, you'll need to include the file in your build. After you add the tokens file to your project, set its Build Action to `AntlrTokens` to make it available as other grammars in your project are compiled. ## Generated Code ### Rules #### Return Values The following table summarizes the return types from rules. | Output option | Rule "returns" spec | Parser grammar | Tree grammar | | --- | --- | --- | --- | | None | None | void | void | | None | int x | int | int | | None | int x, int y | class ruleName\_return | class ruleName\_return | | AST | None | AstParserRuleReturnScope | AstTreeRuleReturnScope | | AST | int x | class ruleName\_return | class ruleName\_return | | AST | int x, int y | class ruleName\_return | class ruleName\_return | | Template | None | TemplateParserRuleReturnScope | TemplateTreeRuleReturnScope | | Template | int x | class ruleName\_return | class ruleName\_return | | Template | int x, int y | class ruleName\_return | class ruleName\_return | ## Extra Features in the C# Targets ### Grammar Accessibility Modifiers By default, grammar classes are generated as `public`. This may be changed by explicitly specifying the `modifier`. The default constructors are also generated as `public`, but may be changed by explicitly specifying the `ctorModifier`. ```antlr grammar MyGrammar; options { language=CSharp3; } @modifier{internal} @ctorModifier{private} ``` ### Rule Accessibility Modifiers With the exception of lexer rules, an accessibility modifier may be added to each rule. The available modifiers are `public`, `protected`, and `private`, with a default of `private`.¹ The rule accessibility is included in the generated code. ```antlr public rule1 : /*...*/ ; protected rule2 : /*...*/ ; private rule3 : /*...*/ ; rule4 : /*...*/ ; // same as private ``` ¹ Due to a limitation in the ANTLR Tool itself, `internal` is not currently available as an accessibility modifier. ### Tree Adaptor Initialization (CSharp3 only) A partial method `CreateTreeAdaptor` is generated, which allows the user to specify custom logic for initializing the tree adaptor. ```csharp partial void CreateTreeAdaptor(ref ITreeAdaptor adaptor) { adaptor = new CommonTreeAdaptor(); } ``` Figure 8. CreateTreeAdaptor for custom adaptors ### Grammar Construction (CSharp3 only) The following partial method is called while constructing the parser instance. ```csharp partial void OnCreated(); ``` ### Rule Entry and Exit (CSharp3 only) The following methods are called at the entry and exit of every rule. ```csharp partial void EnterRule(string ruleName, int ruleIndex); partial void LeaveRule(string ruleName, int ruleIndex); ``` Entry and exit partial methods are also generated for each rule *rule*: ```csharp partial void EnterRule_rule(); partial void LeaveRule_rule(); ``` ### Dynamic Attribute Scope Construction, Entry and Exit (CSharp3 only) Dynamic attribute scope classes are also declared with the `partial` specifier. The constructor for these scopes calls the partial method `OnCreated`, which can be implemented as follows. ```csharp partial class GrammarName { partial class GlobalScopeName_scope { partial void OnCreated(GrammarName grammar) { // called when the scope is created, before it’s pushed to the scope stack } } } ``` After a scope is pushed to the scope stack, the partial method `ScopeName_scopeInit` is called. Likewise, the partial method `ScopeName_scopeAfter` is called immediately before the scope is popped from the stack. ```csharp partial class GrammarName { partial void GlobalScopeName_scopeInit(GlobalScopeName_scope scope) { // called immediately after the scope is pushed to the scope stack } partial void GlobalScopeName_scopeAfter(GlobalScopeName_scope scope) { // called immediately before the scope is popped from the scope stack } } ``` ### Rule Return Values (CSharp3 only) Parser rules with multiple return values return a generated class. This class is generated with the `partial` specifier, and includes a constructor which calls the partial method `OnCreated`. ```csharp partial class GrammarName { partial class RuleName_return { partial void OnCreated(GrammarName grammar) { // called when the return value is initialized } } } ``` ### Extended AST Operators Release 3.4 of the CSharp2 and CSharp3 targets include some extended features for AST operators. These features allow the use of the more efficient AST operator syntax in several common cases that previously required rewrite syntax. ```antlr // rewrite syntax rule : LPAREN elements RPAREN -> ^(VALUE[$LPAREN] elements) ; // Short extended AST syntax (Only works when generating code with Antlr3.exe) rule : LPAREN<VALUE>^ elements RPAREN! ; // Full extended AST syntax (Works when using the Antlr3.exe or the Java version of the Tool) rule2 : LPAREN<ttype=VALUE>^ elements RPAREN! ; ``` Figure 9. Specifying the Type property of an AST node ```antlr // rewrite syntax rule : LPAREN elements RPAREN -> ^(VALUE[$LPAREN, "value"] elements) ; // Extended AST syntax rule : LPAREN<ttype=VALUE; text="value">^ elements RPAREN! ; ``` Figure 10. Specifying the Type and Text properties of an AST node ## Example Grammars ### Combined Grammar ```antlr grammar T; options { language=CSharp3; TokenLabelType=CommonToken; // Specifies the token type for parsers output=AST; // Specify AST creation ASTLabelType=CommonTree; // Specify tree node type for AST output } @lexer::namespace {CoolTool.CoolProject.Compiler} @parser::namespace {CoolTool.CoolProject.Compiler} // PARSER // public compileUnit : /*...*/ EOF ; // LEXER // IDENTIFIER : ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '0'..'9' | '_')* ; ``` Figure 11. Combined grammar T.g ```csharp namespace CoolTool.CoolProject.Compiler { partial class TLexer { } } ``` Figure 12. Lexer helper file TLexerHelper.cs ```csharp namespace CoolTool.CoolProject.Compiler { partial class TParser { } } ``` Figure 13. Parser helper file TParserHelper.cs
antlr/antlrcs
42054b5054420435efae52ca958f1b7cde39e427
Add LICENSE.txt
diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..0cd1bab --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,27 @@ +[The "BSD license"] +Copyright (c) 2010 The ANTLR Project +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
antlr/antlrcs
58ce086c78e4fe71081d31a55d9a9813532fc466
Convert user documentation to Markdown
diff --git a/ANTLRCSharpDocumentation.docx b/ANTLRCSharpDocumentation.docx deleted file mode 100644 index 5b3e977..0000000 Binary files a/ANTLRCSharpDocumentation.docx and /dev/null differ diff --git a/doc/AntlrCompletion.png b/doc/AntlrCompletion.png new file mode 100644 index 0000000..1c832b0 Binary files /dev/null and b/doc/AntlrCompletion.png differ diff --git a/doc/AntlrEditorNavigation.png b/doc/AntlrEditorNavigation.png new file mode 100644 index 0000000..bf63a73 Binary files /dev/null and b/doc/AntlrEditorNavigation.png differ diff --git a/doc/AntlrHighlighting.png b/doc/AntlrHighlighting.png new file mode 100644 index 0000000..d95ed0d Binary files /dev/null and b/doc/AntlrHighlighting.png differ diff --git a/doc/AntlrQuickInfo.png b/doc/AntlrQuickInfo.png new file mode 100644 index 0000000..f8795cb Binary files /dev/null and b/doc/AntlrQuickInfo.png differ diff --git a/doc/AntlrTemplates.png b/doc/AntlrTemplates.png new file mode 100644 index 0000000..3013577 Binary files /dev/null and b/doc/AntlrTemplates.png differ diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..6d385bf --- /dev/null +++ b/doc/README.md @@ -0,0 +1,378 @@ +# Visual Studio and the ANTLR C# Target + +## Introduction + +This document gives a basic overview of using ANTLR and its CSharp2 or CSharp3 target with C# projects in Visual Studio. + +### Visual Studio 2010 Support for ANTLR 3 Grammars + +The following extension for Visual Studio 2010 offers preliminary support for ANTLR grammars. This is an early release +of this tool, so I value any feedback you may have. The tool offers the following features. + +* Syntax highlighting (Figure 1) +* Editor navigation bar (Figure 2) +* QuickInfo tooltips (Figure 3) +* Auto-completion (Figure 4) +* Project item templates for lexer, parser, combined, and tree grammars (Figure 5). These templates **DO NOT** perform + steps 1.2 to 1.5, so you'll need to manually do that first. The templates **DO** take care of the steps in section 2 + automatically. +* StringTemplate 4 support (Figure 6) + +#### Note for Existing Users + +If you previously downloaded and installed a release of these tools *before* they were added to the Visual Studio +Gallery, you'll need to manually uninstall them before installing the latest versions. In the future, upgrades to +versions you download from the Visual Studio Gallery should work automatically without requiring a manual uninstall. If +you need to manually uninstall the old extensions, you can find them in the Visual Studio Extension Manager with the +following names: + +* ANTLR Language Support +* StringTemplate 4 Language Support +* Visual Studio Extensibility Framework + +#### Download Links + +The extensions can be downloaded from the Visual Studio Gallery. + +* Tunnel Vision Labs' ANTLR 3 Language Support for Visual Studio 2010 + http://visualstudiogallery.msdn.microsoft.com/25b991db-befd-441b-b23b-bb5f8d07ee9f +* Tunnel Vision Labs' StringTemplate 4 Language Support for Visual Studio 2010 + http://visualstudiogallery.msdn.microsoft.com/5ca30e58-96b4-4edf-b95e-3030daf474ff + +![Syntax highlighting for ANTLR grammars](AntlrHighlighting.png) + +Figure 1. Syntax highlighting for ANTLR grammars + +![Editor navigation bars for parser and lexer rules](AntlrEditorNavigation.png) + +Figure 2. Editor navigation bars for parser and lexer rules + +![QuickInfo tooltips for ANTLR v3 grammars](AntlrQuickInfo.png) + +Figure 3. QuickInfo tooltips for ANTLR v3 grammars + +![IntelliSense autocomplete for ANTLR v3 grammars](AntlrCompletion.png) + +Figure 4. IntelliSense autocomplete for ANTLR v3 grammars + +![ANTLR project item templates for Visual C# projects](AntlrTemplates.png) + +Figure 5. ANTLR project item templates for Visual C# projects + +![StringTemplate support](StringTemplateSupport.png) + +Figure 6. StringTemplate support + +### Base Project Layout + +* C:\dev\CoolTool\ + * CoolProject\ + * CoolProject.csproj + * CoolTool.sln + +### Adding ANTLR to the Project Structure + +1. Download either the "Bootstrap" or "Tool" ANTLR C# port from the following location: + http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases +2. Extract the files to C:\dev\CoolTool\Reference\Antlr. + +After these steps, your folder should resemble the following. + +* C:\dev\CoolTool\ + * CoolProject\... + * Reference\ + * Antlr\ + * CodeGen\... + * Targets\... + * Tool\... + * Antlr3.exe + * Antlr3.exe.config + * ... + * CoolTool.sln + +### MSBuild Support for ANTLR + +Since the steps include manual modification of the Visual Studio project files, I ***very strongly*** recommend you back +up your project before attempting this (whether or not you are already comfortable with editing these files). + +1. Open CoolTool.sln +2. Unload the CoolProject project (by right-clicking the project in Solution Explorer and selecting Unload Project) +3. Open CoolProject.csproj for editing (by right-clicking the unloaded project in Solution Explorer and selecting Edit + CoolProject.csproj) +4. For reference, locate the following line: + + ```xml + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + ``` + +5. After the line in step 4, add the code from Figure 6, below. +6. Save and close CoolProject.csproj. +7. Reload the CoolProject project (by right-clicking the project in Solution Explorer and selecting Reload Project). + +```xml +<PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(ProjectDir)..\Reference\Antlr</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(ProjectDir)..\Reference\Antlr\Antlr3.exe</AntlrToolPath> +</PropertyGroup> +<Import Project="$(ProjectDir)..\Reference\Antlr\Antlr3.targets" /> +``` +Figure 7. MSBuild targets file reference + +### Adding a Reference to the CSharp3 Runtime + +1. In the CoolProject project, add a reference to Antlr3.Runtime.dll, which is located at + "C:\dev\CoolTool\Reference\Antlr\Antlr3.Runtime.dll" + +## Grammars + +The generated classes are declared with the `partial` specifier, which encourages clean separation of the grammar's +rules and helper code. When used with Visual Studio, this configuration also enables the IDE's C# features. The +following table summarizes the files which get added to the project based on the type of grammar you are writing. + +| Grammar Type | Declaration | Project Files | +| --- | --- | --- | +| **Lexer** | lexer grammar T; | T.g3<br>T.g3.cs | +| **Parser** | parser grammar T; | T.g3<br>T.g3.cs | +| **Combined (Lexer and Parser)** | grammar T; | T.g3<br>T.g3.lexer.cs<br>T.g3.parser.cs | +| **Tree** | tree grammar T; | T.g3<br>T.g3.cs | + +Table 1. User-created files by grammar type + +### Building Grammars with the Project + +After adding a grammar T.g3 to the project, the following steps set the build action. + +1. Right click the file T.g3 in Solution Explorer and select Properties. +2. In the Properties pane, set the Build Action to `Antlr3`. + +## Custom Token Specifications (*.tokens) + +The `tokenVocab` grammar option tells ANTLR to import tokens from a particular file. Normally, this file is +automatically generated while compiling another grammar from the same project, so there is no need to locate it and add +it to the project. However, if your grammar depends on a particular tokens file that is not generated by a grammar in +the same project, you'll need to include the file in your build. After you add the tokens file to your project, set its +Build Action to `AntlrTokens` to make it available as other grammars in your project are compiled. + +## Generated Code + +### Rules + +#### Return Values + +The following table summarizes the return types from rules. + +| Output option | Rule "returns" spec | Parser grammar | Tree grammar | +| --- | --- | --- | --- | +| None | None | void | void | +| None | int x | int | int | +| None | int x, int y | class ruleName\_return | class ruleName\_return | +| AST | None | AstParserRuleReturnScope | AstTreeRuleReturnScope | +| AST | int x | class ruleName\_return | class ruleName\_return | +| AST | int x, int y | class ruleName\_return | class ruleName\_return | +| Template | None | TemplateParserRuleReturnScope | TemplateTreeRuleReturnScope | +| Template | int x | class ruleName\_return | class ruleName\_return | +| Template | int x, int y | class ruleName\_return | class ruleName\_return | + +## Extra Features in the C# Targets + +### Grammar Accessibility Modifiers + +By default, grammar classes are generated as `public`. This may be changed by explicitly specifying the `modifier`. The +default constructors are also generated as `public`, but may be changed by explicitly specifying the `ctorModifier`. + +```antlr +grammar MyGrammar; + +options { + language=CSharp3; +} + +@modifier{internal} +@ctorModifier{private} +``` + +### Rule Accessibility Modifiers + +With the exception of lexer rules, an accessibility modifier may be added to each rule. The available modifiers are +`public`, `protected`, and `private`, with a default of `private`.¹ The rule accessibility is included in the generated +code. + +```antlr +public rule1 : /*...*/ ; +protected rule2 : /*...*/ ; +private rule3 : /*...*/ ; + +rule4 : /*...*/ ; // same as private +``` + +¹ Due to a limitation in the ANTLR Tool itself, `internal` is not currently available as an accessibility modifier. + +### Tree Adaptor Initialization (CSharp3 only) + +A partial method `CreateTreeAdaptor` is generated, which allows the user to specify custom logic for initializing the +tree adaptor. + +```csharp +partial void CreateTreeAdaptor(ref ITreeAdaptor adaptor) { + adaptor = new CommonTreeAdaptor(); +} +``` +Figure 8. CreateTreeAdaptor for custom adaptors + +### Grammar Construction (CSharp3 only) + +The following partial method is called while constructing the parser instance. + +```csharp +partial void OnCreated(); +``` + +### Rule Entry and Exit (CSharp3 only) + +The following methods are called at the entry and exit of every rule. + +```csharp +partial void EnterRule(string ruleName, int ruleIndex); +partial void LeaveRule(string ruleName, int ruleIndex); +``` + +Entry and exit partial methods are also generated for each rule *rule*: + +```csharp +partial void EnterRule_rule(); +partial void LeaveRule_rule(); +``` + +### Dynamic Attribute Scope Construction, Entry and Exit (CSharp3 only) + +Dynamic attribute scope classes are also declared with the `partial` specifier. The constructor for these scopes calls +the partial method `OnCreated`, which can be implemented as follows. + +```csharp +partial class GrammarName { + partial class GlobalScopeName_scope { + partial void OnCreated(GrammarName grammar) { + // called when the scope is created, before it’s pushed to the scope stack + } + } +} +``` + +After a scope is pushed to the scope stack, the partial method `ScopeName_scopeInit` is called. Likewise, the partial +method `ScopeName_scopeAfter` is called immediately before the scope is popped from the stack. + +```csharp +partial class GrammarName { + partial void GlobalScopeName_scopeInit(GlobalScopeName_scope scope) { + // called immediately after the scope is pushed to the scope stack + } + partial void GlobalScopeName_scopeAfter(GlobalScopeName_scope scope) { + // called immediately before the scope is popped from the scope stack + } +} +``` + +### Rule Return Values (CSharp3 only) + +Parser rules with multiple return values return a generated class. This class is generated with the `partial` specifier, +and includes a constructor which calls the partial method `OnCreated`. + +```csharp +partial class GrammarName { + partial class RuleName_return { + partial void OnCreated(GrammarName grammar) { + // called when the return value is initialized + } + } +} +``` + +### Extended AST Operators + +Release 3.4 of the CSharp2 and CSharp3 targets include some extended features for AST operators. These features allow +the use of the more efficient AST operator syntax in several common cases that previously required rewrite syntax. + +```antlr +// rewrite syntax +rule + : LPAREN elements RPAREN + -> ^(VALUE[$LPAREN] elements) + ; + +// Short extended AST syntax (Only works when generating code with Antlr3.exe) +rule + : LPAREN<VALUE>^ elements RPAREN! + ; + +// Full extended AST syntax (Works when using the Antlr3.exe or the Java version of the Tool) +rule2 + : LPAREN<ttype=VALUE>^ elements RPAREN! + ; +``` +Figure 9. Specifying the Type property of an AST node + +```antlr +// rewrite syntax +rule + : LPAREN elements RPAREN + -> ^(VALUE[$LPAREN, "value"] elements) + ; + +// Extended AST syntax +rule + : LPAREN<ttype=VALUE; text="value">^ elements RPAREN! + ; +``` +Figure 10. Specifying the Type and Text properties of an AST node + +## Example Grammars + +### Combined Grammar + +```antlr +grammar T; + +options { + language=CSharp3; + TokenLabelType=CommonToken; // Specifies the token type for parsers + output=AST; // Specify AST creation + ASTLabelType=CommonTree; // Specify tree node type for AST output +} + +@lexer::namespace {CoolTool.CoolProject.Compiler} +@parser::namespace {CoolTool.CoolProject.Compiler} + +// PARSER +// + +public +compileUnit + : /*...*/ EOF + ; + +// LEXER +// + +IDENTIFIER + : ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '0'..'9' | '_')* + ; +``` +Figure 11. Combined grammar T.g + +```csharp +namespace CoolTool.CoolProject.Compiler { + partial class TLexer { + } +} +``` +Figure 12. Lexer helper file TLexerHelper.cs + +```csharp +namespace CoolTool.CoolProject.Compiler { + partial class TParser { + } +} +``` +Figure 13. Parser helper file TParserHelper.cs diff --git a/doc/StringTemplateSupport.png b/doc/StringTemplateSupport.png new file mode 100644 index 0000000..85fe031 Binary files /dev/null and b/doc/StringTemplateSupport.png differ
antlr/antlrcs
c04a81ab8ce55d4485af32a37fad778429890579
Fix NuGet dependencies for ST4 package
diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index 2ff057e..18c3f02 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,45 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> - <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + <group targetFramework="net35-client"> + <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + </group> <group targetFramework="netstandard1.3"> + <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.cs" target="src\obj\netstandard\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.tokens" target="src\obj\netstandard\$Configuration$"/> </files> </package>
antlr/antlrcs
df669df2f6c63d5366651cb801c1ff8298dbca81
Add distribution information to README.md
diff --git a/README.md b/README.md index 670da76..a13220f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # ANTLR 3 C# Target [![Join the chat at https://gitter.im/antlr/antlrcs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/antlr/antlrcs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build status](https://ci.appveyor.com/api/projects/status/x21gyx4ikxsa9n3t/branch/master?svg=true)](https://ci.appveyor.com/project/sharwell/antlrcs/branch/master) + +This repository contains C# versions of 3 major projects, some of which have multiple build artifacts: + +* ANTLR 3 + * [Antlr3](https://www.nuget.org/packages/Antlr3): Code generator for ANTLR 3 + * [Antlr3.Runtime](https://www.nuget.org/packages/Antlr3.Runtime): Runtime library for ANTLR 3 + * [Antlr3.Runtime.Debug](https://www.nuget.org/packages/Antlr3.Runtime.Debug): Runtime library debugging tools for ANTLR 3 +* StringTemplate 3 + * [StringTemplate3](https://www.nuget.org/packages/StringTemplate3): Runtime library +* StringTemplate 4 + * [StringTemplate4](https://www.nuget.org/packages/StringTemplate4): Runtime library + * [StringTemplate4.Visualizer](https://www.nuget.org/packages/StringTemplate4.Visualizer): WPF visualizer for rendering StringTemplate 4 templates
antlr/antlrcs
fe6e6e0fdb9f4d30a49573cedd43c7ac2ae52456
Fix internal definition of OnSerializingAttribute
diff --git a/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs b/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs index a14e6c6..e6a913c 100644 --- a/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs +++ b/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs @@ -1,11 +1,14 @@ #if NETSTANDARD namespace System.Runtime.Serialization { + using System.Diagnostics; + + [Conditional("DO_NOT_COMPILE")] [AttributeUsage(AttributeTargets.Method, Inherited = false)] internal sealed class OnSerializingAttribute : Attribute { } } #endif
antlr/antlrcs
e6b2669afd174223e3f38304467a96dc6a807946
Use CreateShadow instead of CreateStringTemplateInternally
diff --git a/Antlr4.StringTemplate/Interpreter.cs b/Antlr4.StringTemplate/Interpreter.cs index 594ad8a..2f01bf4 100644 --- a/Antlr4.StringTemplate/Interpreter.cs +++ b/Antlr4.StringTemplate/Interpreter.cs @@ -487,1025 +487,1025 @@ namespace Antlr4.StringTemplate case Bytecode.INSTR_DEDENT: @out.PopIndentation(); break; case Bytecode.INSTR_NEWLINE: try { if (prevOpcode == Bytecode.INSTR_NEWLINE || prevOpcode == Bytecode.INSTR_INDENT || nwline > 0) { @out.Write(Environment.NewLine); } nwline = 0; } catch (IOException ioe) { _errorManager.IOError(self, ErrorType.WRITE_IO_ERROR, ioe); } break; case Bytecode.INSTR_NOOP: break; case Bytecode.INSTR_POP: sp--; // throw away top of stack break; case Bytecode.INSTR_NULL: operands[++sp] = null; break; case Bytecode.INSTR_TRUE: operands[++sp] = true; break; case Bytecode.INSTR_FALSE: operands[++sp] = false; break; case Bytecode.INSTR_WRITE_STR: strIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = self.impl.strings[strIndex]; n1 = WriteObjectNoOptions(@out, frame, o); n += n1; nwline += n1; break; // TODO: generate this optimization //case Bytecode.INSTR_WRITE_LOCAL: // valueIndex = GetShort(code, ip); // ip += Instruction.OperandSizeInBytes; // o = self.locals[valueIndex]; // if (o == Template.EmptyAttribute) // o = null; // n1 = WriteObjectNoOptions(@out, frame, o); // n += n1; // nwline += n1; // break; default: _errorManager.InternalError(self, "invalid bytecode @ " + (ip - 1) + ": " + opcode, null); self.impl.Dump(); break; } prevOpcode = opcode; } if (_debug) { EvalTemplateEvent e = new EvalTemplateEvent(frame, Interval.FromBounds(start, @out.Index)); TrackDebugEvent(frame, e); } return n; } // TODO: refactor to Remove dup'd code internal virtual void SuperNew(TemplateFrame frame, string name, int nargs) { Template self = frame.Template; Template st = null; CompiledTemplate imported = self.impl.NativeGroup.LookupImportedTemplate(name); if (imported == null) { _errorManager.RuntimeError(frame, ErrorType.NO_IMPORTED_TEMPLATE, name); st = self.Group.CreateStringTemplateInternally(new CompiledTemplate()); } else { st = imported.NativeGroup.GetEmbeddedInstanceOf(frame, name); st.Group = group; } // get n args and store into st's attr list StoreArguments(frame, nargs, st); sp -= nargs; operands[++sp] = st; } internal virtual void SuperNew(TemplateFrame frame, string name, IDictionary<string, object> attrs) { Template self = frame.Template; Template st = null; CompiledTemplate imported = self.impl.NativeGroup.LookupImportedTemplate(name); if (imported == null) { _errorManager.RuntimeError(frame, ErrorType.NO_IMPORTED_TEMPLATE, name); st = self.Group.CreateStringTemplateInternally(new CompiledTemplate()); } else { st = imported.NativeGroup.CreateStringTemplateInternally(imported); st.Group = group; } // get n args and store into st's attr list StoreArguments(frame, attrs, st); operands[++sp] = st; } internal virtual void PassThrough(TemplateFrame frame, string templateName, IDictionary<string, object> attrs) { CompiledTemplate c = group.LookupTemplate(templateName); if (c == null) return; // will get error later if (c.FormalArguments == null) return; foreach (FormalArgument arg in c.FormalArguments) { // if not already set by user, set to value from outer scope if (!attrs.ContainsKey(arg.Name)) { //System.out.println("arg "+arg.name+" missing"); try { object o = GetAttribute(frame, arg.Name); // If the attribute exists but there is no value and // the formal argument has no default value, make it null. if (o == Template.EmptyAttribute && arg.DefaultValueToken == null) { attrs[arg.Name] = null; } // Else, the attribute has an existing value, set arg. else if (o != Template.EmptyAttribute) { attrs[arg.Name] = o; } } catch (AttributeNotFoundException) { // if no such attribute exists for arg.name, set parameter // if no default value if (arg.DefaultValueToken == null) { _errorManager.RuntimeError(frame, ErrorType.NO_SUCH_ATTRIBUTE_PASS_THROUGH, arg.Name); attrs[arg.Name] = null; } } } } } internal virtual void StoreArguments(TemplateFrame frame, IDictionary<string, object> attrs, Template st) { bool noSuchAttributeReported = false; if (attrs != null) { foreach (KeyValuePair<string, object> argument in attrs) { if (!st.impl.HasFormalArgs) { if (st.impl.FormalArguments == null || st.impl.TryGetFormalArgument(argument.Key) == null) { // we clone the CompiledTemplate to prevent modifying the original // _formalArguments map during interpretation. st.impl = st.impl.Clone(); st.Add(argument.Key, argument.Value); } else { st.RawSetAttribute(argument.Key, argument.Value); } } else { // don't let it throw an exception in RawSetAttribute if (st.impl.FormalArguments == null || st.impl.TryGetFormalArgument(argument.Key) == null) { noSuchAttributeReported = true; _errorManager.RuntimeError( frame, ErrorType.NO_SUCH_ATTRIBUTE, argument.Key); continue; } st.RawSetAttribute(argument.Key, argument.Value); } } } if (st.impl.HasFormalArgs) { bool argumentCountMismatch = false; var formalArguments = st.impl.FormalArguments; if (formalArguments == null) formalArguments = new List<FormalArgument>(); // first make sure that all non-default arguments are specified // ignore this check if a NO_SUCH_ATTRIBUTE error already occurred if (!noSuchAttributeReported) { foreach (FormalArgument formalArgument in formalArguments) { if (formalArgument.DefaultValueToken != null || formalArgument.DefaultValue != null) { // this argument has a default value, so it doesn't need to appear in attrs continue; } if (attrs == null || !attrs.ContainsKey(formalArgument.Name)) { argumentCountMismatch = true; break; } } } // next make sure there aren't too many arguments. note that the names // of arguments are checked below as they are applied to the template // instance, so there's no need to do that here. if (attrs != null && attrs.Count > formalArguments.Count) { argumentCountMismatch = true; } if (argumentCountMismatch) { int nargs = attrs != null ? attrs.Count : 0; int nformalArgs = formalArguments.Count; _errorManager.RuntimeError( frame, ErrorType.ARGUMENT_COUNT_MISMATCH, nargs, st.impl.Name, nformalArgs); } } } internal virtual void StoreArguments(TemplateFrame frame, int nargs, Template st) { if (nargs > 0 && !st.impl.HasFormalArgs && st.impl.FormalArguments == null) { st.Add(Template.ImplicitArgumentName, null); // pretend we have "it" arg } int nformalArgs = 0; if (st.impl.FormalArguments != null) nformalArgs = st.impl.FormalArguments.Count; int firstArg = sp - (nargs - 1); int numToStore = Math.Min(nargs, nformalArgs); if (st.impl.IsAnonSubtemplate) nformalArgs -= predefinedAnonSubtemplateAttributes.Length; if (nargs < (nformalArgs - st.impl.NumberOfArgsWithDefaultValues) || nargs > nformalArgs) { _errorManager.RuntimeError(frame, ErrorType.ARGUMENT_COUNT_MISMATCH, nargs, st.impl.Name, nformalArgs); } if (st.impl.FormalArguments == null) return; for (int i = 0; i < numToStore; i++) { object o = operands[firstArg + i]; string argName = st.impl.FormalArguments[i].Name; st.RawSetAttribute(argName, o); } } protected void Indent(ITemplateWriter @out, TemplateFrame frame, int strIndex) { Template self = frame.Template; string indent = self.impl.strings[strIndex]; if (_debug) { int start = @out.Index; // track char we're about to write EvalExprEvent e = new IndentEvent(frame, new Interval(start, indent.Length), GetExpressionInterval(frame)); TrackDebugEvent(frame, e); } @out.PushIndentation(indent); } /** Write out an expression result that doesn't use expression options. * E.g., &lt;name&gt; */ protected virtual int WriteObjectNoOptions(ITemplateWriter @out, TemplateFrame frame, object o) { int start = @out.Index; // track char we're about to Write int n = WriteObject(@out, frame, o, null); if (_debug) { Interval templateLocation = frame.Template.impl.sourceMap[frame.InstructionPointer]; EvalExprEvent e = new EvalExprEvent(frame, Interval.FromBounds(start, @out.Index), templateLocation); TrackDebugEvent(frame, e); } return n; } /** Write out an expression result that uses expression options. * E.g., &lt;names; separator=", "&gt; */ protected virtual int WriteObjectWithOptions(ITemplateWriter @out, TemplateFrame frame, object o, object[] options) { int start = @out.Index; // track char we're about to Write // precompute all option values (Render all the way to strings) string[] optionStrings = null; if (options != null) { optionStrings = new string[options.Length]; for (int i = 0; i < Compiler.TemplateCompiler.NUM_OPTIONS; i++) { optionStrings[i] = ToString(frame, options[i]); } } if (options != null && options[(int)RenderOption.Anchor] != null) { @out.PushAnchorPoint(); } int n = WriteObject(@out, frame, o, optionStrings); if (options != null && options[(int)RenderOption.Anchor] != null) { @out.PopAnchorPoint(); } if (_debug) { Interval templateLocation = frame.Template.impl.sourceMap[frame.InstructionPointer]; EvalExprEvent e = new EvalExprEvent(frame, Interval.FromBounds(start, @out.Index), templateLocation); TrackDebugEvent(frame, e); } return n; } /** Generic method to emit text for an object. It differentiates * between templates, iterable objects, and plain old Java objects (POJOs) */ protected virtual int WriteObject(ITemplateWriter @out, TemplateFrame frame, object o, string[] options) { int n = 0; if (o == null) { if (options != null && options[(int)RenderOption.Null] != null) o = options[(int)RenderOption.Null]; else return 0; } ITypeProxyFactory proxyFactory = frame.Template.Group.GetTypeProxyFactory(o.GetType()); if (proxyFactory != null) o = proxyFactory.CreateProxy(frame, o); System.Diagnostics.Debug.Assert(!(o is TemplateFrame)); Template template = o as Template; if (template != null) { frame = new TemplateFrame(template, frame); if (options != null && options[(int)RenderOption.Wrap] != null) { // if we have a wrap string, then inform writer it // might need to wrap try { @out.WriteWrap(options[(int)RenderOption.Wrap]); } catch (IOException ioe) { _errorManager.IOError(template, ErrorType.WRITE_IO_ERROR, ioe); } } n = Execute(@out, frame); } else { o = ConvertAnythingIteratableToIterator(frame, o); // normalize try { if (o is IEnumerator) n = WriteIterator(@out, frame, o, options); else n = WritePlainObject(@out, frame, o, options); } catch (IOException ioe) { _errorManager.IOError(frame.Template, ErrorType.WRITE_IO_ERROR, ioe, o); } } return n; } protected virtual int WriteIterator(ITemplateWriter @out, TemplateFrame frame, object o, string[] options) { if (o == null) return 0; int n = 0; IEnumerator it = (IEnumerator)o; string separator = null; if (options != null) separator = options[(int)RenderOption.Separator]; bool seenAValue = false; while (it.MoveNext()) { object iterValue = it.Current; // Emit separator if we're beyond first value bool needSeparator = seenAValue && separator != null && // we have a separator and (iterValue != null || // either we have a value options[(int)RenderOption.Null] != null); // or no value but null option if (needSeparator) n += @out.WriteSeparator(separator); int nw = WriteObject(@out, frame, iterValue, options); if (nw > 0) seenAValue = true; n += nw; } return n; } protected virtual int WritePlainObject(ITemplateWriter @out, TemplateFrame frame, object o, string[] options) { string formatString = null; if (options != null) formatString = options[(int)RenderOption.Format]; IAttributeRenderer r = frame.Template.impl.NativeGroup.GetAttributeRenderer(o.GetType()); string v; if (r != null) { v = r.ToString(o, formatString, culture); } else { if (o is bool) v = (bool)o ? "true" : "false"; else if (o is bool? && ((bool?)o).HasValue) v = ((bool?)o).Value ? "true" : "false"; else v = o.ToString(); } int n; if (options != null && options[(int)RenderOption.Wrap] != null) { n = @out.Write(v, options[(int)RenderOption.Wrap]); } else { n = @out.Write(v); } return n; } protected virtual Interval GetExpressionInterval(TemplateFrame frame) { return frame.Template.impl.sourceMap[frame.InstructionPointer]; } protected virtual void Map(TemplateFrame frame, object attr, Template st) { RotateMap(frame, attr, new List<Template>() { st }); } // <names:a()> or <names:a(),b()> protected virtual void RotateMap(TemplateFrame frame, object attr, List<Template> prototypes) { if (attr == null) { operands[++sp] = null; return; } attr = ConvertAnythingIteratableToIterator(frame, attr); IEnumerator iterator = attr as IEnumerator; if (iterator != null) { List<Template> mapped = RotateMapIterator(frame, iterator, prototypes); operands[++sp] = mapped; } else { // if only single value, just apply first template to sole value Template proto = prototypes[0]; - Template st = group.CreateStringTemplateInternally(proto); + Template st = proto.CreateShadow(); if (st != null) { SetFirstArgument(frame, st, attr); if (st.impl.IsAnonSubtemplate) { st.RawSetAttribute("i0", 0); st.RawSetAttribute("i", 1); } operands[++sp] = st; } else { operands[++sp] = null; } } } protected virtual List<Template> RotateMapIterator(TemplateFrame frame, IEnumerator iterator, List<Template> prototypes) { List<Template> mapped = new List<Template>(); int i0 = 0; int i = 1; int ti = 0; while (iterator.MoveNext()) { object iterValue = iterator.Current; if (iterValue == null) { mapped.Add(null); continue; } int templateIndex = ti % prototypes.Count; // rotate through ti++; Template proto = prototypes[templateIndex]; Template st = group.CreateStringTemplateInternally(proto); SetFirstArgument(frame, st, iterValue); if (st.impl.IsAnonSubtemplate) { st.RawSetAttribute("i0", i0); st.RawSetAttribute("i", i); } mapped.Add(st); i0++; i++; } return mapped; } // <names,phones:{n,p | ...}> or <a,b:t()> // todo: i, i0 not set unless mentioned? map:{k,v | ..}? protected virtual Template.AttributeList ZipMap(TemplateFrame frame, List<object> exprs, Template prototype) { Template self = frame.Template; if (exprs == null || prototype == null || exprs.Count == 0) { return null; // do not apply if missing templates or empty values } // make everything iterable for (int i = 0; i < exprs.Count; i++) { object attr = exprs[i]; if (attr != null) exprs[i] = ConvertAnythingToIterator(frame, attr); } // ensure arguments line up int numExprs = exprs.Count; CompiledTemplate code = prototype.impl; List<FormalArgument> formalArguments = code.FormalArguments; if (!code.HasFormalArgs || formalArguments == null) { _errorManager.RuntimeError(frame, ErrorType.MISSING_FORMAL_ARGUMENTS); return null; } // todo: track formal args not names for efficient filling of locals object[] formalArgumentNames = formalArguments.Select(i => i.Name).ToArray(); int nformalArgs = formalArgumentNames.Length; if (prototype.IsAnonymousSubtemplate) nformalArgs -= predefinedAnonSubtemplateAttributes.Length; if (nformalArgs != numExprs) { _errorManager.RuntimeError(frame, ErrorType.MAP_ARGUMENT_COUNT_MISMATCH, numExprs, nformalArgs); // TODO just fill first n // truncate arg list to match smaller size int shorterSize = Math.Min(formalArgumentNames.Length, numExprs); numExprs = shorterSize; Array.Resize(ref formalArgumentNames, shorterSize); } // keep walking while at least one attribute has values Template.AttributeList results = new Template.AttributeList(); int i2 = 0; // iteration number from 0 while (true) { // get a value for each attribute in list; put into Template instance int numEmpty = 0; Template embedded = group.CreateStringTemplateInternally(prototype); embedded.RawSetAttribute("i0", i2); embedded.RawSetAttribute("i", i2 + 1); for (int a = 0; a < numExprs; a++) { IEnumerator it = (IEnumerator)exprs[a]; if (it != null && it.MoveNext()) { string argName = (string)formalArgumentNames[a]; object iteratedValue = it.Current; embedded.RawSetAttribute(argName, iteratedValue); } else { numEmpty++; } } if (numEmpty == numExprs) break; results.Add(embedded); i2++; } return results; } protected virtual void SetFirstArgument(TemplateFrame frame, Template st, object attr) { if (!st.impl.HasFormalArgs) { if (st.impl.FormalArguments == null) { st.Add(Template.ImplicitArgumentName, attr); return; } // else fall thru to set locals[0] } if (st.impl.FormalArguments == null) { _errorManager.RuntimeError(frame, ErrorType.ARGUMENT_COUNT_MISMATCH, 1, st.impl.Name, 0); return; } st.locals[0] = attr; } protected virtual void AddToList(List<object> list, TemplateFrame frame, object o) { o = Interpreter.ConvertAnythingIteratableToIterator(frame, o); if (o is IEnumerator) { // copy of elements into our temp list IEnumerator it = (IEnumerator)o; while (it.MoveNext()) list.Add(it.Current); } else { list.Add(o); } } /** Return the first attribute if multiple valued or the attribute * itself if single-valued. Used in &lt;names:First()&gt; */ public virtual object First(TemplateFrame frame, object v) { if (v == null) return null; object r = v; v = ConvertAnythingIteratableToIterator(frame, v); if (v is IEnumerator) { IEnumerator it = (IEnumerator)v; if (it.MoveNext()) { r = it.Current; } } return r; } /** Return the last attribute if multiple valued or the attribute * itself if single-valued. Unless it's a list or array, this is pretty * slow as it iterates until the last element. */ public virtual object Last(TemplateFrame frame, object v) { if (v == null) return null; IList list = v as IList; if (list != null) return list[list.Count - 1]; object last = v; v = ConvertAnythingIteratableToIterator(frame, v); IEnumerator it = v as IEnumerator; if (it != null) { while (it.MoveNext()) last = it.Current; } return last; } /** Return everything but the first attribute if multiple valued * or null if single-valued. */ public virtual object Rest(TemplateFrame frame, object v) { if (v == null) return null; v = ConvertAnythingIteratableToIterator(frame, v); IEnumerator it = v as IEnumerator; if (it != null) { if (!it.MoveNext()) return null; // if not even one value return null List<object> a = new List<object>(); // first value is ignored above while (it.MoveNext()) { object o = it.Current; a.Add(o); } return a; } // rest of single-valued attribute is null return null; } /** Return all but the last element. Trunc(x)=null if x is single-valued. */ public virtual object Trunc(TemplateFrame frame, object v) { if (v == null) return null; v = ConvertAnythingIteratableToIterator(frame, v); if (v is IEnumerator) { List<object> a = new List<object>(); IEnumerator it = (IEnumerator)v; while (it.MoveNext()) a.Add(it.Current); // remove the last item a.RemoveAt(a.Count - 1); return a; } // Trunc(x)==null when x single-valued attribute return null; } /** Return a new list w/o null values. */ public virtual object Strip(TemplateFrame frame, object v) { if (v == null) return null; v = ConvertAnythingIteratableToIterator(frame, v); if (v is IEnumerator) { List<object> a = new List<object>(); IEnumerator it = (IEnumerator)v; while (it.MoveNext()) { object o = it.Current; if (o != null) a.Add(o); } return a; } return v; // Strip(x)==x when x single-valued attribute } /** Return a list with the same elements as v but in reverse order. null * values are NOT stripped out. use Reverse(Strip(v)) to do that. */ public virtual object Reverse(TemplateFrame frame, object v) { if (v == null) return null; v = ConvertAnythingIteratableToIterator(frame, v); IEnumerator it = v as IEnumerator; if (it != null) { List<object> a = new List<object>(); while (it.MoveNext()) a.Add(it.Current); a.Reverse(); return a; } return v; } /** Return the length of a mult-valued attribute or 1 if it is a * single attribute. If attribute is null return 0. * Special case several common collections and primitive arrays for * speed. This method by Kay Roepke from v3. */ public virtual object Length(object v) { if (v == null) return 0; string str = v as string; if (str != null) return 1; ICollection collection = v as ICollection; if (collection != null) return collection.Count; IDictionary dictionary = v as IDictionary; if (dictionary != null) return dictionary.Count; IEnumerable enumerable = v as IEnumerable; if (enumerable != null) return enumerable.Cast<object>().Count(); IEnumerator iterator = v as IEnumerator; if (iterator != null) { int i = 0; while (iterator.MoveNext()) i++; return i; } return 1; } protected virtual string ToString(TemplateFrame frame, object value) { if (value != null) { if (value.GetType() == typeof(string)) return (string)value; // if not string already, must evaluate it StringWriter sw = new StringWriter(); /* Interpreter interp = new Interpreter(group, new NoIndentWriter(sw), culture); interp.WriteObjectNoOptions(self, value, -1, -1); */ if (_debug && !frame.GetDebugState().IsEarlyEval) { frame = new TemplateFrame(frame.Template, frame); frame.GetDebugState().IsEarlyEval = true; } WriteObjectNoOptions(new NoIndentWriter(sw), frame, value); return sw.ToString(); } return null; } public static object ConvertAnythingIteratableToIterator(TemplateFrame frame, object o) { if (o == null) return null; string str = o as string; if (str != null) return str; IDictionary dictionary = o as IDictionary; if (dictionary != null) { if (frame.Template.Group.IterateAcrossValues) return dictionary.Values.GetEnumerator(); return dictionary.Keys.GetEnumerator(); } ICollection collection = o as ICollection; if (collection != null) return collection.GetEnumerator(); IEnumerable enumerable = o as IEnumerable; if (enumerable != null) return enumerable.GetEnumerator(); //// This code is implied in the last line //IEnumerator enumerator = o as IEnumerator; //if ( enumerator != null ) // return enumerator; return o; } public static IEnumerator ConvertAnythingToIterator(TemplateFrame frame, object o) { o = ConvertAnythingIteratableToIterator(frame, o); IEnumerator iter = o as IEnumerator; if (iter != null) return iter; Template.AttributeList singleton = new Template.AttributeList(1); singleton.Add(o); return singleton.GetEnumerator(); } protected virtual bool TestAttributeTrue(object a) { if (a == null) return false; if (a is bool) return (bool)a; string str = a as string; if (str != null) return true; ICollection collection = a as ICollection; if (collection != null) return collection.Count > 0; IDictionary dictionary = a as IDictionary; if (dictionary != null) return dictionary.Count > 0; IEnumerable enumerable = a as IEnumerable; if (enumerable != null) return enumerable.Cast<object>().Any(); // have to simply return true here for IEnumerator because there's no immutable way to check its contents //IEnumerator iterator = a as IEnumerator; //if (iterator != null) // return iterator.hasNext(); // any other non-null object, return true--it's present return true; } protected virtual object GetObjectProperty(TemplateFrame frame, object o, object property) { Template self = frame.Template; if (o == null) { _errorManager.RuntimeError(frame, ErrorType.NO_SUCH_PROPERTY, "null." + property); return null; } try { ITypeProxyFactory proxyFactory = self.Group.GetTypeProxyFactory(o.GetType()); if (proxyFactory != null) o = proxyFactory.CreateProxy(frame, o); IModelAdaptor adap = self.Group.GetModelAdaptor(o.GetType()); return adap.GetProperty(this, frame, o, property, ToString(frame, property)); } catch (TemplateNoSuchPropertyException e) { _errorManager.RuntimeError(frame, ErrorType.NO_SUCH_PROPERTY, e, o.GetType().Name + "." + property); } return null; } /** Find an attr via dynamic scoping up enclosing scope chain. * If not found, look for a map. So attributes sent in to a template * override dictionary names. */ public virtual object GetAttribute(TemplateFrame frame, string name) { TemplateFrame scope = frame; while (scope != null) { Template template = scope.Template; FormalArgument arg = template.impl.TryGetFormalArgument(name); if (arg != null) { object o = template.locals[arg.Index]; return o; } scope = scope.Parent; } // got to root template and no definition, try dictionaries in group Template self = frame.Template; if (self.impl.NativeGroup.IsDictionary(name)) return self.impl.NativeGroup.RawGetDictionary(name);
antlr/antlrcs
672f0d15d20e2c15f9e88ed3ba9dafa7d6248556
Fix expected output for "full" date format
diff --git a/Antlr4.Test.StringTemplate/TestRenderers.cs b/Antlr4.Test.StringTemplate/TestRenderers.cs index b97e61d..0e9edaf 100644 --- a/Antlr4.Test.StringTemplate/TestRenderers.cs +++ b/Antlr4.Test.StringTemplate/TestRenderers.cs @@ -1,390 +1,390 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using System.Collections.Generic; using Antlr4.StringTemplate; using Microsoft.VisualStudio.TestTools.UnitTesting; using CultureInfo = System.Globalization.CultureInfo; using DateTime = System.DateTime; using DateTimeOffset = System.DateTimeOffset; using Path = System.IO.Path; [TestClass] public class TestRenderers : BaseTest { [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererForGroup() { string templates = "dateThing(created) ::= \"datetime: <created>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = "datetime: 7/5/2005 12:00 AM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithFormat() { string templates = "dateThing(created) ::= << date: <created; format=\"yyyy.MM.dd\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: 2005.07.05 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat() { string templates = "dateThing(created) ::= << datetime: <created; format=\"short\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " datetime: 7/5/2005 12:00 AM "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat2() { string templates = "dateThing(created) ::= << datetime: <created; format=\"full\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); - string expecting = " datetime: Tuesday, July 05, 2005 12:00:00 AM "; + string expecting = " datetime: Tuesday, July 5, 2005 12:00:00 AM "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat3() { string templates = "dateThing(created) ::= << date: <created; format=\"date:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " date: Jul 5, 2005 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [Ignore] // medium is not supported on .NET [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRendererWithPredefinedFormat4() { string templates = "dateThing(created) ::= << time: <created; format=\"time:medium\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(DateTime), new DateRenderer()); group.RegisterRenderer(typeof(DateTimeOffset), new DateRenderer()); Template st = group.GetInstanceOf("dateThing"); st.Add("created", new DateTime(2005, 7, 5)); string expecting = " time: 12:00:00 AM "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithPrintfFormat() { string templates = "foo(x) ::= << <x; format=\"{0,6}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndList() { string template = "The names: <names; format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TERTOMSRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparator() { string template = "The names: <names; separator=\" and \", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); st.Add("names", "ter"); st.Add("names", "tom"); st.Add("names", "sriram"); string expecting = "The names: TER and TOM and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRendererWithFormatAndSeparatorAndNull() { string template = "The names: <names; separator=\" and \", null=\"n/a\", format=\"upper\">"; TemplateGroup group = new TemplateGroup(); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = new Template(group, template); List<string> names = new List<string>(); names.Add("ter"); names.Add(null); names.Add("sriram"); st.Add("names", names); string expecting = "The names: TER and N/A and SRIRAM"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Hi "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithTemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <(t()); format=\"cap\"> >>\n" + "t() ::= <<ack>>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithSubtemplateInclude_cap() { // must toString the t() ref before applying format string templates = "foo(x) ::= << <({ack}); format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); //Interpreter.trace = true; group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "hi"); string expecting = " Ack "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_cap_emptyValue() { string templates = "foo(x) ::= << <x; format=\"cap\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", ""); string expecting = " ";//FIXME: why not two spaces? string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_url_encode() { string templates = "foo(x) ::= << <x; format=\"url-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a b"); string expecting = " a+b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", "a<b> &\t\b"); string expecting = " a&lt;b&gt; &amp;\t\b "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestStringRendererWithFormat_xml_encode_null() { string templates = "foo(x) ::= << <x; format=\"xml-encode\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(string), new StringRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", null); string expecting = " "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestNumberRendererWithPrintfFormat() { //string templates = "foo(x,y) ::= << <x; format=\"%d\"> <y; format=\"%2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); string expecting = " -2100 3.142 "; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestInstanceofRenderer() { string templates = "numberThing(x,y,z) ::= \"numbers: <x>, <y>; <z>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("numberThing"); st.Add("x", -2100); st.Add("y", 3.14159); st.Add("z", "hi"); string expecting = "numbers: -2100, 3.14159; hi"; string result = st.Render(); Assert.AreEqual(expecting, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestLocaleWithNumberRenderer() { //string templates = "foo(x,y) ::= << <x; format=\"%,d\"> <y; format=\"%,2.3f\"> >>\n"; string templates = "foo(x,y) ::= << <x; format=\"{0:#,#}\"> <y; format=\"{0:0.000}\"> >>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.RegisterRenderer(typeof(int), new NumberRenderer()); group.RegisterRenderer(typeof(double), new NumberRenderer()); Template st = group.GetInstanceOf("foo"); st.Add("x", -2100); st.Add("y", 3.14159); // Polish uses ' ' (ASCII 160) for ',' and ',' for '.' string expecting = " -2 100 3,142 "; // Ê string result = st.Render(new CultureInfo("pl")); Assert.AreEqual(expecting, result); } } }
antlr/antlrcs
afcc0fd4d4dc0367a0a0e28aa500adbe91c510c9
Skip ST4 Visualizer tests
diff --git a/Antlr4.Test.StringTemplate/TestCategories.cs b/Antlr4.Test.StringTemplate/TestCategories.cs index 66c22b9..94083d0 100644 --- a/Antlr4.Test.StringTemplate/TestCategories.cs +++ b/Antlr4.Test.StringTemplate/TestCategories.cs @@ -1,7 +1,9 @@ namespace Antlr4.Test.StringTemplate { internal static class TestCategories { public const string ST4 = "ST4"; + + public const string Visualizer = "Visualizer"; } } diff --git a/Antlr4.Test.StringTemplate/TestVisualizer.cs b/Antlr4.Test.StringTemplate/TestVisualizer.cs index 4f986c8..3fe23ce 100644 --- a/Antlr4.Test.StringTemplate/TestVisualizer.cs +++ b/Antlr4.Test.StringTemplate/TestVisualizer.cs @@ -1,208 +1,220 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !NETSTANDARD namespace Antlr4.Test.StringTemplate { using Antlr4.StringTemplate; using Antlr4.StringTemplate.Debug; using Antlr4.StringTemplate.Misc; using Antlr4.StringTemplate.Visualizer; using Antlr4.StringTemplate.Visualizer.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using CultureInfo = System.Globalization.CultureInfo; using Path = System.IO.Path; using StringWriter = System.IO.StringWriter; [TestClass] public class TestVisualizer : BaseTest { - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void SimpleVisualizerTest() { string templates = "method(type,name,locals,args,stats) ::= <<\n" + "public <type> <ick()> <name>(<args:{a| int <a>}; separator=\", \">) {\n" + " <if(locals)>int locals[<locals>];<endif>\n" + " <stats;separator=\"\\n\">\n" + "}\n" + ">>\n" + "assign(a,b) ::= \"<a> = <b>;\"\n" + "return(x) ::= <<return <x>;>>\n" + "paren(x) ::= \"(<x>)\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template st = group.GetInstanceOf("method"); st.impl.Dump(); st.Add("type", "float"); st.Add("name", "foo"); st.Add("locals", 3); st.Add("args", new string[] { "x", "y", "z" }); Template s1 = group.GetInstanceOf("assign"); Template paren = group.GetInstanceOf("paren"); paren.Add("x", "x"); s1.Add("a", paren); s1.Add("b", "y"); Template s2 = group.GetInstanceOf("assign"); s2.Add("a", "y"); s2.Add("b", "z"); Template s3 = group.GetInstanceOf("return"); s3.Add("x", "3.14159"); st.Add("stats", s1); st.Add("stats", s2); st.Add("stats", s3); st.Visualize(); } - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void VisualizerTestShadowTemplates() { string templates = "list(lines) ::= <<\n" + "<lines:line(); separator=\"\\n\">\n" + ">>\n" + "line(text) ::= \"<text>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template template = group.GetInstanceOf("list"); Template line = group.GetInstanceOf("line"); line.Add("text", "x = 3"); template.Add("lines", line); template.Add("lines", line); template.Add("lines", line); template.Visualize(); } - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void VisualizerTestDefaultArgumentTemplate() { string templates = "main() ::= <<\n" + "<f(p=\"x\")>*<f(p=\"y\")>\n" + ">>\n" + "\n" + "f(p,q={<({a<p>})>}) ::= <<\n" + "-<q>-\n" + ">>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template template = group.GetInstanceOf("main"); string result = template.Render(); Assert.AreEqual("-ax-*-ay-", result); template.Visualize(); } /** * see * http://www.antlr.org/pipermail/stringtemplate-interest/2011-May/003476. * html */ - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void TestEarlyEval() { string templates = "main() ::= <<\n<f(p=\"x\")>*<f(p=\"y\")>\n>>\n\n" + "f(p,q={<({a<p>})>}) ::= <<\n-<q>-\n>>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("-ax-*-ay-", s); // Calling inspect led to an java.lang.ArrayIndexOutOfBoundsException in 4.0.2 st.Visualize(); } /** * see * http://www.antlr.org/pipermail/stringtemplate-interest/2011-May/003476. * html */ - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void TestEarlyEval2() { string templates = "main() ::= <<\n<f(p=\"x\")>*\n>>\n\n" + "f(p,q={<({a<p>})>}) ::= <<\n-<q>-\n>>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("-ax-*", s); // When <f(...)> is invoked only once inspect throws no Exception in 4.0.2 st.Visualize(); } /** * see http://www.antlr.org/pipermail/stringtemplate-interest/2011-August/003758.html */ - [TestMethod][TestCategory(TestCategories.ST4)] + [TestMethod] + [TestCategory(TestCategories.ST4)] + [TestCategory(TestCategories.Visualizer)] public void TestBugArrayIndexOutOfBoundsExceptionInTemplateRuntimeMessage_SourceLocation() { string templates = "main(doit = true) ::= " + "\"<if(doit || other)><t(...)><endif>\"\n" + "t2() ::= \"Hello\"\n" // + "t(x={<(t2())>}) ::= \"<x>\""; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("Hello", s); // Inspecting this template threw an ArrayIndexOutOfBoundsException in 4.0.2. // With the default for x changed to {<t2()>} (i.e. lazy eval) inspect // works fine. Also removing the " || other" and keeping the early eval // works fine with inspect. st.Visualize(); } } } #endif diff --git a/appveyor.yml b/appveyor.yml index e66a525..4f7d5b3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ version: 1.0.{build} os: Visual Studio 2015 configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. test_script: -- vstest.console /logger:Appveyor "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\net40\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" -- vstest.console /logger:Appveyor "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\netstandard\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" +- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\net40\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" +- vstest.console /logger:Appveyor /TestCaseFilter:"TestCategory!=Visualizer" "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\netstandard\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z
antlr/antlrcs
3c8ad6724b8f4d137c22ac00d789f2fe3bb3a96c
Enable StringTemplate 4 tests during the AppVeyor build
diff --git a/Antlr3.sln b/Antlr3.sln index 7ae33b2..df90686 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,252 +1,253 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig + appveyor.yml = appveyor.yml PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.netstandard", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.netstandard.csproj", "{0FB5C69A-F894-45DC-B775-5FC273D41460}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.Build.0 = Debug|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.ActiveCfg = Release|Any CPU {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/appveyor.yml b/appveyor.yml index 2444aa6..e66a525 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,19 +1,22 @@ version: 1.0.{build} os: Visual Studio 2015 +configuration: Release init: - cmd: >- git config --global core.autocrlf true mkdir ..\..\..\keys\antlr "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk install: - git submodule update --init --recursive build_script: - cd build\prep - powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - cd ..\.. -test: off +test_script: +- vstest.console /logger:Appveyor "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\net40\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" +- vstest.console /logger:Appveyor "C:\projects\antlrcs\Antlr4.Test.StringTemplate\bin\netstandard\%CONFIGURATION%\Antlr4.Test.StringTemplate.dll" artifacts: - path: build\prep\nuget\*.nupkg - path: build\prep\dist\*.7z
antlr/antlrcs
3aed63778dc94477a88fc121b808c6e1e4e4aa28
Add test project for .NET Standard build of StringTemplate 4
diff --git a/Antlr3.sln b/Antlr3.sln index ba48022..7ae33b2 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,246 +1,252 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.netstandard", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.netstandard.csproj", "{0FB5C69A-F894-45DC-B775-5FC273D41460}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU + {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0FB5C69A-F894-45DC-B775-5FC273D41460}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0FB5C69A-F894-45DC-B775-5FC273D41460}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj index 237891a..3d7071d 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj @@ -1,113 +1,114 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <BaseIntermediateOutputPath>obj\net40\</BaseIntermediateOutputPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>bin\net40\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>bin\net40\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> <Visible>False</Visible> </CodeAnalysisDependentAssemblyPaths> </ItemGroup> <ItemGroup> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="TestAggregates.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestEarlyEvaluation.cs" /> <Compile Include="TestNoNewlineTemplates.cs" /> <Compile Include="TestTemplateNames.cs" /> <Compile Include="TestTemplateRawGroupDirectory.cs" /> <Compile Include="TestVisualizer.cs" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="ErrorBufferAllErrors.cs" /> <Compile Include="TestCompiler.cs" /> <Compile Include="TestCoreBasics.cs" /> <Compile Include="TestDebugEvents.cs" /> <Compile Include="TestDictionaries.cs" /> <Compile Include="TestDollarDelimiters.cs" /> <Compile Include="TestFunctions.cs" /> <Compile Include="TestGroups.cs" /> <Compile Include="TestGroupSyntax.cs" /> <Compile Include="TestGroupSyntaxErrors.cs" /> <Compile Include="TestImports.cs" /> <Compile Include="TestIndentation.cs" /> <Compile Include="TestIndirectionAndEarlyEval.cs" /> <Compile Include="TestInterptimeErrors.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLineWrap.cs" /> <Compile Include="TestLists.cs" /> <Compile Include="TestModelAdaptors.cs" /> <Compile Include="TestNullAndEmptyValues.cs" /> <Compile Include="TestOptions.cs" /> <Compile Include="TestRegions.cs" /> <Compile Include="TestRenderers.cs" /> <Compile Include="TestScopes.cs" /> <Compile Include="TestSubtemplates.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTokensForDollarDelimiters.cs" /> <Compile Include="TestWhitespace.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer.net35-client</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj new file mode 100644 index 0000000..b60ff32 --- /dev/null +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.csproj @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion> + </ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{0FB5C69A-F894-45DC-B775-5FC273D41460}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> + <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <TargetFrameworkProfile /> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\netstandard\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETSTANDARD</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\netstandard\Release\</OutputPath> + <DefineConstants>TRACE;NETSTANDARD</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Extensions\ListExtensions.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="TestAggregates.cs" /> + <Compile Include="TestCategories.cs" /> + <Compile Include="TestEarlyEvaluation.cs" /> + <Compile Include="TestNoNewlineTemplates.cs" /> + <Compile Include="TestTemplateNames.cs" /> + <Compile Include="TestTemplateRawGroupDirectory.cs" /> + <Compile Include="TestVisualizer.cs" /> + </ItemGroup> + <ItemGroup> + <Compile Include="BaseTest.cs" /> + <Compile Include="ErrorBufferAllErrors.cs" /> + <Compile Include="TestCompiler.cs" /> + <Compile Include="TestCoreBasics.cs" /> + <Compile Include="TestDebugEvents.cs" /> + <Compile Include="TestDictionaries.cs" /> + <Compile Include="TestDollarDelimiters.cs" /> + <Compile Include="TestFunctions.cs" /> + <Compile Include="TestGroups.cs" /> + <Compile Include="TestGroupSyntax.cs" /> + <Compile Include="TestGroupSyntaxErrors.cs" /> + <Compile Include="TestImports.cs" /> + <Compile Include="TestIndentation.cs" /> + <Compile Include="TestIndirectionAndEarlyEval.cs" /> + <Compile Include="TestInterptimeErrors.cs" /> + <Compile Include="TestLexer.cs" /> + <Compile Include="TestLineWrap.cs" /> + <Compile Include="TestLists.cs" /> + <Compile Include="TestModelAdaptors.cs" /> + <Compile Include="TestNullAndEmptyValues.cs" /> + <Compile Include="TestOptions.cs" /> + <Compile Include="TestRegions.cs" /> + <Compile Include="TestRenderers.cs" /> + <Compile Include="TestScopes.cs" /> + <Compile Include="TestSubtemplates.cs" /> + <Compile Include="TestSyntaxErrors.cs" /> + <Compile Include="TestTokensForDollarDelimiters.cs" /> + <Compile Include="TestWhitespace.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="Antlr4.Test.StringTemplate.netstandard.project.json" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj"> + <Project>{7e0e3f5c-54d4-49b5-beef-8c3d364a8061}</Project> + <Name>Antlr4.StringTemplate.netstandard</Name> + </ProjectReference> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj"> + <Project>{ac2c28ab-d93a-41e3-85a6-5ecb08cae5c3}</Project> + <Name>Antlr3.Runtime.netstandard</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json new file mode 100644 index 0000000..aba507a --- /dev/null +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.netstandard.project.json @@ -0,0 +1,15 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0" + }, + + "frameworks": { + "net46": { + } + }, + + "runtimes": { + "win": { + } + } +} diff --git a/Antlr4.Test.StringTemplate/TestVisualizer.cs b/Antlr4.Test.StringTemplate/TestVisualizer.cs index 1d854e7..4f986c8 100644 --- a/Antlr4.Test.StringTemplate/TestVisualizer.cs +++ b/Antlr4.Test.StringTemplate/TestVisualizer.cs @@ -1,204 +1,208 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #if !NETSTANDARD + namespace Antlr4.Test.StringTemplate { using Antlr4.StringTemplate; using Antlr4.StringTemplate.Debug; using Antlr4.StringTemplate.Misc; using Antlr4.StringTemplate.Visualizer; using Antlr4.StringTemplate.Visualizer.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using CultureInfo = System.Globalization.CultureInfo; using Path = System.IO.Path; using StringWriter = System.IO.StringWriter; [TestClass] public class TestVisualizer : BaseTest { [TestMethod][TestCategory(TestCategories.ST4)] public void SimpleVisualizerTest() { string templates = "method(type,name,locals,args,stats) ::= <<\n" + "public <type> <ick()> <name>(<args:{a| int <a>}; separator=\", \">) {\n" + " <if(locals)>int locals[<locals>];<endif>\n" + " <stats;separator=\"\\n\">\n" + "}\n" + ">>\n" + "assign(a,b) ::= \"<a> = <b>;\"\n" + "return(x) ::= <<return <x>;>>\n" + "paren(x) ::= \"(<x>)\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template st = group.GetInstanceOf("method"); st.impl.Dump(); st.Add("type", "float"); st.Add("name", "foo"); st.Add("locals", 3); st.Add("args", new string[] { "x", "y", "z" }); Template s1 = group.GetInstanceOf("assign"); Template paren = group.GetInstanceOf("paren"); paren.Add("x", "x"); s1.Add("a", paren); s1.Add("b", "y"); Template s2 = group.GetInstanceOf("assign"); s2.Add("a", "y"); s2.Add("b", "z"); Template s3 = group.GetInstanceOf("return"); s3.Add("x", "3.14159"); st.Add("stats", s1); st.Add("stats", s2); st.Add("stats", s3); st.Visualize(); } [TestMethod][TestCategory(TestCategories.ST4)] public void VisualizerTestShadowTemplates() { string templates = "list(lines) ::= <<\n" + "<lines:line(); separator=\"\\n\">\n" + ">>\n" + "line(text) ::= \"<text>\"\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template template = group.GetInstanceOf("list"); Template line = group.GetInstanceOf("line"); line.Add("text", "x = 3"); template.Add("lines", line); template.Add("lines", line); template.Add("lines", line); template.Visualize(); } [TestMethod][TestCategory(TestCategories.ST4)] public void VisualizerTestDefaultArgumentTemplate() { string templates = "main() ::= <<\n" + "<f(p=\"x\")>*<f(p=\"y\")>\n" + ">>\n" + "\n" + "f(p,q={<({a<p>})>}) ::= <<\n" + "-<q>-\n" + ">>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.TrackCreationEvents = true; Template template = group.GetInstanceOf("main"); string result = template.Render(); Assert.AreEqual("-ax-*-ay-", result); template.Visualize(); } /** * see * http://www.antlr.org/pipermail/stringtemplate-interest/2011-May/003476. * html */ [TestMethod][TestCategory(TestCategories.ST4)] public void TestEarlyEval() { string templates = "main() ::= <<\n<f(p=\"x\")>*<f(p=\"y\")>\n>>\n\n" + "f(p,q={<({a<p>})>}) ::= <<\n-<q>-\n>>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("-ax-*-ay-", s); // Calling inspect led to an java.lang.ArrayIndexOutOfBoundsException in 4.0.2 st.Visualize(); } /** * see * http://www.antlr.org/pipermail/stringtemplate-interest/2011-May/003476. * html */ [TestMethod][TestCategory(TestCategories.ST4)] public void TestEarlyEval2() { string templates = "main() ::= <<\n<f(p=\"x\")>*\n>>\n\n" + "f(p,q={<({a<p>})>}) ::= <<\n-<q>-\n>>"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("-ax-*", s); // When <f(...)> is invoked only once inspect throws no Exception in 4.0.2 st.Visualize(); } /** * see http://www.antlr.org/pipermail/stringtemplate-interest/2011-August/003758.html */ [TestMethod][TestCategory(TestCategories.ST4)] public void TestBugArrayIndexOutOfBoundsExceptionInTemplateRuntimeMessage_SourceLocation() { string templates = "main(doit = true) ::= " + "\"<if(doit || other)><t(...)><endif>\"\n" + "t2() ::= \"Hello\"\n" // + "t(x={<(t2())>}) ::= \"<x>\""; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("main"); string s = st.Render(); Assert.AreEqual("Hello", s); // Inspecting this template threw an ArrayIndexOutOfBoundsException in 4.0.2. // With the default for x changed to {<t2()>} (i.e. lazy eval) inspect // works fine. Also removing the " || other" and keeping the early eval // works fine with inspect. st.Visualize(); } } } + +#endif
antlr/antlrcs
fa77287151d71d21400155f1c723911d77679576
Add .NET Standard build for StringTemplate 4
diff --git a/Antlr3.sln b/Antlr3.sln index 8ffe7aa..ba48022 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,240 +1,246 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.netstandard", "Antlr4.StringTemplate\Antlr4.StringTemplate.netstandard.csproj", "{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU + {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj index f88b745..a11658f 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj @@ -1,163 +1,166 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net35-client\</BaseIntermediateOutputPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net35-client\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net35-client\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net35-client\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net35-client\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> + <Compile Include="Extensions\Arrays.cs" /> + <Compile Include="Extensions\PropertyInfoExtensions.cs" /> + <Compile Include="Extensions\TypeExtensions.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj new file mode 100644 index 0000000..f580c08 --- /dev/null +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.csproj @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{7E0E3F5C-54D4-49B5-BEEF-8C3D364A8061}</ProjectGuid> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Antlr4.StringTemplate</RootNamespace> + <AssemblyName>Antlr4.StringTemplate</AssemblyName> + <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> + <TargetFrameworkProfile /> + <FileAlignment>512</FileAlignment> + <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\netstandard\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;NETSTANDARD</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\netstandard\Debug\Antlr4.StringTemplate.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\netstandard\Release\</OutputPath> + <DefineConstants>TRACE;NETSTANDARD</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\netstandard\Release\Antlr4.StringTemplate.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> + <Compile Include="Extensions\Arrays.cs" /> + <Compile Include="Extensions\PropertyInfoExtensions.cs" /> + <Compile Include="Extensions\TypeExtensions.cs" /> + <Compile Include="TemplateRawGroupDirectory.cs" /> + <Compile Include="Debug\IndentEvent.cs" /> + <Compile Include="Extensions\ExceptionExtensions.cs" /> + <Compile Include="IAttributeRenderer.cs" /> + <Compile Include="AutoIndentWriter.cs" /> + <Compile Include="Debug\DebugEvents.cs" /> + <Compile Include="Misc\AttributeNotFoundException.cs" /> + <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> + <Compile Include="Misc\TextWriterErrorListener.cs" /> + <Compile Include="Misc\DebugErrorListener.cs" /> + <Compile Include="Misc\HttpUtility.cs" /> + <Compile Include="RenderOption.cs" /> + <Compile Include="TemplateFrame.cs" /> + <Compile Include="Misc\Aggregate.cs" /> + <Compile Include="Misc\AggregateModelAdaptor.cs" /> + <Compile Include="TemplateGroupString.cs" /> + <Compile Include="TemplateName.cs" /> + <None Include="..\..\..\..\keys\antlr\Key.snk"> + <Link>Key.snk</Link> + </None> + <Compile Include="DateRenderer.cs" /> + <Compile Include="Compiler\Instruction.cs" /> + <Compile Include="ITypeProxyFactory.cs" /> + <Compile Include="Misc\TypeRegistry`1.cs" /> + <Compile Include="Compiler\OperandType.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Compiler\Bytecode.cs" /> + <Compile Include="Compiler\BytecodeDisassembler.cs" /> + <Compile Include="Compiler\CompilationState.cs" /> + <Compile Include="Compiler\CompiledTemplate.cs" /> + <Compile Include="Compiler\TemplateCompiler.cs" /> + <Compile Include="Compiler\FormalArgument.cs" /> + <Compile Include="Compiler\TemplateException.cs" /> + <Compile Include="Compiler\TemplateLexer.cs" /> + <Compile Include="Compiler\StringTable.cs" /> + <Compile Include="Debug\AddAttributeEvent.cs" /> + <Compile Include="Debug\ConstructionEvent.cs" /> + <None Include="Antlr4.StringTemplate.netstandard.project.json" /> + <None Include="Debug\DebugTemplate.cs" /> + <Compile Include="Debug\EvalExprEvent.cs" /> + <Compile Include="Debug\EvalTemplateEvent.cs" /> + <Compile Include="Debug\InterpEvent.cs" /> + <Compile Include="Interpreter.cs" /> + <Compile Include="Misc\Coordinate.cs" /> + <Compile Include="Misc\ErrorBuffer.cs" /> + <Compile Include="Misc\ErrorManager.cs" /> + <Compile Include="Misc\ErrorType.cs" /> + <Compile Include="Misc\Interval.cs" /> + <Compile Include="Misc\MapModelAdaptor.cs" /> + <Compile Include="Misc\Utility.cs" /> + <Compile Include="Misc\MultiMap.cs" /> + <Compile Include="Misc\ObjectModelAdaptor.cs" /> + <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> + <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> + <Compile Include="Misc\TemplateLexerMessage.cs" /> + <Compile Include="Misc\TemplateMessage.cs" /> + <Compile Include="Misc\TemplateModelAdaptor.cs" /> + <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> + <Compile Include="Misc\TemplateRuntimeMessage.cs" /> + <Compile Include="IModelAdaptor.cs" /> + <Compile Include="NoIndentWriter.cs" /> + <Compile Include="NumberRenderer.cs" /> + <Compile Include="Template.cs" /> + <Compile Include="ITemplateErrorListener.cs" /> + <Compile Include="TemplateGroup.cs" /> + <Compile Include="TemplateGroupDirectory.cs" /> + <Compile Include="TemplateGroupFile.cs" /> + <Compile Include="StringRenderer.cs" /> + <Compile Include="ITemplateWriter.cs" /> + </ItemGroup> + <ItemGroup> + <Antlr3 Include="Compiler\CodeGenerator.g3" /> + <Compile Include="Compiler\CodeGenerator.g3.cs"> + <DependentUpon>CodeGenerator.g3</DependentUpon> + </Compile> + <Antlr3 Include="Compiler\Group.g3" /> + <Compile Include="Compiler\Group.g3.parser.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <Compile Include="Compiler\Group.g3.lexer.cs"> + <DependentUpon>Group.g3</DependentUpon> + </Compile> + <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> + <Antlr3 Include="Compiler\TemplateParser.g3" /> + <Compile Include="Compiler\TemplateParser.g3.cs"> + <DependentUpon>TemplateParser.g3</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj"> + <Project>{ac2c28ab-d93a-41e3-85a6-5ecb08cae5c3}</Project> + <Name>Antlr3.Runtime.netstandard</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> + <!-- Path to the ANTLR Tool itself. --> + <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> + </PropertyGroup> + <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json new file mode 100644 index 0000000..6986abf --- /dev/null +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.netstandard.project.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0" + }, + + "frameworks": { + "netstandard1.3": { + } + } +} diff --git a/Antlr4.StringTemplate/Debug/AddAttributeEvent.cs b/Antlr4.StringTemplate/Debug/AddAttributeEvent.cs index db96a92..50864cf 100644 --- a/Antlr4.StringTemplate/Debug/AddAttributeEvent.cs +++ b/Antlr4.StringTemplate/Debug/AddAttributeEvent.cs @@ -1,71 +1,73 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Debug { public class AddAttributeEvent : ConstructionEvent { private readonly string name; private readonly object value; // unused really; leave for future public AddAttributeEvent(string name, object value) { this.name = name; this.value = value; } public string Name { get { return name; } } public object Value { get { return value; } } public override string ToString() { return "addEvent{" + ", name='" + name + '\'' + ", value=" + value + +#if !NETSTANDARD ", location=" + GetFileName() + ":" + GetLine() + +#endif '}'; } } } diff --git a/Antlr4.StringTemplate/Debug/ConstructionEvent.cs b/Antlr4.StringTemplate/Debug/ConstructionEvent.cs index 21699be..b18ce0d 100644 --- a/Antlr4.StringTemplate/Debug/ConstructionEvent.cs +++ b/Antlr4.StringTemplate/Debug/ConstructionEvent.cs @@ -1,70 +1,78 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Debug { +#if !NETSTANDARD using System.Diagnostics; +#endif /** An event that happens when building Template trees, adding attributes etc... */ public class ConstructionEvent { +#if !NETSTANDARD private readonly StackTrace stack; +#endif public ConstructionEvent() { +#if !NETSTANDARD stack = new StackTrace(true); +#endif } +#if !NETSTANDARD public virtual string GetFileName() { return GetTemplateEntryPoint().GetFileName(); } public virtual int GetLine() { return GetTemplateEntryPoint().GetFileLineNumber(); } public virtual StackFrame GetTemplateEntryPoint() { StackFrame[] trace = stack.GetFrames(); foreach (StackFrame e in trace) { string name = e.GetMethod().DeclaringType.FullName; if (!name.StartsWith("Antlr4.StringTemplate")) return e; } return trace[0]; } +#endif } } diff --git a/Antlr4.StringTemplate/Extensions/Arrays.cs b/Antlr4.StringTemplate/Extensions/Arrays.cs new file mode 100644 index 0000000..4951624 --- /dev/null +++ b/Antlr4.StringTemplate/Extensions/Arrays.cs @@ -0,0 +1,23 @@ +namespace Antlr4.StringTemplate.Extensions +{ + using System; + + internal static class Arrays + { + public static TOutput[] ConvertAll<TInput, TOutput>(TInput[] array, Func<TInput, TOutput> transform) + { + if (array == null) + throw new ArgumentNullException("array"); + if (transform == null) + throw new ArgumentNullException("transform"); + + TOutput[] result = new TOutput[array.Length]; + for (int i = 0; i < array.Length; i++) + { + result[i] = transform(array[i]); + } + + return result; + } + } +} diff --git a/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs b/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs index ed85cb4..64c6427 100644 --- a/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs +++ b/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs @@ -1,75 +1,99 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Extensions { using System; +#if !NETSTANDARD using BindingFlags = System.Reflection.BindingFlags; using MethodInfo = System.Reflection.MethodInfo; +#endif public static class ExceptionExtensions { +#if !NETSTANDARD private static readonly Action<Exception> _internalPreserveStackTrace = GetInternalPreserveStackTraceDelegate(); private static Action<Exception> GetInternalPreserveStackTraceDelegate() { MethodInfo methodInfo = typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); if (methodInfo == null) return null; return (Action<Exception>)Delegate.CreateDelegate(typeof(Action<Exception>), methodInfo); } +#endif #pragma warning disable 618 public static bool IsCritical(this Exception e) { + if (e is OutOfMemoryException + || e is BadImageFormatException) + { + return true; + } + +#if NETSTANDARD + switch (e.GetType().FullName) + { + case "System.AccessViolationException": + case "System.StackOverflowException": + case "System.ExecutionEngineException": + case "System.AppDomainUnloadedException": + return true; + + default: + break; + } +#else if (e is AccessViolationException || e is StackOverflowException || e is ExecutionEngineException - || e is OutOfMemoryException - || e is BadImageFormatException || e is AppDomainUnloadedException) { return true; } +#endif return false; } #pragma warning restore 618 public static void PreserveStackTrace(this Exception e) { +#if !NETSTANDARD if (_internalPreserveStackTrace != null) _internalPreserveStackTrace(e); +#endif } } } diff --git a/Antlr4.StringTemplate/Extensions/PropertyInfoExtensions.cs b/Antlr4.StringTemplate/Extensions/PropertyInfoExtensions.cs new file mode 100644 index 0000000..9d11c07 --- /dev/null +++ b/Antlr4.StringTemplate/Extensions/PropertyInfoExtensions.cs @@ -0,0 +1,16 @@ +#if NETSTANDARD + +namespace Antlr4.StringTemplate.Extensions +{ + using System.Reflection; + + internal static class PropertyInfoExtensions + { + public static MethodInfo GetGetMethod(this PropertyInfo propertyInfo) + { + return propertyInfo.GetMethod; + } + } +} + +#endif diff --git a/Antlr4.StringTemplate/Extensions/TypeExtensions.cs b/Antlr4.StringTemplate/Extensions/TypeExtensions.cs new file mode 100644 index 0000000..9def018 --- /dev/null +++ b/Antlr4.StringTemplate/Extensions/TypeExtensions.cs @@ -0,0 +1,38 @@ +#if NETSTANDARD + +namespace Antlr4.StringTemplate.Extensions +{ + using System; + using System.Collections.Generic; + using System.Reflection; + + internal static class TypeExtensions + { + public static FieldInfo GetField(this Type type, string name) + { + return type.GetRuntimeField(name); + } + + public static MethodInfo GetMethod(this Type type, string name, Type[] parameters) + { + return type.GetRuntimeMethod(name, parameters); + } + + public static IEnumerable<PropertyInfo> GetProperties(this Type type) + { + return type.GetRuntimeProperties(); + } + + public static PropertyInfo GetProperty(this Type type, string name) + { + return type.GetRuntimeProperty(name); + } + + public static bool IsAssignableFrom(this Type type, Type otherType) + { + return type.GetTypeInfo().IsAssignableFrom(otherType.GetTypeInfo()); + } + } +} + +#endif diff --git a/Antlr4.StringTemplate/Interpreter.cs b/Antlr4.StringTemplate/Interpreter.cs index b34f6bd..594ad8a 100644 --- a/Antlr4.StringTemplate/Interpreter.cs +++ b/Antlr4.StringTemplate/Interpreter.cs @@ -1,687 +1,681 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Debug; using Antlr4.StringTemplate.Extensions; using Antlr4.StringTemplate.Misc; using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using BitConverter = System.BitConverter; using Console = System.Console; using CultureInfo = System.Globalization.CultureInfo; using Environment = System.Environment; using Exception = System.Exception; using ICollection = System.Collections.ICollection; using IDictionary = System.Collections.IDictionary; using IEnumerable = System.Collections.IEnumerable; using IEnumerator = System.Collections.IEnumerator; using IList = System.Collections.IList; using IOException = System.IO.IOException; using Math = System.Math; using StringBuilder = System.Text.StringBuilder; using StringWriter = System.IO.StringWriter; /** This class knows how to execute template bytecodes relative to a * particular TemplateGroup. To execute the byte codes, we need an output stream * and a reference to an Template an instance. That instance's impl field points at * a CompiledTemplate, which contains all of the byte codes and other information * relevant to execution. * * This interpreter is a stack-based bytecode interpreter. All operands * go onto an operand stack. * * If the group that we're executing relative to has debug set, we track * interpreter events. For now, I am only tracking instance creation events. * These are used by STViz to pair up output chunks with the template * expressions that generate them. * * We create a new interpreter for each Template.Render(), DebugTemplate.Visualize, or * DebugTemplate.GetEvents() invocation. */ public partial class Interpreter { public const int DefaultOperandStackSize = 512; private static readonly string[] predefinedAnonSubtemplateAttributes = { "i", "i0" }; /** Dump bytecode instructions as we execute them? */ private static bool trace = false; /** Exec st with respect to this group. Once set in Template.ToString(), * it should be fixed. Template has group also. */ private readonly TemplateGroup group; /** For renderers, we have to pass in the culture */ private readonly CultureInfo culture; private readonly ErrorManager _errorManager; /** Operand stack, grows upwards */ private object[] operands = new object[DefaultOperandStackSize]; private int sp = -1; // stack pointer register private int nwline = 0; // how many char written on this template LINE so far? /** If trace mode, track trace here */ // TODO: track the pieces not a string and track what it contributes to output private List<string> executeTrace; /** Track events inside templates and in this.events */ private bool _debug; /** Track everything happening in interp if debug across all templates. * The last event in this field is the EvalTemplateEvent for the root * template. */ private List<InterpEvent> events; public Interpreter(TemplateGroup group, bool debug) : this(group, CultureInfo.CurrentCulture, group.ErrorManager, debug) { } public Interpreter(TemplateGroup group, CultureInfo culture, bool debug) : this(group, culture, group.ErrorManager, debug) { } public Interpreter(TemplateGroup group, ErrorManager errorManager, bool debug) : this(group, CultureInfo.CurrentCulture, errorManager, debug) { } public Interpreter(TemplateGroup group, CultureInfo culture, ErrorManager errorManager, bool debug) { if (errorManager == null) throw new ArgumentNullException("errorManager"); this.group = group; this.culture = culture; this._errorManager = errorManager; this._debug = debug; if (debug) { events = new List<InterpEvent>(); executeTrace = new List<string>(); } } public static ReadOnlyCollection<string> PredefinedAnonymousSubtemplateAttributes { get { return new ReadOnlyCollection<string>(predefinedAnonSubtemplateAttributes); } } /** Execute template self and return how many characters it wrote to out */ public virtual int Execute(ITemplateWriter @out, TemplateFrame frame) { try { if (frame.StackDepth > 200) throw new TemplateException("Template stack overflow.", null); if (trace) Console.Out.WriteLine("Execute({0})", frame.Template.Name); SetDefaultArguments(frame); return ExecuteImpl(@out, frame); } - catch (Exception e) + catch (Exception e) when (!e.IsCritical()) { - if (e.IsCritical()) - { - e.PreserveStackTrace(); - throw; - } - StringBuilder builder = new StringBuilder(); builder.AppendLine(e.ToString()); builder.AppendLine(e.StackTrace); _errorManager.RuntimeError(frame, ErrorType.INTERNAL_ERROR, "internal error: " + builder); return 0; } } protected virtual int ExecuteImpl(ITemplateWriter @out, TemplateFrame frame) { Template self = frame.Template; int start = @out.Index; // track char we're about to Write Bytecode prevOpcode = Bytecode.Invalid; int n = 0; // how many char we Write out int nargs; int nameIndex; int addr; string name; object o, left, right; Template st; object[] options; byte[] code = self.impl.instrs; // which code block are we executing int ip = 0; while (ip < self.impl.codeSize) { if (trace || _debug) Trace(frame, ip); Bytecode opcode = (Bytecode)code[ip]; frame.InstructionPointer = ip; ip++; //jump to next instruction or first byte of operand switch (opcode) { case Bytecode.INSTR_LOAD_STR: int strIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; operands[++sp] = self.impl.strings[strIndex]; break; case Bytecode.INSTR_LOAD_ATTR: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; try { o = GetAttribute(frame, name); if (o == Template.EmptyAttribute) o = null; } catch (AttributeNotFoundException) { _errorManager.RuntimeError(frame, ErrorType.NO_SUCH_ATTRIBUTE, name); o = null; } operands[++sp] = o; break; case Bytecode.INSTR_LOAD_LOCAL: int valueIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = self.locals[valueIndex]; if (o == Template.EmptyAttribute) o = null; operands[++sp] = o; break; case Bytecode.INSTR_LOAD_PROP: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = operands[sp--]; name = self.impl.strings[nameIndex]; operands[++sp] = GetObjectProperty(frame, o, name); break; case Bytecode.INSTR_LOAD_PROP_IND: object propName = operands[sp--]; o = operands[sp]; operands[sp] = GetObjectProperty(frame, o, propName); break; case Bytecode.INSTR_NEW: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; nargs = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; // look up in original hierarchy not enclosing template (variable group) // see TestSubtemplates.testEvalSTFromAnotherGroup() st = self.Group.GetEmbeddedInstanceOf(frame, name); // get n args and store into st's attr list StoreArguments(frame, nargs, st); sp -= nargs; operands[++sp] = st; break; case Bytecode.INSTR_NEW_IND: nargs = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = (string)operands[sp - nargs]; st = self.Group.GetEmbeddedInstanceOf(frame, name); StoreArguments(frame, nargs, st); sp -= nargs; sp--; // pop template name operands[++sp] = st; break; case Bytecode.INSTR_NEW_BOX_ARGS: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; IDictionary<string, object> attrs = (IDictionary<string, object>)operands[sp--]; // look up in original hierarchy not enclosing template (variable group) // see TestSubtemplates.testEvalSTFromAnotherGroup() st = self.Group.GetEmbeddedInstanceOf(frame, name); // get n args and store into st's attr list StoreArguments(frame, attrs, st); operands[++sp] = st; break; case Bytecode.INSTR_SUPER_NEW: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; nargs = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; SuperNew(frame, name, nargs); break; case Bytecode.INSTR_SUPER_NEW_BOX_ARGS: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; attrs = (IDictionary<string, object>)operands[sp--]; SuperNew(frame, name, attrs); break; case Bytecode.INSTR_STORE_OPTION: int optionIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = operands[sp--]; // value to store options = (object[])operands[sp]; // get options options[optionIndex] = o; // store value into options on stack break; case Bytecode.INSTR_STORE_ARG: nameIndex = GetShort(code, ip); name = self.impl.strings[nameIndex]; ip += Instruction.OperandSizeInBytes; o = operands[sp--]; attrs = (IDictionary<string, object>)operands[sp]; attrs[name] = o; // leave attrs on stack break; case Bytecode.INSTR_WRITE: o = operands[sp--]; int n1 = WriteObjectNoOptions(@out, frame, o); n += n1; nwline += n1; break; case Bytecode.INSTR_WRITE_OPT: options = (object[])operands[sp--]; // get options o = operands[sp--]; // get option to Write int n2 = WriteObjectWithOptions(@out, frame, o, options); n += n2; nwline += n2; break; case Bytecode.INSTR_MAP: st = (Template)operands[sp--]; // get prototype off stack o = operands[sp--]; // get object to map prototype across Map(frame, o, st); break; case Bytecode.INSTR_ROT_MAP: int nmaps = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; List<Template> templates = new List<Template>(); for (int i = nmaps - 1; i >= 0; i--) templates.Add((Template)operands[sp - i]); sp -= nmaps; o = operands[sp--]; if (o != null) RotateMap(frame, o, templates); break; case Bytecode.INSTR_ZIP_MAP: st = (Template)operands[sp--]; nmaps = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; List<object> exprs = new List<object>(); for (int i = nmaps - 1; i >= 0; i--) exprs.Add(operands[sp - i]); sp -= nmaps; operands[++sp] = ZipMap(frame, exprs, st); break; case Bytecode.INSTR_BR: ip = GetShort(code, ip); break; case Bytecode.INSTR_BRF: addr = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = operands[sp--]; // <if(expr)>...<endif> if (!TestAttributeTrue(o)) ip = addr; // jump break; case Bytecode.INSTR_OPTIONS: operands[++sp] = new object[Compiler.TemplateCompiler.NUM_OPTIONS]; break; case Bytecode.INSTR_ARGS: operands[++sp] = new Dictionary<string, object>(); break; case Bytecode.INSTR_PASSTHRU: nameIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; name = self.impl.strings[nameIndex]; attrs = (IDictionary<string, object>)operands[sp]; PassThrough(frame, name, attrs); break; case Bytecode.INSTR_LIST: operands[++sp] = new List<object>(); break; case Bytecode.INSTR_ADD: o = operands[sp--]; // pop value List<object> list = (List<object>)operands[sp]; // don't pop list AddToList(list, frame, o); break; case Bytecode.INSTR_TOSTR: // replace with string value; early eval operands[sp] = ToString(frame, operands[sp]); break; case Bytecode.INSTR_FIRST: operands[sp] = First(frame, operands[sp]); break; case Bytecode.INSTR_LAST: operands[sp] = Last(frame, operands[sp]); break; case Bytecode.INSTR_REST: operands[sp] = Rest(frame, operands[sp]); break; case Bytecode.INSTR_TRUNC: operands[sp] = Trunc(frame, operands[sp]); break; case Bytecode.INSTR_STRIP: operands[sp] = Strip(frame, operands[sp]); break; case Bytecode.INSTR_TRIM: o = operands[sp--]; if (o.GetType() == typeof(string)) { operands[++sp] = ((string)o).Trim(); } else { _errorManager.RuntimeError(frame, ErrorType.EXPECTING_STRING, "trim", o.GetType()); operands[++sp] = o; } break; case Bytecode.INSTR_LENGTH: operands[sp] = Length(operands[sp]); break; case Bytecode.INSTR_STRLEN: o = operands[sp--]; if (o.GetType() == typeof(string)) { operands[++sp] = ((string)o).Length; } else { _errorManager.RuntimeError(frame, ErrorType.EXPECTING_STRING, "strlen", o.GetType()); operands[++sp] = 0; } break; case Bytecode.INSTR_REVERSE: operands[sp] = Reverse(frame, operands[sp]); break; case Bytecode.INSTR_NOT: operands[sp] = !TestAttributeTrue(operands[sp]); break; case Bytecode.INSTR_OR: right = operands[sp--]; left = operands[sp--]; operands[++sp] = TestAttributeTrue(left) || TestAttributeTrue(right); break; case Bytecode.INSTR_AND: right = operands[sp--]; left = operands[sp--]; operands[++sp] = TestAttributeTrue(left) && TestAttributeTrue(right); break; case Bytecode.INSTR_INDENT: strIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; Indent(@out, frame, strIndex); break; case Bytecode.INSTR_DEDENT: @out.PopIndentation(); break; case Bytecode.INSTR_NEWLINE: try { if (prevOpcode == Bytecode.INSTR_NEWLINE || prevOpcode == Bytecode.INSTR_INDENT || nwline > 0) { @out.Write(Environment.NewLine); } nwline = 0; } catch (IOException ioe) { _errorManager.IOError(self, ErrorType.WRITE_IO_ERROR, ioe); } break; case Bytecode.INSTR_NOOP: break; case Bytecode.INSTR_POP: sp--; // throw away top of stack break; case Bytecode.INSTR_NULL: operands[++sp] = null; break; case Bytecode.INSTR_TRUE: operands[++sp] = true; break; case Bytecode.INSTR_FALSE: operands[++sp] = false; break; case Bytecode.INSTR_WRITE_STR: strIndex = GetShort(code, ip); ip += Instruction.OperandSizeInBytes; o = self.impl.strings[strIndex]; n1 = WriteObjectNoOptions(@out, frame, o); n += n1; nwline += n1; break; // TODO: generate this optimization //case Bytecode.INSTR_WRITE_LOCAL: // valueIndex = GetShort(code, ip); // ip += Instruction.OperandSizeInBytes; // o = self.locals[valueIndex]; // if (o == Template.EmptyAttribute) // o = null; // n1 = WriteObjectNoOptions(@out, frame, o); // n += n1; // nwline += n1; // break; default: _errorManager.InternalError(self, "invalid bytecode @ " + (ip - 1) + ": " + opcode, null); self.impl.Dump(); break; } prevOpcode = opcode; } if (_debug) { EvalTemplateEvent e = new EvalTemplateEvent(frame, Interval.FromBounds(start, @out.Index)); TrackDebugEvent(frame, e); } return n; } // TODO: refactor to Remove dup'd code internal virtual void SuperNew(TemplateFrame frame, string name, int nargs) { Template self = frame.Template; Template st = null; CompiledTemplate imported = self.impl.NativeGroup.LookupImportedTemplate(name); if (imported == null) { _errorManager.RuntimeError(frame, ErrorType.NO_IMPORTED_TEMPLATE, name); st = self.Group.CreateStringTemplateInternally(new CompiledTemplate()); } else { st = imported.NativeGroup.GetEmbeddedInstanceOf(frame, name); st.Group = group; } // get n args and store into st's attr list StoreArguments(frame, nargs, st); sp -= nargs; operands[++sp] = st; } internal virtual void SuperNew(TemplateFrame frame, string name, IDictionary<string, object> attrs) { Template self = frame.Template; Template st = null; CompiledTemplate imported = self.impl.NativeGroup.LookupImportedTemplate(name); if (imported == null) { _errorManager.RuntimeError(frame, ErrorType.NO_IMPORTED_TEMPLATE, name); st = self.Group.CreateStringTemplateInternally(new CompiledTemplate()); } else { st = imported.NativeGroup.CreateStringTemplateInternally(imported); st.Group = group; } // get n args and store into st's attr list StoreArguments(frame, attrs, st); operands[++sp] = st; } internal virtual void PassThrough(TemplateFrame frame, string templateName, IDictionary<string, object> attrs) { CompiledTemplate c = group.LookupTemplate(templateName); if (c == null) return; // will get error later if (c.FormalArguments == null) return; foreach (FormalArgument arg in c.FormalArguments) { // if not already set by user, set to value from outer scope if (!attrs.ContainsKey(arg.Name)) { //System.out.println("arg "+arg.name+" missing"); try { object o = GetAttribute(frame, arg.Name); // If the attribute exists but there is no value and // the formal argument has no default value, make it null. if (o == Template.EmptyAttribute && arg.DefaultValueToken == null) { attrs[arg.Name] = null; } // Else, the attribute has an existing value, set arg. else if (o != Template.EmptyAttribute) { attrs[arg.Name] = o; } } catch (AttributeNotFoundException) { // if no such attribute exists for arg.name, set parameter // if no default value if (arg.DefaultValueToken == null) { _errorManager.RuntimeError(frame, ErrorType.NO_SUCH_ATTRIBUTE_PASS_THROUGH, arg.Name); attrs[arg.Name] = null; } } } } } internal virtual void StoreArguments(TemplateFrame frame, IDictionary<string, object> attrs, Template st) { bool noSuchAttributeReported = false; if (attrs != null) { foreach (KeyValuePair<string, object> argument in attrs) { if (!st.impl.HasFormalArgs) { if (st.impl.FormalArguments == null || st.impl.TryGetFormalArgument(argument.Key) == null) { // we clone the CompiledTemplate to prevent modifying the original // _formalArguments map during interpretation. st.impl = st.impl.Clone(); st.Add(argument.Key, argument.Value); } else { st.RawSetAttribute(argument.Key, argument.Value); } } else { // don't let it throw an exception in RawSetAttribute if (st.impl.FormalArguments == null || st.impl.TryGetFormalArgument(argument.Key) == null) { noSuchAttributeReported = true; diff --git a/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs b/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs index d752be6..150d578 100644 --- a/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs +++ b/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs @@ -1,216 +1,217 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Misc { using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; + using Antlr4.StringTemplate.Extensions; using ArgumentNullException = System.ArgumentNullException; using FieldInfo = System.Reflection.FieldInfo; using MethodInfo = System.Reflection.MethodInfo; using PropertyInfo = System.Reflection.PropertyInfo; using Type = System.Type; public class ObjectModelAdaptor : IModelAdaptor { private static readonly Dictionary<Type, Dictionary<string, System.Func<object, object>>> _memberAccessors = new Dictionary<Type, Dictionary<string, System.Func<object, object>>>(); public virtual object GetProperty(Interpreter interpreter, TemplateFrame frame, object o, object property, string propertyName) { if (o == null) throw new ArgumentNullException("o"); Type c = o.GetType(); if (property == null) throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName ?? "null")); object value; var accessor = FindMember(c, propertyName); if (accessor != null) { value = accessor(o); } else { throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName)); } return value; } private static System.Func<object, object> FindMember(Type type, string name) { if (type == null) throw new ArgumentNullException("type"); if (name == null) throw new ArgumentNullException("name"); lock (_memberAccessors) { Dictionary<string, System.Func<object, object>> members; System.Func<object, object> accessor = null; if (_memberAccessors.TryGetValue(type, out members)) { if (members.TryGetValue(name, out accessor)) return accessor; } else { members = new Dictionary<string, System.Func<object, object>>(); _memberAccessors[type] = members; } // must look up using reflection string methodSuffix = char.ToUpperInvariant(name[0]) + name.Substring(1); bool checkOriginalName = !string.Equals(methodSuffix, name); MethodInfo method = null; if (method == null) { PropertyInfo p = type.GetProperty(methodSuffix); if (p == null && checkOriginalName) p = type.GetProperty(name); if (p != null) method = p.GetGetMethod(); } if (method == null) { method = type.GetMethod("Get" + methodSuffix, Type.EmptyTypes); if (method == null && checkOriginalName) method = type.GetMethod("Get" + name, Type.EmptyTypes); } if (method == null) { method = type.GetMethod("get_" + methodSuffix, Type.EmptyTypes); if (method == null && checkOriginalName) method = type.GetMethod("get_" + name, Type.EmptyTypes); } if (method != null) { accessor = BuildAccessor(method); } else { // try for an indexer method = type.GetMethod("get_Item", new Type[] { typeof(string) }); if (method == null) { var property = type.GetProperties().FirstOrDefault(IsIndexer); if (property != null) method = property.GetGetMethod(); } if (method != null) { accessor = BuildAccessor(method, name); } else { // try for a visible field FieldInfo field = type.GetField(name); // also check .NET naming convention for fields if (field == null) field = type.GetField("_" + name); if (field != null) accessor = BuildAccessor(field); } } members[name] = accessor; return accessor; } } private static bool IsIndexer(PropertyInfo propertyInfo) { if (propertyInfo == null) throw new ArgumentNullException("propertyInfo"); var indexParameters = propertyInfo.GetIndexParameters(); return indexParameters != null && indexParameters.Length > 0 && indexParameters[0].ParameterType == typeof(string); } private static System.Func<object, object> BuildAccessor(MethodInfo method) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); UnaryExpression instance = !method.IsStatic ? Expression.Convert(obj, method.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( Expression.Call(instance, method), typeof(object)), obj); return expr.Compile(); } /// <summary> /// Builds an accessor for an indexer property that returns a takes a string argument. /// </summary> private static System.Func<object, object> BuildAccessor(MethodInfo method, string argument) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); UnaryExpression instance = !method.IsStatic ? Expression.Convert(obj, method.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( Expression.Call(instance, method, Expression.Constant(argument)), typeof(object)), obj); return expr.Compile(); } private static System.Func<object, object> BuildAccessor(FieldInfo field) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); UnaryExpression instance = !field.IsStatic ? Expression.Convert(obj, field.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( Expression.Field(instance, field), typeof(object)), obj); return expr.Compile(); } } } diff --git a/Antlr4.StringTemplate/Misc/TypeRegistry`1.cs b/Antlr4.StringTemplate/Misc/TypeRegistry`1.cs index 24e791a..5bf27c2 100644 --- a/Antlr4.StringTemplate/Misc/TypeRegistry`1.cs +++ b/Antlr4.StringTemplate/Misc/TypeRegistry`1.cs @@ -1,388 +1,389 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Misc { using System.Collections.Generic; using System.Linq; + using Antlr4.StringTemplate.Extensions; using AmbiguousMatchException = System.Reflection.AmbiguousMatchException; using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using ICollection = System.Collections.ICollection; using IDictionary = System.Collections.IDictionary; using IDictionaryEnumerator = System.Collections.IDictionaryEnumerator; using IEnumerable = System.Collections.IEnumerable; using IEnumerator = System.Collections.IEnumerator; using NotSupportedException = System.NotSupportedException; using StringBuilder = System.Text.StringBuilder; using Type = System.Type; public class TypeRegistry<T> : IDictionary<Type, T>, IDictionary { private readonly Dictionary<Type, T> _backingStore = new Dictionary<Type, T>(); private readonly Dictionary<Type, Type> _cache = new Dictionary<Type, Type>(); public TypeRegistry() { } public TypeRegistry(IEnumerable<KeyValuePair<Type, T>> collection) { if (collection == null) throw new ArgumentNullException("collection"); foreach (var type in collection) this.Add(type.Key, type.Value); } ICollection<Type> IDictionary<Type, T>.Keys { get { return _backingStore.Keys; } } ICollection<T> IDictionary<Type, T>.Values { get { return _backingStore.Values; } } int ICollection<KeyValuePair<Type, T>>.Count { get { return _backingStore.Count; } } int ICollection.Count { get { return _backingStore.Count; } } bool ICollection<KeyValuePair<Type, T>>.IsReadOnly { get { return false; } } bool IDictionary.IsFixedSize { get { return false; } } bool IDictionary.IsReadOnly { get { return false; } } ICollection IDictionary.Keys { get { return _backingStore.Keys; } } ICollection IDictionary.Values { get { return _backingStore.Values; } } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { throw new NotSupportedException(); } } public T this[Type key] { get { T value; if (!TryGetValue(key, out value)) throw new KeyNotFoundException(); return value; } set { _backingStore[key] = value; HandleAlteration(key); } } object IDictionary.this[object key] { get { Type t = key as Type; if (t == null && key != null) return null; T value; if (!TryGetValue(t, out value)) return null; return value; } set { this[(Type)key] = (T)value; } } public void Add(Type key, T value) { _backingStore.Add(key, value); HandleAlteration(key); } public bool ContainsKey(Type key) { if (_cache.ContainsKey(key)) return true; T value; return TryGetValue(key, out value); } public bool Remove(Type key) { if (_backingStore.Remove(key)) { HandleAlteration(key); return true; } return false; } public bool TryGetValue(Type key, out T value) { if (_backingStore.TryGetValue(key, out value)) return true; Type redirect; if (_cache.TryGetValue(key, out redirect)) { if (redirect == null) { value = default(T); return false; } else { return _backingStore.TryGetValue(redirect, out value); } } List<Type> candidates = _backingStore.Keys.Where(i => i.IsAssignableFrom(key)).ToList(); if (candidates.Count == 0) { _cache[key] = null; value = default(T); return false; } else if (candidates.Count == 1) { _cache[key] = candidates[0]; return _backingStore.TryGetValue(candidates[0], out value); } else { for (int i = 0; i < candidates.Count - 1; i++) { if (candidates[i] == null) continue; for (int j = i + 1; j < candidates.Count; j++) { if (candidates[i].IsAssignableFrom(candidates[j])) { candidates[i] = null; break; } else if (candidates[j].IsAssignableFrom(candidates[i])) { candidates[j] = null; } } } candidates.RemoveAll(i => i == null); if (candidates.Count != 1) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("The type '{0}' does not match a single item in the registry. The {1} ambiguous matches are:", key.FullName, candidates.Count); foreach (var candidate in candidates) { builder.AppendLine(); builder.AppendFormat(" {0}", candidate.FullName); } throw new AmbiguousMatchException(builder.ToString()); } _cache[key] = candidates[0]; return _backingStore.TryGetValue(candidates[0], out value); } } public void Clear() { _backingStore.Clear(); _cache.Clear(); } public IEnumerator<KeyValuePair<Type, T>> GetEnumerator() { return _backingStore.GetEnumerator(); } void ICollection<KeyValuePair<Type, T>>.Add(KeyValuePair<Type, T> item) { Add(item.Key, item.Value); } bool ICollection<KeyValuePair<Type, T>>.Contains(KeyValuePair<Type, T> item) { T value; if (_backingStore.TryGetValue(item.Key, out value)) { if (EqualityComparer<T>.Default.Equals(value, item.Value)) return true; } return false; } void ICollection<KeyValuePair<Type, T>>.CopyTo(KeyValuePair<Type, T>[] array, int arrayIndex) { ((ICollection<KeyValuePair<Type, T>>)_backingStore).CopyTo(array, arrayIndex); } bool ICollection<KeyValuePair<Type, T>>.Remove(KeyValuePair<Type, T> item) { T value; if (_backingStore.TryGetValue(item.Key, out value)) { if (EqualityComparer<T>.Default.Equals(value, item.Value)) return _backingStore.Remove(item.Key); } return false; } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } void IDictionary.Add(object key, object value) { Add((Type)key, (T)value); } void IDictionary.Clear() { Clear(); } bool IDictionary.Contains(object key) { if (key == null) return ContainsKey(null); Type t = key as Type; if (t == null) return false; return ContainsKey(t); } IDictionaryEnumerator IDictionary.GetEnumerator() { return _backingStore.GetEnumerator(); } void IDictionary.Remove(object key) { Type t = key as Type; if (t != null || key == null) Remove(t); } void ICollection.CopyTo(Array array, int index) { ((ICollection)_backingStore).CopyTo(array, index); } private void HandleAlteration(Type type) { Type[] altered = _cache.Where(i => type.IsAssignableFrom(i.Key)).Select(i => i.Key).ToArray(); foreach (var t in altered) _cache.Remove(t); } } } diff --git a/Antlr4.StringTemplate/StringRenderer.cs b/Antlr4.StringTemplate/StringRenderer.cs index e358022..0a81a2d 100644 --- a/Antlr4.StringTemplate/StringRenderer.cs +++ b/Antlr4.StringTemplate/StringRenderer.cs @@ -1,70 +1,82 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using CultureInfo = System.Globalization.CultureInfo; using Encoding = System.Text.Encoding; using HttpUtility = Antlr4.StringTemplate.Misc.HttpUtility; +#if !NETSTANDARD using SecurityElement = System.Security.SecurityElement; +#endif /** This Render knows to perform a few operations on String objects: * upper, lower, cap, url-encode, xml-encode. */ public class StringRenderer : IAttributeRenderer { // trim(s) and strlen(s) built-in funcs; these are Format options public virtual string ToString(object o, string formatString, CultureInfo culture) { string s = (string)o; if (formatString == null) return s; if (formatString.Equals("upper")) - return s.ToUpper(culture); + return culture.TextInfo.ToUpper(s); if (formatString.Equals("lower")) - return s.ToLower(culture); + return culture.TextInfo.ToLower(s); if (formatString.Equals("cap")) - return s.Length > 0 ? char.ToUpper(s[0], culture) + s.Substring(1) : s; + return s.Length > 0 ? culture.TextInfo.ToUpper(s[0]) + s.Substring(1) : s; if (formatString.Equals("url-encode")) return HttpUtility.UrlEncode(s, Encoding.UTF8); if (formatString.Equals("xml-encode")) + { +#if NETSTANDARD + return s.Replace("&", "&amp;") + .Replace("<", "&lt;") + .Replace(">", "&gt;") + .Replace("\"", "&quot;") + .Replace("'", "&apos;"); +#else return SecurityElement.Escape(s); +#endif + } return string.Format(culture, formatString, s); } } } diff --git a/Antlr4.StringTemplate/Template.cs b/Antlr4.StringTemplate/Template.cs index fe3b6aa..ee733b1 100644 --- a/Antlr4.StringTemplate/Template.cs +++ b/Antlr4.StringTemplate/Template.cs @@ -1,648 +1,652 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Debug; + using Antlr4.StringTemplate.Extensions; using Antlr4.StringTemplate.Misc; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using Console = System.Console; using CultureInfo = System.Globalization.CultureInfo; using IList = System.Collections.IList; using StringWriter = System.IO.StringWriter; using TextWriter = System.IO.TextWriter; /** An instance of the StringTemplate. It consists primarily of * a reference to its implementation (shared among all instances) * and a hash table of attributes. Because of dynamic scoping, * we also need a reference to any enclosing instance. For example, * in a deeply nested template for an HTML page body, we could still reference * the title attribute defined in the outermost page template. * * To use templates, you create one (usually via TemplateGroup) and then inject * attributes using Add(). To Render its attacks, use Render(). */ public class Template { /** &lt;@r()&gt;, &lt;@r&gt;...&lt;@end&gt;, and @t.r() ::= "..." defined manually by coder */ public enum RegionType { /// <summary> /// The region is defined by &lt;@r()&gt; /// </summary> Implicit, /// <summary> /// The region is defined by &lt;@r&gt;...&lt;@end&gt; /// </summary> Embedded, /// <summary> /// The region is defined by @t.r ::= "..." /// </summary> Explicit } public static readonly string UnknownName = "anonymous"; public static readonly object EmptyAttribute = new object(); /** When there are no formal args for template t and you map t across * some values, t implicitly gets arg "it". E.g., "<b>$it$</b>" */ public static readonly string ImplicitArgumentName = "it"; /** The implementation for this template among all instances of same tmpelate . */ public CompiledTemplate impl; /** Safe to simultaneously Write via Add, which is synchronized. Reading * during exec is, however, NOT synchronized. So, not thread safe to * Add attributes while it is being evaluated. Initialized to EmptyAttribute * to distinguish null from empty. */ protected internal object[] locals; /** Created as instance of which group? We need this to init interpreter * via Render. So, we create st and then it needs to know which * group created it for sake of polymorphism: * * st = skin1.GetInstanceOf("searchbox"); * result = st.Render(); // knows skin1 created it * * Say we have a group, g1, with template t and import t and u templates from * another group, g2. g1.GetInstanceOf("u") finds u in g2 but remembers * that g1 created it. If u includes t, it should create g1.t not g2.t. * * g1 = {t(), u()} * | * v * g2 = {t()} */ private TemplateGroup groupThatCreatedThisInstance; /** If Interpreter.trackCreationEvents, track creation, add-attr events * for each object. Create this object on first use. */ private TemplateDebugState _debugState; /** Just an alias for ArrayList, but this way I can track whether a * list is something Template created or it's an incoming list. */ public sealed class AttributeList : List<object> { public AttributeList(int capacity) : base(capacity) { } public AttributeList() { } } /** Used by group creation routine, not by users */ internal Template(TemplateGroup group) { if (group == null) throw new ArgumentNullException("group"); this.groupThatCreatedThisInstance = group; if (group.TrackCreationEvents) { if (_debugState == null) _debugState = new TemplateDebugState(); _debugState.NewTemplateEvent = new ConstructionEvent(); } } /** Used to make templates inline in code for simple things like SQL or log records. * No formal args are set and there is no enclosing instance. */ public Template(string template) : this(TemplateGroup.DefaultGroup, template) { } /** Create Template using non-default delimiters; each one of these will live * in it's own group since you're overriding a default; don't want to * alter TemplateGroup.defaultGroup. */ public Template(string template, char delimiterStartChar, char delimiterStopChar) : this(new TemplateGroup(delimiterStartChar, delimiterStopChar), template) { } public Template(TemplateGroup group, string template) { if (group == null) throw new ArgumentNullException("group"); groupThatCreatedThisInstance = group; impl = groupThatCreatedThisInstance.Compile(group.FileName, null, null, template, null); impl.HasFormalArgs = false; impl.Name = UnknownName; impl.DefineImplicitlyDefinedTemplates(groupThatCreatedThisInstance); } /** Clone a prototype template. * Copy all fields except DebugState. */ public Template(Template prototype) : this(prototype, false) { } protected Template(Template prototype, bool shadowLocals) { if (prototype == null) throw new ArgumentNullException("prototype"); this.impl = prototype.impl; if (shadowLocals && prototype.locals != null) this.locals = (object[])prototype.locals.Clone(); else if (impl.FormalArguments != null && impl.FormalArguments.Count > 0) this.locals = new object[impl.FormalArguments.Count]; this.groupThatCreatedThisInstance = prototype.groupThatCreatedThisInstance; } public TemplateDebugState DebugState { get { return _debugState; } set { _debugState = value; } } public TemplateGroup Group { get { return groupThatCreatedThisInstance; } set { if (value == null) throw new ArgumentNullException("value"); groupThatCreatedThisInstance = value; } } public virtual Template CreateShadow() { return new Template(this, true); } /** Inject an attribute (name/value pair). If there is already an * attribute with that name, this method turns the attribute into an * AttributeList with both the previous and the new attribute as elements. * This method will never alter a List that you inject. If you send * in a List and then inject a single value element, Add() copies * original list and adds the new value. * * Return self so we can chain. t.add("x", 1).add("y", "hi"); */ - [MethodImpl(MethodImplOptions.Synchronized)] public virtual Template Add(string name, object value) { - if (name == null) - throw new ArgumentNullException("name"); - if (name.IndexOf('.') >= 0) - throw new ArgumentException("cannot have '.' in attribute names"); + lock (this) + { if (name == null) + throw new ArgumentNullException("name"); + if (name.IndexOf('.') >= 0) + throw new ArgumentException("cannot have '.' in attribute names"); - if (Group.TrackCreationEvents) - { - if (_debugState == null) - _debugState = new TemplateDebugState(); - _debugState.AddAttributeEvents.Add(name, new AddAttributeEvent(name, value)); - } + if (Group.TrackCreationEvents) + { + if (_debugState == null) + _debugState = new TemplateDebugState(); + _debugState.AddAttributeEvents.Add(name, new AddAttributeEvent(name, value)); + } - FormalArgument arg = null; - if (impl.HasFormalArgs) - { - arg = impl.TryGetFormalArgument(name); - if (arg == null) - throw new ArgumentException("no such attribute: " + name); - } - else - { - // define and make room in locals (a hack to make new Template("simple template") work.) - arg = impl.TryGetFormalArgument(name); - if (arg == null) + FormalArgument arg = null; + if (impl.HasFormalArgs) { - // not defined - arg = new FormalArgument(name); - impl.AddArgument(arg); - if (locals == null) - locals = new object[1]; - else - Array.Resize(ref locals, impl.FormalArguments.Count); - - locals[arg.Index] = EmptyAttribute; + arg = impl.TryGetFormalArgument(name); + if (arg == null) + throw new ArgumentException("no such attribute: " + name); + } + else + { + // define and make room in locals (a hack to make new Template("simple template") work.) + arg = impl.TryGetFormalArgument(name); + if (arg == null) + { + // not defined + arg = new FormalArgument(name); + impl.AddArgument(arg); + if (locals == null) + locals = new object[1]; + else + Array.Resize(ref locals, impl.FormalArguments.Count); + + locals[arg.Index] = EmptyAttribute; + } } - } - object curvalue = locals[arg.Index]; - if (curvalue == EmptyAttribute) - { - // new attribute - locals[arg.Index] = value; - return this; - } + object curvalue = locals[arg.Index]; + if (curvalue == EmptyAttribute) + { + // new attribute + locals[arg.Index] = value; + return this; + } - // attribute will be multi-valued for sure now - // convert current attribute to list if not already - // copy-on-Write semantics; copy a list injected by user to Add new value - AttributeList multi = ConvertToAttributeList(curvalue); - locals[arg.Index] = multi; // replace with list + // attribute will be multi-valued for sure now + // convert current attribute to list if not already + // copy-on-Write semantics; copy a list injected by user to Add new value + AttributeList multi = ConvertToAttributeList(curvalue); + locals[arg.Index] = multi; // replace with list - // now, Add incoming value to multi-valued attribute - IList list = value as IList; - if (list != null) - { - // flatten incoming list into existing list - multi.AddRange(list.Cast<object>()); - } - else - { - multi.Add(value); - } + // now, Add incoming value to multi-valued attribute + IList list = value as IList; + if (list != null) + { + // flatten incoming list into existing list + multi.AddRange(list.Cast<object>()); + } + else + { + multi.Add(value); + } - return this; + return this; + } } /** Split "aggrName.{propName1,propName2}" into list [propName1,propName2] * and the aggrName. Spaces are allowed around ','. */ - [MethodImpl(MethodImplOptions.Synchronized)] public Template AddMany(string aggrSpec, params object[] values) { - if (aggrSpec == null) - throw new ArgumentNullException("aggrSpec"); - if (values == null) - throw new ArgumentNullException("values"); - - if (values.Length == 0) - throw new ArgumentException(string.Format("missing values for aggregate attribute format: {0}", aggrSpec), "aggrSpec"); - - int dot = aggrSpec.IndexOf(".{"); - int finalCurly = aggrSpec.IndexOf('}'); - if (dot < 0 || finalCurly < 0) - throw new ArgumentException(string.Format("invalid aggregate attribute format: {0}", aggrSpec), "aggrSpec"); - - string aggrName = aggrSpec.Substring(0, dot); - string propString = aggrSpec.Substring(dot + 2, aggrSpec.Length - dot - 3); - propString = propString.Trim(); - string[] propNames = Array.ConvertAll(propString.Split(','), p => p.Trim()); - if (propNames == null || propNames.Length == 0) - throw new ArgumentException(string.Format("invalid aggregate attribute format: {0}", aggrSpec), "aggrSpec"); - - if (values.Length != propNames.Length) - throw new ArgumentException(string.Format("number of properties and values mismatch for aggregate attribute format: {0}", aggrSpec), "aggrSpec"); - - int i = 0; - Aggregate aggr = new Aggregate(); - foreach (string p in propNames) + lock (this) { - object value = values[i++]; - aggr[p] = value; - } + if (aggrSpec == null) + throw new ArgumentNullException("aggrSpec"); + if (values == null) + throw new ArgumentNullException("values"); + + if (values.Length == 0) + throw new ArgumentException(string.Format("missing values for aggregate attribute format: {0}", aggrSpec), "aggrSpec"); + + int dot = aggrSpec.IndexOf(".{"); + int finalCurly = aggrSpec.IndexOf('}'); + if (dot < 0 || finalCurly < 0) + throw new ArgumentException(string.Format("invalid aggregate attribute format: {0}", aggrSpec), "aggrSpec"); + + string aggrName = aggrSpec.Substring(0, dot); + string propString = aggrSpec.Substring(dot + 2, aggrSpec.Length - dot - 3); + propString = propString.Trim(); + string[] propNames = Arrays.ConvertAll(propString.Split(','), p => p.Trim()); + if (propNames == null || propNames.Length == 0) + throw new ArgumentException(string.Format("invalid aggregate attribute format: {0}", aggrSpec), "aggrSpec"); + + if (values.Length != propNames.Length) + throw new ArgumentException(string.Format("number of properties and values mismatch for aggregate attribute format: {0}", aggrSpec), "aggrSpec"); + + int i = 0; + Aggregate aggr = new Aggregate(); + foreach (string p in propNames) + { + object value = values[i++]; + aggr[p] = value; + } - Add(aggrName, aggr); // now add as usual - return this; + Add(aggrName, aggr); // now add as usual + return this; + } } /** Remove an attribute value entirely (can't Remove attribute definitions). */ public virtual void Remove(string name) { if (impl.FormalArguments == null) { if (impl.HasFormalArgs) throw new ArgumentException("no such attribute: " + name); return; } FormalArgument arg = impl.TryGetFormalArgument(name); if (arg == null) throw new ArgumentException("no such attribute: " + name); locals[arg.Index] = EmptyAttribute; // reset value } /** Set this.locals attr value when you only know the name, not the index. * This is ultimately invoked by calling Template.Add() from outside so toss * an exception to notify them. */ protected internal virtual void RawSetAttribute(string name, object value) { if (impl.FormalArguments == null) throw new ArgumentException("no such attribute: " + name); FormalArgument arg = impl.TryGetFormalArgument(name); if (arg == null) throw new ArgumentException("no such attribute: " + name); locals[arg.Index] = value; } /** Find an attr in this template only. */ public virtual object GetAttribute(string name) { FormalArgument localArg = impl.TryGetFormalArgument(name); if (localArg != null) { object o = locals[localArg.Index]; if (o == Template.EmptyAttribute) o = null; return o; } return null; // if (context != null) // { // p = context.Template; // context = context.Parent; // } // else // { // p = null; // } //// got to root template and no definition, try dictionaries in group //if (impl.NativeGroup.IsDictionary(name)) //{ // return impl.NativeGroup.RawGetDictionary(name); //} //throw new TemplateNoSuchPropertyException(name); } public virtual IDictionary<string, object> GetAttributes() { if (impl.FormalArguments == null) return null; IDictionary<string, object> attributes = new Dictionary<string, object>(); foreach (FormalArgument a in impl.FormalArguments) { object o = locals[a.Index]; if (o == Template.EmptyAttribute) o = null; attributes[a.Name] = o; } return attributes; } protected static AttributeList ConvertToAttributeList(object curvalue) { AttributeList multi; if (curvalue == null) { multi = new AttributeList(); // make list to hold multiple values multi.Add(curvalue); // Add previous single-valued attribute } else if (curvalue.GetType() == typeof(AttributeList)) { // already a list made by Template multi = (AttributeList)curvalue; } else if (curvalue is IList) { // existing attribute is non-Template List // must copy to an Template-managed list before adding new attribute // (can't alter incoming attributes) IList listAttr = (IList)curvalue; multi = new AttributeList(listAttr.Count); multi.AddRange(listAttr.Cast<object>()); } else { // curvalue nonlist and we want to Add an attribute // must convert curvalue existing to list multi = new AttributeList(); // make list to hold multiple values multi.Add(curvalue); // Add previous single-valued attribute } return multi; } public virtual string Name { get { return impl.Name; } } public virtual bool IsAnonymousSubtemplate { get { return impl.IsAnonSubtemplate; } } public virtual int Write(ITemplateWriter @out) { Interpreter interp = new Interpreter(Group, impl.NativeGroup.ErrorManager, false); TemplateFrame frame = new TemplateFrame(this, null); return interp.Execute(@out, frame); } public virtual int Write(ITemplateWriter @out, CultureInfo culture) { Interpreter interp = new Interpreter(Group, culture, impl.NativeGroup.ErrorManager, false); TemplateFrame frame = new TemplateFrame(this, null); return interp.Execute(@out, frame); } public virtual int Write(ITemplateWriter @out, ITemplateErrorListener listener) { Interpreter interp = new Interpreter(Group, new ErrorManager(listener), false); TemplateFrame frame = new TemplateFrame(this, null); return interp.Execute(@out, frame); } public virtual int Write(ITemplateWriter @out, CultureInfo culture, ITemplateErrorListener listener) { Interpreter interp = new Interpreter(Group, culture, new ErrorManager(listener), false); TemplateFrame frame = new TemplateFrame(this, null); return interp.Execute(@out, frame); } public virtual int Write(TextWriter writer, ITemplateErrorListener listener) { return Write(writer, CultureInfo.CurrentCulture, listener, AutoIndentWriter.NoWrap); } public virtual int Write(TextWriter writer, ITemplateErrorListener listener, int lineWidth) { return Write(writer, CultureInfo.CurrentCulture, listener, lineWidth); } public virtual int Write(TextWriter writer, CultureInfo culture, ITemplateErrorListener listener, int lineWidth) { ITemplateWriter templateWriter = new AutoIndentWriter(writer) { LineWidth = lineWidth }; return Write(templateWriter, culture, listener); } public virtual string Render() { return Render(CultureInfo.CurrentCulture); } public virtual string Render(int lineWidth) { return Render(CultureInfo.CurrentCulture, lineWidth); } public virtual string Render(CultureInfo culture) { return Render(culture, AutoIndentWriter.NoWrap); } public virtual string Render(CultureInfo culture, int lineWidth) { StringWriter @out = new StringWriter(); ITemplateWriter wr = new AutoIndentWriter(@out); wr.LineWidth = lineWidth; Write(wr, culture); return @out.ToString(); } // TESTING SUPPORT public virtual List<InterpEvent> GetEvents() { return GetEvents(CultureInfo.CurrentCulture); } public virtual List<InterpEvent> GetEvents(int lineWidth) { return GetEvents(CultureInfo.CurrentCulture, lineWidth); } public virtual List<InterpEvent> GetEvents(ITemplateWriter writer) { return GetEvents(CultureInfo.CurrentCulture, writer); } public virtual List<InterpEvent> GetEvents(CultureInfo locale) { return GetEvents(locale, AutoIndentWriter.NoWrap); } public virtual List<InterpEvent> GetEvents(CultureInfo locale, int lineWidth) { StringWriter @out = new StringWriter(); ITemplateWriter wr = new AutoIndentWriter(@out); wr.LineWidth = lineWidth; return GetEvents(locale, wr); } public virtual List<InterpEvent> GetEvents(CultureInfo culture, ITemplateWriter writer) { Interpreter interp = new Interpreter(Group, culture, true); TemplateFrame frame = new TemplateFrame(this, null); interp.Execute(writer, frame); // Render and track events return interp.GetEvents(); } public override string ToString() { if (impl == null) return "bad-template()"; string args = string.Empty; if (impl.FormalArguments != null) args = string.Join(",", impl.FormalArguments.Select(i => i.Name).ToArray()); string name = Name; if (this.impl.IsRegion) name = "@" + TemplateGroup.GetUnmangledTemplateName(name); return string.Format("{0}({1})", name, args); } // Template.Format("<%1>:<%2>", n, p); public static string Format(string template, params object[] attributes) { return Format(AutoIndentWriter.NoWrap, template, attributes); } public static string Format(int lineWidth, string template, params object[] attributes) { template = Regex.Replace(template, "[0-9]+", "arg$0"); Template st = new Template(template); int i = 1; foreach (object a in attributes) { st.Add("arg" + i, a); i++; } return st.Render(lineWidth); } /** Events during template hierarchy construction (not evaluation) */ public class TemplateDebugState { /** Record who made us? ConstructionEvent creates Exception to grab stack */ public ConstructionEvent NewTemplateEvent; /** Track construction-time add attribute "events"; used for ST user-level debugging */ public MultiMap<string, AddAttributeEvent> AddAttributeEvents = new MultiMap<string, AddAttributeEvent>(); } } } diff --git a/Antlr4.StringTemplate/TemplateGroup.cs b/Antlr4.StringTemplate/TemplateGroup.cs index 2ec7e7d..78dc773 100644 --- a/Antlr4.StringTemplate/TemplateGroup.cs +++ b/Antlr4.StringTemplate/TemplateGroup.cs @@ -1,1953 +1,1948 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using Antlr.Runtime; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Extensions; using Antlr4.StringTemplate.Misc; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using BinaryReader = System.IO.BinaryReader; using BinaryWriter = System.IO.BinaryWriter; using Console = System.Console; using DateTime = System.DateTime; using DateTimeKind = System.DateTimeKind; using Directory = System.IO.Directory; using Environment = System.Environment; using Exception = System.Exception; using File = System.IO.File; using IDictionary = System.Collections.IDictionary; using IOException = System.IO.IOException; using MemoryStream = System.IO.MemoryStream; using NotImplementedException = System.NotImplementedException; using NotSupportedException = System.NotSupportedException; using Path = System.IO.Path; using SeekOrigin = System.IO.SeekOrigin; using Stream = System.IO.Stream; + using StreamReader = System.IO.StreamReader; using StringBuilder = System.Text.StringBuilder; using StringComparer = System.StringComparer; using TemplateToken = Antlr4.StringTemplate.Compiler.TemplateLexer.TemplateToken; using Type = System.Type; using TypeCode = System.TypeCode; using Uri = System.Uri; using UriFormatException = System.UriFormatException; /** A directory or directory tree of .st template files and/or group files. * Individual template files contain formal template definitions. In a sense, * it's like a single group file broken into multiple files, one for each template. * Template v3 had just the pure template inside, not the template name and header. * Name inside must match filename (minus suffix). */ public class TemplateGroup { public static readonly string GroupFileExtension = ".stg"; public static readonly string TemplateFileExtension = ".st"; /** When we use key as a value in a dictionary, this is how we signify. */ public static readonly string DictionaryKey = "key"; public static readonly string DefaultKey = "default"; /** Load files using what encoding? */ private Encoding _encoding = Encoding.UTF8; /** Every group can import templates/dictionaries from other groups. * The list must be synchronized (see ImportTemplates). */ private readonly List<TemplateGroup> _imports = new List<TemplateGroup>(); private readonly List<TemplateGroup> _importsToClearOnUnload = new List<TemplateGroup>(); private char delimiterStartChar = '<'; // Use <expr> by default private char delimiterStopChar = '>'; /** Maps template name to StringTemplate object. synchronized. */ private readonly Dictionary<string, CompiledTemplate> templates = new Dictionary<string, CompiledTemplate>(); /** Maps dict names to HashMap objects. This is the list of dictionaries * defined by the user like typeInitMap ::= ["int":"0"] */ private readonly Dictionary<string, IDictionary<string, object>> dictionaries = new Dictionary<string, IDictionary<string, object>>(); /** A dictionary that allows people to register a renderer for * a particular kind of object for any template evaluated relative to this * group. For example, a date should be formatted differently depending * on the culture. You can set Date.class to an object whose * ToString(Object) method properly formats a Date attribute * according to culture. Or you can have a different renderer object * for each culture. * * Order of addition is recorded and matters. If more than one * renderer works for an object, the first registered has priority. * * Renderer associated with type t works for object o if * * t.isAssignableFrom(o.getClass()) // would assignment t = o work? * * So it works if o is subclass or implements t. * * This structure is synchronized. */ private TypeRegistry<IAttributeRenderer> renderers; private TypeRegistry<ITypeProxyFactory> _proxyFactories; /** A dictionary that allows people to register a model adaptor for * a particular kind of object (subclass or implementation). Applies * for any template evaluated relative to this group. * * Template initializes with model adaptors that know how to pull * properties out of Objects, Maps, and STs. */ protected readonly TypeRegistry<IModelAdaptor> adaptors = new TypeRegistry<IModelAdaptor>() { {typeof(object), new ObjectModelAdaptor()}, {typeof(Template), new TemplateModelAdaptor()}, {typeof(IDictionary), new MapModelAdaptor()}, {typeof(Aggregate), new AggregateModelAdaptor()}, }; /** Watch loading of groups and templates */ private bool _verbose = false; private bool _enableCache = false; /** For debugging with STViz. Records where in code an ST was created * and where code added attributes. */ private bool _trackCreationEvents = false; /** v3 compatibility; used to iterate across values not keys like v4. * But to convert ANTLR templates, it's too hard to find without * static typing in templates. */ private bool _iterateAcrossValues = false; /** Used to indicate that the template doesn't exist. * Prevents duplicate group file loads and unnecessary file checks. */ protected static readonly CompiledTemplate NotFoundTemplate = new CompiledTemplate(); private static readonly ErrorManager _defaultErrorManager = new ErrorManager(); private static TemplateGroup _defaultGroup = new TemplateGroup(); /** The error manager for entire group; all compilations and executions. * This gets copied to parsers, walkers, and interpreters. */ private ErrorManager _errorManager = TemplateGroup.DefaultErrorManager; public TemplateGroup() { } public TemplateGroup(char delimiterStartChar, char delimiterStopChar) { this.delimiterStartChar = delimiterStartChar; this.delimiterStopChar = delimiterStopChar; } public static ErrorManager DefaultErrorManager { get { return _defaultErrorManager; } } public static TemplateGroup DefaultGroup { get { return _defaultGroup; } set { if (value == null) throw new ArgumentNullException("value"); _defaultGroup = value; } } public char DelimiterStartChar { get { return delimiterStartChar; } } public char DelimiterStopChar { get { return delimiterStopChar; } } public ICollection<CompiledTemplate> CompiledTemplates { get { return templates.Values; } } public Encoding Encoding { get { return _encoding; } set { if (value == null) throw new ArgumentNullException("value"); _encoding = value; } } public ErrorManager ErrorManager { get { return _errorManager; } set { if (value == null) throw new ArgumentNullException("value"); _errorManager = value; } } public bool Verbose { get { return _verbose; } set { _verbose = value; } } public bool EnableCache { get { return _enableCache; } set { _enableCache = value; } } public bool TrackCreationEvents { get { return _trackCreationEvents; } set { _trackCreationEvents = value; } } public bool IterateAcrossValues { get { return _iterateAcrossValues; } set { _iterateAcrossValues = value; } } public ReadOnlyCollection<TemplateGroup> ImportedGroups { get { return _imports.AsReadOnly(); } } /** The primary means of getting an instance of a template from this * group. Names must be absolute, fully-qualified names like a/b */ public virtual Template GetInstanceOf(string name) { if (name == null) return null; if (!name.StartsWith("/")) name = "/" + name; if (Verbose) Console.WriteLine(string.Format("{0}.GetInstanceOf({1})", Name, name)); CompiledTemplate c = LookupTemplate(name); if (c != null) return CreateStringTemplate(c); return null; } protected internal virtual Template GetEmbeddedInstanceOf(TemplateFrame frame, string name) { string fullyQualifiedName = name; if (!name.StartsWith("/")) fullyQualifiedName = frame.Template.impl.Prefix + name; if (Verbose) Console.WriteLine(string.Format("getEmbeddedInstanceOf({0})", fullyQualifiedName)); Template st = GetInstanceOf(fullyQualifiedName); if (st == null) { ErrorManager.RuntimeError(frame, ErrorType.NO_SUCH_TEMPLATE, fullyQualifiedName); return CreateStringTemplateInternally(new CompiledTemplate()); } // this is only called internally. wack any debug ST create events if (TrackCreationEvents) { // toss it out st.DebugState.NewTemplateEvent = null; } return st; } /** Create singleton template for use with dictionary values */ public virtual Template CreateSingleton(IToken templateToken) { string template; if (templateToken.Type == GroupParser.BIGSTRING || templateToken.Type == GroupParser.BIGSTRING_NO_NL) { template = Utility.Strip(templateToken.Text, 2); } else { template = Utility.Strip(templateToken.Text, 1); } CompiledTemplate impl = Compile(FileName, null, null, template, templateToken); Template st = CreateStringTemplateInternally(impl); st.Group = this; st.impl.HasFormalArgs = false; st.impl.Name = Template.UnknownName; st.impl.DefineImplicitlyDefinedTemplates(this); return st; } /** Is this template defined in this group or from this group below? * Names must be absolute, fully-qualified names like /a/b */ public virtual bool IsDefined(string name) { return LookupTemplate(name) != null; } /** Look up a fully-qualified name */ public virtual CompiledTemplate LookupTemplate(string name) { if (name[0] != '/') name = "/" + name; if (Verbose) Console.WriteLine(string.Format("{0}.LookupTemplate({1})", Name, name)); CompiledTemplate code; templates.TryGetValue(name, out code); if (code == NotFoundTemplate) { if (Verbose) Console.WriteLine(string.Format("{0} previously seen as not found", name)); return null; } // try to load from disk and look up again if (code == null) code = Load(name); if (code == null) code = LookupImportedTemplate(name); if (code == null) { if (Verbose) Console.WriteLine(string.Format("{0} recorded not found", name)); templates[name] = NotFoundTemplate; } if (Verbose && code != null) Console.WriteLine(string.Format("{0}.LookupTemplate({1}) found", Name, name)); return code; } /** "Unload" all templates and dictionaries but leave renderers, adaptors, * and import relationships. This essentially forces next GetInstanceOf * to reload templates. */ - [MethodImpl(MethodImplOptions.Synchronized)] public virtual void Unload() { - templates.Clear(); - dictionaries.Clear(); + lock (this) + { + templates.Clear(); + dictionaries.Clear(); - foreach (var import in _imports) - import.Unload(); + foreach (var import in _imports) + import.Unload(); - foreach (var import in _importsToClearOnUnload) - _imports.Remove(import); + foreach (var import in _importsToClearOnUnload) + _imports.Remove(import); - _importsToClearOnUnload.Clear(); + _importsToClearOnUnload.Clear(); + } } /** Load st from disk if dir or load whole group file if .stg file (then * return just one template). name is fully-qualified. */ protected virtual CompiledTemplate Load(string name) { return null; } /** Force a load if it makes sense for the group */ public virtual void Load() { } protected internal virtual CompiledTemplate LookupImportedTemplate(string name) { if (_imports == null) return null; foreach (TemplateGroup g in _imports) { if (Verbose) Console.WriteLine(string.Format("checking {0} for imported {1}", g.Name, name)); CompiledTemplate code = g.LookupTemplate(name); if (code != null) { if (Verbose) Console.WriteLine(string.Format("{0}.LookupImportedTemplate({1}) found", g.Name, name)); return code; } } if (Verbose) Console.WriteLine(string.Format("{0} not found in {1} imports", name, Name)); return null; } public virtual CompiledTemplate RawGetTemplate(string name) { CompiledTemplate template; templates.TryGetValue(name, out template); return template; } public virtual IDictionary<string, object> RawGetDictionary(string name) { IDictionary<string, object> dictionary; dictionaries.TryGetValue(name, out dictionary); return dictionary; } public virtual bool IsDictionary(string name) { return RawGetDictionary(name) != null; } // for testing public virtual CompiledTemplate DefineTemplate(string name, string template) { if (name[0] != '/') name = "/" + name; try { CompiledTemplate impl = DefineTemplate(name, new CommonToken(GroupParser.ID, name), null, template, null); return impl; } catch (TemplateException) { Console.Error.WriteLine("eh?"); } return null; } // for testing public virtual CompiledTemplate DefineTemplate(string name, string template, string[] arguments) { if (name[0] != '/') name = "/" + name; List<FormalArgument> a = new List<FormalArgument>(); foreach (string arg in arguments) a.Add(new FormalArgument(arg)); return DefineTemplate(name, new CommonToken(GroupParser.ID, name), a, template, null); } public virtual CompiledTemplate DefineTemplate(string fullyQualifiedTemplateName, IToken nameT, List<FormalArgument> args, string template, IToken templateToken) { if (Verbose) Console.WriteLine(string.Format("DefineTemplate({0})", fullyQualifiedTemplateName)); if (fullyQualifiedTemplateName == null) throw new ArgumentNullException("fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName.Length == 0) throw new ArgumentException("empty template name", "fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName.IndexOf('.') >= 0) throw new ArgumentException("cannot have '.' in template names", "fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName[0] != '/') throw new ArgumentException("Expected a fully qualified template name.", "fullyQualifiedTemplateName"); template = Utility.TrimOneStartingNewline(template); template = Utility.TrimOneTrailingNewline(template); // compile, passing in templateName as enclosing name for any embedded regions CompiledTemplate code = Compile(FileName, fullyQualifiedTemplateName, args, template, templateToken); code.Name = fullyQualifiedTemplateName; RawDefineTemplate(fullyQualifiedTemplateName, code, nameT); code.DefineArgumentDefaultValueTemplates(this); code.DefineImplicitlyDefinedTemplates(this); // define any anonymous subtemplates return code; } /** Make name and alias for target. Replace any previous def of name */ public virtual CompiledTemplate DefineTemplateAlias(IToken aliasT, IToken targetT) { string alias = aliasT.Text; string target = targetT.Text; CompiledTemplate targetCode = RawGetTemplate("/" + target); if (targetCode == null) { ErrorManager.CompiletimeError(ErrorType.ALIAS_TARGET_UNDEFINED, null, aliasT, alias, target); return null; } RawDefineTemplate("/" + alias, targetCode, aliasT); return targetCode; } public virtual CompiledTemplate DefineRegion(string enclosingTemplateName, IToken regionT, string template, IToken templateToken) { string name = regionT.Text; template = Utility.TrimOneStartingNewline(template); template = Utility.TrimOneTrailingNewline(template); CompiledTemplate code = Compile(FileName, enclosingTemplateName, null, template, templateToken); string mangled = GetMangledRegionName(enclosingTemplateName, name); if (LookupTemplate(mangled) == null) { ErrorManager.CompiletimeError(ErrorType.NO_SUCH_REGION, null, regionT, enclosingTemplateName, name); return new CompiledTemplate(); } code.Name = mangled; code.IsRegion = true; code.RegionDefType = Template.RegionType.Explicit; code.TemplateDefStartToken = regionT; RawDefineTemplate(mangled, code, regionT); code.DefineArgumentDefaultValueTemplates(this); code.DefineImplicitlyDefinedTemplates(this); // define any anonymous subtemplates return code; } public virtual void DefineTemplateOrRegion( string fullyQualifiedTemplateName, string regionSurroundingTemplateName, IToken templateToken, string template, IToken nameToken, List<FormalArgument> args) { if (fullyQualifiedTemplateName[0] != '/') throw new ArgumentException("Expected a fully qualified template name.", "fullyQualifiedTemplateName"); try { if (regionSurroundingTemplateName != null) { DefineRegion(regionSurroundingTemplateName, nameToken, template, templateToken); } else { DefineTemplate(fullyQualifiedTemplateName, nameToken, args, template, templateToken); } } catch (TemplateException) { // after getting syntax error in a template, we emit msg // and throw exception to blast all the way out to here. } } public virtual void RawDefineTemplate(string name, CompiledTemplate code, IToken defT) { CompiledTemplate prev; templates.TryGetValue(name, out prev); if (prev != null) { if (!prev.IsRegion) { ErrorManager.CompiletimeError(ErrorType.TEMPLATE_REDEFINITION, null, defT); return; } /* If this region was previously defined, the following actions should be taken: * * Previous type Current type Result Applied Reason * ------------- ------------ ------ ------- ------ * Implicit Implicit Success Previous A rule may make multiple implicit references to the same region. * Keeping either has the same semantics, so the existing one is * used for slightly less overhead. * Implicit Explicit Success Current A region with previous implicit references is now being explicitly * defined. * Implicit Embedded Success Current A region with previous implicit references is now being defined * with an embedded region. * Explicit Implicit Success Previous An explicitly defined region is now being implicitly referenced. * Make sure to keep the previous explicit definition as the actual * definition. * Explicit Explicit Error Previous Multiple explicit definitions exist for the same region (template * redefinition error). Give an error and use the previous one. * Explicit Embedded Warning Previous An explicit region definition already exists for the current * embedded region definition. The explicit definition overrides the * embedded definition and a warning is given since the embedded * definition is hidden. * Embedded Implicit Success Previous A region with an embedded definition is now being implicitly * referenced. The embedded definition should be used. * Embedded Explicit Warning Current A region with an embedded definition is now being explicitly * defined. The explicit definition overrides the embedded * definition and a warning is given since the embedded definition * is hidden. * Embedded Embedded Error Previous Multiple embedded definitions of the same region were given in a * template. Give an error and use the previous one. */ // handle the Explicit/Explicit and Embedded/Embedded error cases if (code.RegionDefType != Template.RegionType.Implicit && code.RegionDefType == prev.RegionDefType) { if (code.RegionDefType == Template.RegionType.Embedded) ErrorManager.CompiletimeError(ErrorType.EMBEDDED_REGION_REDEFINITION, null, defT, GetUnmangledTemplateName(name)); else ErrorManager.CompiletimeError(ErrorType.REGION_REDEFINITION, null, defT, GetUnmangledTemplateName(name)); // keep the previous one return; } // handle the Explicit/Embedded and Embedded/Explicit warning cases else if ((code.RegionDefType == Template.RegionType.Embedded && prev.RegionDefType == Template.RegionType.Explicit) || (code.RegionDefType == Template.RegionType.Explicit && prev.RegionDefType == Template.RegionType.Embedded)) { // TODO: can we make this a warning? ErrorManager.CompiletimeError(ErrorType.HIDDEN_EMBEDDED_REGION_DEFINITION, null, defT, GetUnmangledTemplateName(name)); // keep the previous one only if that's the explicit definition if (prev.RegionDefType == Template.RegionType.Explicit) return; } // else if the current definition type is implicit, keep the previous one else if (code.RegionDefType == Template.RegionType.Implicit) { return; } } code.NativeGroup = this; code.TemplateDefStartToken = defT; templates[name] = code; } public virtual void UndefineTemplate(string name) { templates.Remove(name); } /** Compile a template */ public virtual CompiledTemplate Compile(string srcName, string name, List<FormalArgument> args, string template, IToken templateToken) // for error location { //System.out.println("TemplateGroup.Compile: "+enclosingTemplateName); TemplateCompiler c = new TemplateCompiler(this); return c.Compile(srcName, name, args, template, templateToken); } /** The "foo" of t() ::= "&lt;@foo()&gt;" is mangled to "/region__/t__foo" */ public static string GetMangledRegionName(string enclosingTemplateName, string name) { if (enclosingTemplateName[0] != '/') enclosingTemplateName = '/' + enclosingTemplateName; return "/region__" + enclosingTemplateName + "__" + name; } /** Return "t.foo" from "/region__/t__foo" */ public static string GetUnmangledTemplateName(string mangledName) { string t = mangledName.Substring("/region__".Length, mangledName.LastIndexOf("__") - "/region__".Length); string r = mangledName.Substring(mangledName.LastIndexOf("__") + 2, mangledName.Length - mangledName.LastIndexOf("__") - 2); return t + '.' + r; } /** Define a map for this group; not thread safe...do not keep adding * these while you reference them. */ public virtual void DefineDictionary(string name, IDictionary<string, object> mapping) { dictionaries[name] = mapping; } public virtual void SetDelimiters(IToken openDelimiter, IToken closeDelimiter) { if (openDelimiter == null) throw new ArgumentNullException("openDelimiter"); if (closeDelimiter == null) throw new ArgumentNullException("closeDelimiter"); string openDelimiterText = openDelimiter.Text.Trim('"'); if (openDelimiterText.Length != 1) { ErrorManager.CompiletimeError(ErrorType.INVALID_DELIMITER, null, openDelimiter, openDelimiterText); return; } string closeDelimiterText = closeDelimiter.Text.Trim('"'); if (closeDelimiterText.Length != 1) { ErrorManager.CompiletimeError(ErrorType.INVALID_DELIMITER, null, openDelimiter, closeDelimiterText); return; } SetDelimiters(openDelimiterText[0], closeDelimiterText[0]); } public virtual void SetDelimiters(char delimiterStartChar, char delimiterStopChar) { this.delimiterStartChar = delimiterStartChar; this.delimiterStopChar = delimiterStopChar; } /** Make this group import templates/dictionaries from g. */ public virtual void ImportTemplates(TemplateGroup g) { ImportTemplates(g, false); } /** Make this group import templates/dictionaries from g. */ private void ImportTemplates(TemplateGroup group, bool clearOnUnload) { if (group == null) return; _imports.Add(group); if (clearOnUnload) _importsToClearOnUnload.Add(group); } /** Import template files, directories, and group files. * Priority is given to templates defined in the current group; * this, in effect, provides inheritance. Polymorphism is in effect so * that if an inherited template references template t() then we * search for t() in the subgroup first. * * Templates are loaded on-demand from import dirs. Imported groups are * loaded on-demand when searching for a template. * * The listener of this group is passed to the import group so errors * found while loading imported element are sent to listener of this group. */ public virtual void ImportTemplates(IToken fileNameToken) { string fileName = fileNameToken.Text; if (Verbose) Console.WriteLine("ImportTemplates({0})", fileName); // do nothing upon syntax error if (fileName == null || fileName.Equals("<missing STRING>")) return; fileName = Utility.Strip(fileName, 1); //Console.WriteLine("import {0}", fileName); bool isGroupFile = fileName.EndsWith(GroupFileExtension); bool isTemplateFile = fileName.EndsWith(TemplateFileExtension); bool isGroupDir = !(isGroupFile || isTemplateFile); TemplateGroup g = null; // search path is: working dir, g.stg's dir, CLASSPATH Uri thisRoot = RootDirUri; Uri fileUnderRoot = null; //Console.WriteLine("thisRoot={0}", thisRoot); try { fileUnderRoot = new Uri(thisRoot + "/" + fileName); } catch (UriFormatException mfe) { ErrorManager.InternalError(null, string.Format("can't build URL for {0}/{1}", thisRoot, fileName), mfe); return; } if (isTemplateFile) { g = new TemplateGroup(delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; Uri fileURL = null; if (File.Exists(fileUnderRoot.LocalPath)) fileURL = fileUnderRoot; if (fileURL != null) { try { Stream s = File.OpenRead(fileURL.LocalPath); ANTLRInputStream templateStream = new ANTLRInputStream(s); templateStream.name = fileName; CompiledTemplate code = g.LoadTemplateFile("/", fileName, templateStream); if (code == null) g = null; } catch (IOException ioe) { ErrorManager.InternalError(null, string.Format("can't read from {0}", fileURL), ioe); g = null; } } else { g = null; } } else if (isGroupFile) { //System.out.println("look for fileUnderRoot: "+fileUnderRoot); if (File.Exists(fileUnderRoot.LocalPath)) { g = new TemplateGroupFile(fileUnderRoot, Encoding, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } else { g = new TemplateGroupFile(fileName, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } } else if (isGroupDir) { // System.out.println("try dir "+fileUnderRoot); if (Directory.Exists(fileUnderRoot.LocalPath)) { g = new TemplateGroupDirectory(fileUnderRoot, Encoding, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } else { // try in CLASSPATH // System.out.println("try dir in CLASSPATH "+fileName); g = new TemplateGroupDirectory(fileName, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } } if (g == null) { ErrorManager.CompiletimeError(ErrorType.CANT_IMPORT, null, fileNameToken, fileName); } else { ImportTemplates(g, true); } } /** Load a group file with full path fileName; it's relative to root by prefix. */ public virtual void LoadGroupFile(string prefix, string fileName) { if (Verbose) { Console.Out.WriteLine("{0}.LoadGroupFile(prefix={1}, fileName={2})", GetType().FullName, prefix, fileName); } GroupParser parser = null; try { Uri f = new Uri(fileName); - ANTLRReaderStream fs = new ANTLRReaderStream(new System.IO.StreamReader(f.LocalPath, Encoding)); + ANTLRReaderStream fs = new ANTLRReaderStream(new System.IO.StreamReader(File.OpenRead(f.LocalPath), Encoding)); var timer = System.Diagnostics.Stopwatch.StartNew(); string cachePath = Path.Combine(Path.GetTempPath(), "ST4TemplateCache"); if (EnableCache && TryLoadGroupFromCache(cachePath, prefix, fileName)) { System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the group from cache {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); } else { GroupLexer lexer = new GroupLexer(fs); fs.name = fileName; CommonTokenStream tokens = new CommonTokenStream(lexer); parser = new GroupParser(tokens); parser.group(this, prefix); System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the group {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); if (EnableCache) CacheCompiledGroup(cachePath, prefix, fileName, File.GetLastWriteTimeUtc(f.LocalPath)); } } - catch (Exception e) + catch (Exception e) when (!e.IsCritical()) { - e.PreserveStackTrace(); - if (e.IsCritical()) - throw; - ErrorManager.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName); } } private bool TryLoadGroupFromCache(string cachePath, string prefix, string fileName) { string cacheFileName = Path.GetFileNameWithoutExtension(fileName) + (uint)fileName.GetHashCode() + prefix.Replace(Path.DirectorySeparatorChar, '_').Replace(Path.AltDirectorySeparatorChar, '_'); cacheFileName = Path.Combine(cachePath, cacheFileName); if (!File.Exists(cacheFileName)) return false; try { byte[] data = File.ReadAllBytes(cacheFileName); return TryLoadCachedGroup(data, File.GetLastWriteTimeUtc(new Uri(fileName).LocalPath)); } catch (IOException) { return false; } } private bool TryLoadCachedGroup(byte[] data, DateTime lastWriteTime) { var timer = System.Diagnostics.Stopwatch.StartNew(); var reader = new BinaryReader(new MemoryStream(data), Encoding.UTF8); DateTime cacheTime = new DateTime(reader.ReadInt64(), DateTimeKind.Utc); if (cacheTime != lastWriteTime) return false; Dictionary<int, object> objects = new Dictionary<int, object>(); objects.Add(0, null); // first pass constructs objects long objectTableOffset = reader.BaseStream.Position; int objectCount = reader.ReadInt32(); for (int i = 0; i < objectCount; i++) { int key = reader.ReadInt32(); object obj = CreateGroupObject(reader, key, objects); objects.Add(key, obj); } reader.BaseStream.Seek(objectTableOffset + 4, SeekOrigin.Begin); for (int i = 0; i < objectCount; i++) { int key = reader.ReadInt32(); LoadGroupObject(reader, key, objects); } List<TemplateGroup> importsToClearOnUnload = new List<TemplateGroup>(); Dictionary<string, CompiledTemplate> templates = new Dictionary<string, CompiledTemplate>(); Dictionary<string, IDictionary<string, object>> dictionaries = new Dictionary<string, IDictionary<string, object>>(); // imported groups int importCount = reader.ReadInt32(); for (int i = 0; i < importCount; i++) importsToClearOnUnload.Add((TemplateGroup)objects[reader.ReadInt32()]); // delimiters char delimiterStartChar = reader.ReadChar(); char delimiterStopChar = reader.ReadChar(); // templates & aliases int templateCount = reader.ReadInt32(); for (int i = 0; i < templateCount; i++) { string key = reader.ReadString(); CompiledTemplate value = (CompiledTemplate)objects[reader.ReadInt32()]; templates[key] = value; } // dictionaries int dictionaryCount = reader.ReadInt32(); for (int i = 0; i < dictionaryCount; i++) { string name = reader.ReadString(); IDictionary<string, object> dictionary = new Dictionary<string, object>(); dictionaries[name] = dictionary; int valueCount = reader.ReadInt32(); for (int j = 0; j < valueCount; j++) { string key = reader.ReadString(); object value = objects[reader.ReadInt32()]; dictionary[key] = value; } } this._importsToClearOnUnload.AddRange(importsToClearOnUnload); this.delimiterStartChar = delimiterStartChar; this.delimiterStopChar = delimiterStopChar; foreach (var pair in templates) this.templates[pair.Key] = pair.Value; foreach (var pair in dictionaries) this.dictionaries[pair.Key] = pair.Value; System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the cached group {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); return true; } private object CreateGroupObject(BinaryReader reader, int key, Dictionary<int, object> objects) { var comparer = ObjectReferenceEqualityComparer<object>.Default; int typeKey = reader.ReadInt32(); if (typeKey == 0) { // this is a string return reader.ReadString(); } string typeName = (string)objects[typeKey]; if (typeName == typeof(bool).FullName) { return reader.ReadBoolean(); } else if (typeName == typeof(TemplateToken).FullName || typeName == typeof(CommonToken).FullName) { int channel = reader.ReadInt32(); int charPositionInLine = reader.ReadInt32(); int line = reader.ReadInt32(); int startIndex = reader.ReadInt32(); int stopIndex = reader.ReadInt32(); string text = reader.ReadString(); int tokenIndex = reader.ReadInt32(); int type = reader.ReadInt32(); CommonToken token = new CommonToken(type, text) { Channel = channel, CharPositionInLine = charPositionInLine, Line = line, StartIndex = startIndex, StopIndex = stopIndex, TokenIndex = tokenIndex, }; return token; } else if (typeName == typeof(CompiledTemplate).FullName) { CompiledTemplate compiledTemplate = new CompiledTemplate(); compiledTemplate.Name = reader.ReadString(); compiledTemplate.Prefix = reader.ReadString(); compiledTemplate.Template = reader.ReadString(); int templateDefStartTokenObject = reader.ReadInt32(); compiledTemplate.HasFormalArgs = reader.ReadBoolean(); int nativeGroupObject = reader.ReadInt32(); compiledTemplate.IsRegion = reader.ReadBoolean(); compiledTemplate.RegionDefType = (Template.RegionType)reader.ReadInt32(); compiledTemplate.IsAnonSubtemplate = reader.ReadBoolean(); int formalArgsLength = reader.ReadInt32(); if (formalArgsLength > 0) { for (int i = 0; i < formalArgsLength; i++) { int formalArgObject = reader.ReadInt32(); } } int stringsLength = reader.ReadInt32(); if (stringsLength >= 0) { compiledTemplate.strings = new string[stringsLength]; for (int i = 0; i < stringsLength; i++) compiledTemplate.strings[i] = reader.ReadString(); } int instrsLength = reader.ReadInt32(); if (instrsLength >= 0) compiledTemplate.instrs = reader.ReadBytes(instrsLength); compiledTemplate.codeSize = reader.ReadInt32(); int sourceMapLength = reader.ReadInt32(); if (sourceMapLength >= 0) { compiledTemplate.sourceMap = new Interval[sourceMapLength]; for (int i = 0; i < sourceMapLength; i++) { int start = reader.ReadInt32(); int length = reader.ReadInt32(); if (length >= 0) compiledTemplate.sourceMap[i] = new Interval(start, length); } } return compiledTemplate; } else if (typeName == typeof(FormalArgument).FullName) { string name = reader.ReadString(); int index = reader.ReadInt32(); IToken defaultValueToken = (IToken)objects[reader.ReadInt32()]; int defaultValueObject = reader.ReadInt32(); int compiledDefaultValue = reader.ReadInt32(); FormalArgument formalArgument = new FormalArgument(name, defaultValueToken); formalArgument.Index = index; return formalArgument; } else if (typeName == typeof(Template).FullName) { int implObject = reader.ReadInt32(); int localsCount = reader.ReadInt32(); for (int i = 0; i < localsCount; i++) { int localObject = reader.ReadInt32(); } int groupObject = reader.ReadInt32(); TemplateGroup group = this; Template template = new Template(group); return template; } else if (typeName == typeof(TemplateGroupFile).FullName) { bool isDefaultGroup = reader.ReadBoolean(); if (!isDefaultGroup) return this; else throw new NotSupportedException(); } else if (typeName == typeof(TemplateGroup).FullName) { bool isDefaultGroup = reader.ReadBoolean(); if (isDefaultGroup) return TemplateGroup.DefaultGroup; else throw new NotSupportedException(); } else { throw new NotImplementedException(); } } private void LoadGroupObject(BinaryReader reader, int key, Dictionary<int, object> objects) { var comparer = ObjectReferenceEqualityComparer<object>.Default; int typeKey = reader.ReadInt32(); if (typeKey == 0) { // this is a string, nothing more to load reader.ReadString(); return; } string typeName = (string)objects[typeKey]; if (typeName == typeof(bool).FullName) { // nothing more to load reader.ReadBoolean(); return; } else if (typeName == typeof(TemplateToken).FullName || typeName == typeof(CommonToken).FullName) { // nothing more to load int channel = reader.ReadInt32(); int charPositionInLine = reader.ReadInt32(); int line = reader.ReadInt32(); int startIndex = reader.ReadInt32(); int stopIndex = reader.ReadInt32(); string text = reader.ReadString(); int tokenIndex = reader.ReadInt32(); int type = reader.ReadInt32(); return; } else if (typeName == typeof(CompiledTemplate).FullName) { CompiledTemplate compiledTemplate = (CompiledTemplate)objects[key]; string name = reader.ReadString(); string prefix = reader.ReadString(); string template = reader.ReadString(); int templateDefStartTokenObject = reader.ReadInt32(); bool hasFormalArgs = reader.ReadBoolean(); int nativeGroupObject = reader.ReadInt32(); bool isRegion = reader.ReadBoolean(); Template.RegionType regionDefType = (Template.RegionType)reader.ReadInt32(); bool isAnonSubtemplate = reader.ReadBoolean(); compiledTemplate.TemplateDefStartToken = (IToken)objects[templateDefStartTokenObject]; compiledTemplate.NativeGroup = this; int formalArgsLength = reader.ReadInt32(); if (formalArgsLength >= 0) { List<FormalArgument> formalArguments = new List<FormalArgument>(formalArgsLength); for (int i = 0; i < formalArgsLength; i++) { int formalArgObject = reader.ReadInt32(); formalArguments.Add((FormalArgument)objects[formalArgObject]); } compiledTemplate.FormalArguments = formalArguments; } int stringsLength = reader.ReadInt32(); for (int i = 0; i < stringsLength; i++) reader.ReadString(); int instrsLength = reader.ReadInt32(); if (instrsLength >= 0) reader.ReadBytes(instrsLength); int codeSize = reader.ReadInt32(); int sourceMapLength = reader.ReadInt32(); for (int i = 0; i < sourceMapLength; i++) { int start = reader.ReadInt32(); int length = reader.ReadInt32(); } return; } else if (typeName == typeof(FormalArgument).FullName) { FormalArgument formalArgument = (FormalArgument)objects[key]; string name = reader.ReadString(); int index = reader.ReadInt32(); IToken defaultValueToken = (IToken)objects[reader.ReadInt32()]; int defaultValueObject = reader.ReadInt32(); int compiledDefaultValue = reader.ReadInt32(); formalArgument.DefaultValue = objects[defaultValueObject]; formalArgument.CompiledDefaultValue = (CompiledTemplate)objects[compiledDefaultValue]; } else if (typeName == typeof(Template).FullName) { Template template = (Template)objects[key]; int implObject = reader.ReadInt32(); template.impl = (CompiledTemplate)objects[implObject]; int localsCount = reader.ReadInt32(); if (localsCount >= 0) { template.locals = new object[localsCount]; for (int i = 0; i < localsCount; i++) { int localObject = reader.ReadInt32(); template.locals[i] = objects[localObject]; } } int groupObject = reader.ReadInt32(); template.Group = (TemplateGroup)objects[groupObject]; return; } else if (typeName == typeof(TemplateGroupFile).FullName) { bool isDefaultGroup = reader.ReadBoolean(); return; } else if (typeName == typeof(TemplateGroup).FullName) { bool isDefaultGroup = reader.ReadBoolean(); } else { throw new NotImplementedException(); } } private void CacheCompiledGroup(string cachePath, string prefix, string fileName, DateTime lastWriteTime) { var timer = System.Diagnostics.Stopwatch.StartNew(); var serializedStrings = new HashSet<string>(StringComparer.OrdinalIgnoreCase); var comparer = ObjectReferenceEqualityComparer<object>.Default; var serializedObjects = new HashSet<object>(ObjectReferenceEqualityComparer<object>.Default); // start with the root set serializedObjects.UnionWith(_importsToClearOnUnload.OfType<object>()); serializedObjects.UnionWith(templates.Values.OfType<object>()); serializedObjects.UnionWith(dictionaries.Values.SelectMany(i => i.Values).OfType<object>()); // update to the reachable set serializedObjects = CalculateReachableSerializedObjects(serializedObjects.ToArray()); MemoryStream stream = new MemoryStream(); var writer = new BinaryWriter(stream, Encoding.UTF8); writer.Write(lastWriteTime.Ticks); // objects List<object> orderedObjectsForExport = GetOrderedExports(serializedObjects); writer.Write(orderedObjectsForExport.Count); foreach (var obj in orderedObjectsForExport) { WriteGroupObject(writer, obj); } // imported groups writer.Write(_importsToClearOnUnload.Count); foreach (var group in _importsToClearOnUnload) writer.Write(comparer.GetHashCode(group)); // delimiters writer.Write(delimiterStartChar); writer.Write(delimiterStopChar); // templates & aliases writer.Write(templates.Count); foreach (var template in templates) { writer.Write(template.Key); writer.Write(comparer.GetHashCode(template.Value)); } // dictionaries writer.Write(dictionaries.Count); foreach (var dictionary in dictionaries) { writer.Write(dictionary.Key); writer.Write(dictionary.Value.Count); foreach (var dictionaryValue in dictionary.Value) { writer.Write(dictionaryValue.Key); writer.Write(comparer.GetHashCode(dictionaryValue.Value)); } } System.Diagnostics.Debug.WriteLine(string.Format("Successfully cached the group {0} in {1}ms ({2} bytes).", Name, timer.ElapsedMilliseconds, stream.Length)); Directory.CreateDirectory(cachePath); string cacheFileName = Path.GetFileNameWithoutExtension(fileName) + (uint)fileName.GetHashCode() + prefix.Replace(Path.DirectorySeparatorChar, '_').Replace(Path.AltDirectorySeparatorChar, '_'); cacheFileName = Path.Combine(cachePath, cacheFileName); File.WriteAllBytes(cacheFileName, stream.ToArray()); } private List<object> GetOrderedExports(IEnumerable<object> serializedObjects) { List<object> exportList = new List<object>(); HashSet<object> visited = new HashSet<object>(ObjectReferenceEqualityComparer<object>.Default); foreach (var obj in serializedObjects) GetOrderedExports(obj, exportList, visited); return exportList; } private void GetOrderedExports(object currentObject, List<object> exportList, HashSet<object> visited) { if (currentObject == null || !visited.Add(currentObject)) return; // constructor dependencies if (!(currentObject is Type) && !(currentObject is string)) GetOrderedExports(currentObject.GetType(), exportList, visited); FormalArgument formalArgument = currentObject as FormalArgument; if (formalArgument != null) { GetOrderedExports(formalArgument.DefaultValueToken, exportList, visited); } exportList.Add(currentObject); } private void WriteGroupObjectReference(BinaryWriter writer, object obj) { if (obj == null) writer.Write(0); else writer.Write(ObjectReferenceEqualityComparer<object>.Default.GetHashCode(obj)); } private void WriteGroupObject(BinaryWriter writer, object obj) { var comparer = ObjectReferenceEqualityComparer<object>.Default; writer.Write(comparer.GetHashCode(obj)); string str = obj as string; if (str != null) { writer.Write(0); writer.Write(str); return; } Type type = obj as Type; if (type != null) { writer.Write(0); writer.Write(type.FullName); return; } WriteGroupObjectReference(writer, obj.GetType()); if (obj is bool) { writer.Write((bool)obj); return; } IToken token = obj as IToken; if (token != null) { writer.Write(token.Channel); writer.Write(token.CharPositionInLine); writer.Write(token.Line); writer.Write(token.StartIndex); writer.Write(token.StopIndex); writer.Write(token.Text); writer.Write(token.TokenIndex); writer.Write(token.Type); return; } if (obj.GetType() == typeof(CompiledTemplate)) { CompiledTemplate compiledTemplate = (CompiledTemplate)obj; writer.Write(compiledTemplate.Name); writer.Write(compiledTemplate.Prefix); writer.Write(compiledTemplate.Template); WriteGroupObjectReference(writer, compiledTemplate.TemplateDefStartToken); writer.Write(compiledTemplate.HasFormalArgs); WriteGroupObjectReference(writer, compiledTemplate.NativeGroup); writer.Write(compiledTemplate.IsRegion); writer.Write((int)compiledTemplate.RegionDefType); writer.Write(compiledTemplate.IsAnonSubtemplate); if (compiledTemplate.FormalArguments == null) { writer.Write(-1); } else { writer.Write(compiledTemplate.FormalArguments.Count); foreach (var arg in compiledTemplate.FormalArguments) WriteGroupObjectReference(writer, arg); } if (compiledTemplate.strings == null) { writer.Write(-1); } else { writer.Write(compiledTemplate.strings.Length); foreach (var s in compiledTemplate.strings) writer.Write(s); } if (compiledTemplate.instrs == null) { writer.Write(-1); } else { writer.Write(compiledTemplate.instrs.Length); writer.Write(compiledTemplate.instrs); } writer.Write(compiledTemplate.codeSize); if (compiledTemplate.sourceMap == null) { writer.Write(-1); } else { writer.Write(compiledTemplate.sourceMap.Length); foreach (var interval in compiledTemplate.sourceMap) { if (interval == null) { writer.Write(-1); writer.Write(-1); } else { writer.Write(interval.Start); writer.Write(interval.Length); } } } } else if (obj.GetType() == typeof(FormalArgument)) { FormalArgument formalArgument = (FormalArgument)obj; writer.Write(formalArgument.Name); writer.Write(formalArgument.Index); WriteGroupObjectReference(writer, formalArgument.DefaultValueToken); WriteGroupObjectReference(writer, formalArgument.DefaultValue); WriteGroupObjectReference(writer, formalArgument.CompiledDefaultValue); } else if (obj.GetType() == typeof(Template)) { Template template = (Template)obj; WriteGroupObjectReference(writer, template.impl); if (template.locals == null) { writer.Write(-1); } else { writer.Write(template.locals.Length); foreach (var local in template.locals) { WriteGroupObjectReference(writer, local); } } WriteGroupObjectReference(writer, template.Group); } else if (obj.GetType() == typeof(TemplateGroupFile) || obj == TemplateGroup.DefaultGroup) { writer.Write(obj == TemplateGroup.DefaultGroup); } else { throw new NotImplementedException(); } } private HashSet<object> CalculateReachableSerializedObjects(ICollection<object> rootSet) { var reachableObjects = new HashSet<object>(ObjectReferenceEqualityComparer<object>.Default); foreach (var obj in rootSet) CalculateReachableSerializedObjects(obj, reachableObjects); return reachableObjects; } private void CalculateReachableSerializedObjects(object obj, HashSet<object> reachableObjects) { if (obj == null || !reachableObjects.Add(obj)) return; CalculateReachableSerializedObjects(obj.GetType(), reachableObjects); - switch (Type.GetTypeCode(obj.GetType())) + if (obj is bool || obj is string) { - case TypeCode.Boolean: - case TypeCode.String: // nothing more to do return; - - case TypeCode.Object: - default: + } + else + { IToken token = obj as IToken; if (token != null) { // nothing else to do return; } Type type = obj as Type; if (type != null) { // nothing else to do return; } if (obj.GetType() == typeof(CompiledTemplate)) { CompiledTemplate compiledTemplate = (CompiledTemplate)obj; CalculateReachableSerializedObjects(compiledTemplate.NativeGroup, reachableObjects); CalculateReachableSerializedObjects(compiledTemplate.TemplateDefStartToken, reachableObjects); if (compiledTemplate.FormalArguments != null) { foreach (var argument in compiledTemplate.FormalArguments) CalculateReachableSerializedObjects(argument, reachableObjects); } if (compiledTemplate.ImplicitlyDefinedTemplates != null) { foreach (var template in compiledTemplate.ImplicitlyDefinedTemplates) CalculateReachableSerializedObjects(template, reachableObjects); } } else if (obj.GetType() == typeof(FormalArgument)) { FormalArgument formalArgument = (FormalArgument)obj; CalculateReachableSerializedObjects(formalArgument.DefaultValueToken, reachableObjects); CalculateReachableSerializedObjects(formalArgument.DefaultValue, reachableObjects); CalculateReachableSerializedObjects(formalArgument.CompiledDefaultValue, reachableObjects); } else if (obj.GetType() == typeof(Template)) { Template template = (Template)obj; CalculateReachableSerializedObjects(template.impl, reachableObjects); if (template.locals != null) { foreach (var local in template.locals) CalculateReachableSerializedObjects(local, reachableObjects); } CalculateReachableSerializedObjects(template.Group, reachableObjects); } else if (obj.GetType() == typeof(TemplateGroupFile) || obj == TemplateGroup.DefaultGroup) { // these are the only supported groups for now if (obj != this && obj != TemplateGroup.DefaultGroup) throw new NotSupportedException(); return; } else { throw new NotImplementedException(); } - - break; } } /** Load template file into this group using absolute filename */ public virtual CompiledTemplate LoadAbsoluteTemplateFile(string fileName) { - ANTLRFileStream fs; + ANTLRReaderStream fs; try { - fs = new ANTLRFileStream(fileName, Encoding); + fs = new ANTLRReaderStream(new StreamReader(File.OpenRead(fileName), Encoding)); fs.name = fileName; } catch (IOException) { // doesn't exist //errMgr.IOError(null, ErrorType.NO_SUCH_TEMPLATE, ioe, fileName); return null; } return LoadTemplateFile("", fileName, fs); } /** Load template stream into this group. unqualifiedFileName is "a.st". * The prefix is path from group root to unqualifiedFileName like /subdir * if file is in /subdir/a.st */ public virtual CompiledTemplate LoadTemplateFile(string prefix, string unqualifiedFileName, ICharStream templateStream) { GroupLexer lexer = new GroupLexer(templateStream); CommonTokenStream tokens = new CommonTokenStream(lexer); GroupParser parser = new GroupParser(tokens); parser.Group = this; lexer.group = this; try { parser.templateDef(prefix); } catch (RecognitionException re) { ErrorManager.GroupSyntaxError(ErrorType.SYNTAX_ERROR, unqualifiedFileName, re, re.Message); } string templateName = Path.GetFileNameWithoutExtension(unqualifiedFileName); if (!string.IsNullOrEmpty(prefix)) templateName = prefix + templateName; CompiledTemplate impl = RawGetTemplate(templateName); impl.Prefix = prefix; return impl; } /** Add an adaptor for a kind of object so Template knows how to pull properties * from them. Add adaptors in increasing order of specificity. Template adds Object, * Map, and Template model adaptors for you first. Adaptors you Add have * priority over default adaptors. * * If an adaptor for type T already exists, it is replaced by the adaptor arg. * * This must invalidate cache entries, so set your adaptors up before * Render()ing your templates for efficiency. */ public virtual void RegisterModelAdaptor(Type attributeType, IModelAdaptor adaptor) { adaptors[attributeType] = adaptor; } public virtual IModelAdaptor GetModelAdaptor(Type attributeType) { IModelAdaptor adaptor; adaptors.TryGetValue(attributeType, out adaptor); return adaptor; } /** Register a renderer for all objects of a particular "kind" for all * templates evaluated relative to this group. Use r to Render if * object in question is instanceof(attributeType). */ public void RegisterRenderer(Type attributeType, IAttributeRenderer renderer) { RegisterRenderer(attributeType, renderer, true); } /** Register a renderer for all objects of a particular "kind" for all * templates evaluated relative to this group. Use r to Render if * object in question is instanceof(attributeType). */ public virtual void RegisterRenderer(Type attributeType, IAttributeRenderer renderer, bool recursive) { renderers = renderers ?? new TypeRegistry<IAttributeRenderer>(); renderers[attributeType] = renderer; if (recursive) { Load(); foreach (var group in ImportedGroups) group.RegisterRenderer(attributeType, renderer, recursive); } } public virtual IAttributeRenderer GetAttributeRenderer(Type attributeType) { if (renderers == null) return null; IAttributeRenderer renderer; renderers.TryGetValue(attributeType, out renderer); return renderer; } public virtual void RegisterTypeProxyFactory(Type targetType, ITypeProxyFactory factory) { _proxyFactories = _proxyFactories ?? new TypeRegistry<ITypeProxyFactory>(); _proxyFactories[targetType] = factory; } public virtual ITypeProxyFactory GetTypeProxyFactory(Type targetType) { if (_proxyFactories == null) return null; ITypeProxyFactory factory; _proxyFactories.TryGetValue(targetType, out factory); return factory; } /** StringTemplate object factory; each group can have its own. */ public virtual Template CreateStringTemplate() { return new Template(this); } public virtual Template CreateStringTemplate(CompiledTemplate impl) { Template st = new Template(this); st.impl = impl; if (impl.FormalArguments != null) { st.locals = new object[impl.FormalArguments.Count]; for (int i = 0; i < st.locals.Length; i++) st.locals[i] = Template.EmptyAttribute; } return st; } /** differentiate so we can avoid having creation events for regions, * map operations, and other "new ST" events used during interp. */ public Template CreateStringTemplateInternally(CompiledTemplate impl) { Template template = CreateStringTemplate(impl); if (TrackCreationEvents && template.DebugState != null) { // toss it out template.DebugState.NewTemplateEvent = null; } return template; } public Template CreateStringTemplateInternally(Template prototype) { // no need to wack debugState; not set in ST(proto). return new Template(prototype); } public virtual string Name { get { return "<no name>;"; } } public virtual string FileName { get { return null; } } /** Return root dir if this is group dir; return dir containing group file * if this is group file. This is derived from original incoming * dir or filename. If it was absolute, this should come back * as full absolute path. If only a URL is available, return URL of * one dir up. */ public virtual Uri RootDirUri { get { return null; } } public override string ToString() { return Name; } public virtual string Show() { StringBuilder buf = new StringBuilder(); if (_imports != null && _imports.Count > 0) buf.Append(" : " + _imports); foreach (string n in templates.Keys) { string name = n; CompiledTemplate c = templates[name]; if (c.IsAnonSubtemplate || c == NotFoundTemplate) continue; int slash = name.LastIndexOf('/'); name = name.Substring(slash + 1, name.Length - slash - 1); buf.Append(name); buf.Append('('); if (c.FormalArguments != null) buf.Append(string.Join(",", c.FormalArguments.Select(i => i.ToString()).ToArray())); buf.Append(')'); buf.Append(" ::= <<" + Environment.NewLine); buf.Append(c.Template + Environment.NewLine); buf.Append(">>" + Environment.NewLine); } return buf.ToString(); } public virtual ITemplateErrorListener Listener { get { if (ErrorManager == null) return null; return ErrorManager.Listener; } set { ErrorManager = new ErrorManager(value); } } public virtual HashSet<string> GetTemplateNames() { Load(); HashSet<string> result = new HashSet<string>(); foreach (KeyValuePair<string, CompiledTemplate> e in templates) { if (e.Value != NotFoundTemplate) result.Add(e.Key); } return result; } } } diff --git a/Antlr4.StringTemplate/TemplateGroupDirectory.cs b/Antlr4.StringTemplate/TemplateGroupDirectory.cs index e8f74f1..4d9e5d2 100644 --- a/Antlr4.StringTemplate/TemplateGroupDirectory.cs +++ b/Antlr4.StringTemplate/TemplateGroupDirectory.cs @@ -1,276 +1,276 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using Antlr.Runtime; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Misc; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using Console = System.Console; using Directory = System.IO.Directory; using Encoding = System.Text.Encoding; using Exception = System.Exception; using File = System.IO.File; using IOException = System.IO.IOException; using NotImplementedException = System.NotImplementedException; using NotSupportedException = System.NotSupportedException; using Path = System.IO.Path; using StreamReader = System.IO.StreamReader; using Uri = System.Uri; using UriFormatException = System.UriFormatException; // TODO: caching? /** A directory or directory tree full of templates and/or group files. * We load files on-demand. If we fail to find a file, we look for it via * the CLASSPATH as a resource. I track everything with URLs not file names. */ public class TemplateGroupDirectory : TemplateGroup { public readonly string groupDirName; public readonly Uri root; public TemplateGroupDirectory(string dirName) : this(dirName, '<', '>') { } public TemplateGroupDirectory(string dirName, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { this.groupDirName = dirName; try { if (Directory.Exists(dirName)) { // we found the directory and it'll be file based root = new Uri(dirName); } else { throw new NotImplementedException(); #if false ClassLoader cl = Thread.CurrentThread.getContextClassLoader(); root = cl.getResource(dirName); if (root == null) { cl = this.GetType().getClassLoader(); root = cl.getResource(dirName); } if (root == null) { throw new ArgumentException("No such directory: " + dirName); } #endif } if (Verbose) Console.WriteLine("TemplateGroupDirectory({0}) found at {1}", dirName, root); } catch (Exception e) { ErrorManager.InternalError(null, "can't Load group dir " + dirName, e); } } public TemplateGroupDirectory(string dirName, Encoding encoding) : this(dirName, encoding, '<', '>') { } public TemplateGroupDirectory(string dirName, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : this(dirName, delimiterStartChar, delimiterStopChar) { if (encoding == null) throw new ArgumentNullException("encoding"); this.Encoding = encoding; } public TemplateGroupDirectory(Uri root, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { if (encoding == null) throw new ArgumentNullException("encoding"); this.groupDirName = Path.GetFileName(root.AbsolutePath); this.root = root; this.Encoding = encoding; } public override void ImportTemplates(IToken fileNameToken) { string msg = "import illegal in group files embedded in TemplateGroupDirectory; " + "import " + fileNameToken.Text + " in TemplateGroupDirectory " + this.Name; throw new NotSupportedException(msg); } /** <summary> * Load a template from dir or group file. Group file is given * precedence over dir with same name. <paramref name="name"/> is * always fully qualified. * </summary> */ protected override CompiledTemplate Load(string name) { if (Verbose) Console.WriteLine("STGroupDir.load(" + name + ")"); string parent = Utility.GetParent(name); // must have parent; it's fully-qualified string prefix = Utility.GetPrefix(name); // if (parent.isEmpty()) { // // no need to check for a group file as name has no parent // return loadTemplateFile("/", name+TemplateFileExtension); // load t.st file // } if (!Path.IsPathRooted(parent)) throw new ArgumentException(); Uri groupFileURL; try { // see if parent of template name is a group file groupFileURL = new Uri(TemplateName.GetTemplatePath(root.LocalPath, parent) + GroupFileExtension); } catch (UriFormatException e) { ErrorManager.InternalError(null, "bad URL: " + TemplateName.GetTemplatePath(root.LocalPath, parent) + GroupFileExtension, e); return null; } if (!File.Exists(groupFileURL.LocalPath)) { string unqualifiedName = Path.GetFileName(name); return LoadTemplateFile(prefix, unqualifiedName + TemplateFileExtension); // load t.st file } #if false InputStream @is = null; try { @is = groupFileURL.openStream(); } catch (FileNotFoundException fnfe) { // must not be in a group file return loadTemplateFile(parent, name + TemplateFileExtension); // load t.st file } catch (IOException ioe) { errMgr.internalError(null, "can't load template file " + name, ioe); } try { // clean up if (@is != null) @is.close(); } catch (IOException ioe) { errMgr.internalError(null, "can't close template file stream " + name, ioe); } #endif LoadGroupFile(prefix, groupFileURL.LocalPath); return RawGetTemplate(name); } /** Load full path name .st file relative to root by prefix */ public virtual CompiledTemplate LoadTemplateFile(string prefix, string unqualifiedFileName) { if (Path.IsPathRooted(unqualifiedFileName)) throw new ArgumentException(); if (Verbose) Console.WriteLine("loadTemplateFile({0}) in groupdir from {1} prefix={2}", unqualifiedFileName, root, prefix); string templateName = Path.ChangeExtension(unqualifiedFileName, null); Uri f; try { f = new Uri(root.LocalPath + prefix + unqualifiedFileName); } catch (UriFormatException me) { ErrorManager.RuntimeError(null, ErrorType.INVALID_TEMPLATE_NAME, me, Path.Combine(root.LocalPath, unqualifiedFileName)); return null; } ANTLRReaderStream fs = null; try { - fs = new ANTLRReaderStream(new StreamReader(f.LocalPath, Encoding)); + fs = new ANTLRReaderStream(new StreamReader(File.OpenRead(f.LocalPath), Encoding)); fs.name = unqualifiedFileName; } catch (IOException) { if (Verbose) Console.WriteLine("{0}/{1} doesn't exist", root, unqualifiedFileName); //errMgr.IOError(null, ErrorType.NO_SUCH_TEMPLATE, ioe, unqualifiedFileName); return null; } return LoadTemplateFile(prefix, unqualifiedFileName, fs); } public override string Name { get { return groupDirName; } } public override string FileName { get { return Path.GetFileName(root.LocalPath); } } public override Uri RootDirUri { get { return root; } } } } diff --git a/Antlr4.StringTemplate/TemplateGroupFile.cs b/Antlr4.StringTemplate/TemplateGroupFile.cs index 646ac5a..85946e6 100644 --- a/Antlr4.StringTemplate/TemplateGroupFile.cs +++ b/Antlr4.StringTemplate/TemplateGroupFile.cs @@ -1,224 +1,226 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using System.Linq; using System.Runtime.CompilerServices; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Extensions; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using Console = System.Console; using Encoding = System.Text.Encoding; using ErrorType = Antlr4.StringTemplate.Misc.ErrorType; using Exception = System.Exception; using File = System.IO.File; using FileNotFoundException = System.IO.FileNotFoundException; using Path = System.IO.Path; using Uri = System.Uri; using UriFormatException = System.UriFormatException; using Utility = Antlr4.StringTemplate.Misc.Utility; /** The internal representation of a single group file (which must end in * ".stg"). If we fail to find a group file, look for it via the * CLASSPATH as a resource. */ public class TemplateGroupFile : TemplateGroup { /// <summary> /// Records how the user "spelled" the file name they wanted to load. /// The URI is the key field here for loading content. If they use the /// constructor with a URI argument, this field is <see langword="null"/>. /// </summary> private readonly string _fileName; /// <summary> /// Where to find the group file; non-null. /// </summary> private readonly Uri _url; private bool _alreadyLoaded = false; /** Load a file relative to current dir or from root or via CLASSPATH. */ public TemplateGroupFile(string fileName) : this(fileName, '<', '>') { } public TemplateGroupFile(string fileName, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { if (fileName == null) throw new ArgumentNullException("fileName"); try { if (!fileName.EndsWith(GroupFileExtension)) throw new ArgumentException("Group file names must end in .stg: " + fileName); if (!File.Exists(fileName)) throw new FileNotFoundException(string.Format("No such group file: {0}", fileName)); this._url = new Uri(fileName); this._fileName = fileName; if (Verbose) Console.WriteLine("STGroupFile({0}) == file {1}", fileName, Path.GetFullPath(fileName)); } catch (Exception e) { e.PreserveStackTrace(); if (!e.IsCritical()) ErrorManager.InternalError(null, "can't Load group file " + fileName, e); throw; } } public TemplateGroupFile(string fullyQualifiedFileName, Encoding encoding) : this(fullyQualifiedFileName, encoding, '<', '>') { } public TemplateGroupFile(string fullyQualifiedFileName, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : this(fullyQualifiedFileName, delimiterStartChar, delimiterStopChar) { if (encoding == null) throw new ArgumentNullException("encoding"); this.Encoding = encoding; } /// <summary> /// Pass in a URL with the location of a group file. E.g., /// TemplateGroup g = new TemplateGroupFile("file:///org/foo/templates/g.stg", Encoding.UTF8, '&lt;', '&gt;'); /// </summary> public TemplateGroupFile(Uri url, Encoding encoding, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { if (url == null) throw new ArgumentNullException("url"); if (encoding == null) throw new ArgumentNullException("encoding"); this._url = url; this.Encoding = encoding; this._fileName = null; } public override bool IsDefined(string name) { if (!_alreadyLoaded) Load(); return base.IsDefined(name); } - [MethodImpl(MethodImplOptions.Synchronized)] public override void Unload() { - base.Unload(); - _alreadyLoaded = false; + lock (this) + { + base.Unload(); + _alreadyLoaded = false; + } } protected override CompiledTemplate Load(string name) { if (!_alreadyLoaded) Load(); return RawGetTemplate(name); } public override void Load() { if (_alreadyLoaded) return; // do before actual load to say we're doing it // no prefix since this group file is the entire group, nothing lives // beneath it. _alreadyLoaded = true; if (Verbose) Console.WriteLine("loading group file " + _url.LocalPath); LoadGroupFile("/", _url.LocalPath); if (Verbose) Console.WriteLine("found {0} templates in {1} = {2}", CompiledTemplates.Count, _url.ToString(), CompiledTemplates); } public override string Show() { if (!_alreadyLoaded) Load(); return base.Show(); } public override string Name { get { return Path.GetFileNameWithoutExtension(FileName); } } public override string FileName { get { return _fileName ?? _url.Segments.Last(); } } public override Uri RootDirUri { get { //System.out.println("url of "+fileName+" is "+url.toString()); string parent = Path.GetDirectoryName(_url.ToString()); try { return new Uri(parent); } catch (UriFormatException mue) { ErrorManager.RuntimeError(null, ErrorType.INVALID_TEMPLATE_NAME, mue, parent); } return null; } } } } diff --git a/build/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec index 7813d49..2ff057e 100644 --- a/build/prep/StringTemplate4.nuspec +++ b/build/prep/StringTemplate4.nuspec @@ -1,36 +1,45 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>StringTemplate4</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# port of StringTemplate 4.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$ANTLRVersion$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>stringtemplate st4 stringtemplate4 template</tags> <title>StringTemplate 4</title> <summary>The C# port of StringTemplate 4.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + <group targetFramework="netstandard1.3"> + <dependency id="NETStandard.Library" version="1.6.0"/> + </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> + <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.dll" target="lib\netstandard1.3"/> + <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.pdb" target="lib\netstandard1.3"/> + <file src="..\..\Antlr4.StringTemplate\bin\netstandard\$Configuration$\Antlr4.StringTemplate.xml" target="lib\netstandard1.3"/> + <!-- Source Code --> <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.cs" target="src\obj\net35-client\$Configuration$"/> <file src="..\..\Antlr4.StringTemplate\obj\net35-client\$Configuration$\**\*.tokens" target="src\obj\net35-client\$Configuration$"/> + <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.cs" target="src\obj\netstandard\$Configuration$"/> + <file src="..\..\Antlr4.StringTemplate\obj\netstandard\$Configuration$\**\*.tokens" target="src\obj\netstandard\$Configuration$"/> </files> </package>
antlr/antlrcs
a9f8eae53695c2d2b7041c2e60eaa71274f316a6
Incorporate changes from submodules
diff --git a/Antlr4.StringTemplate/TemplateGroup.cs b/Antlr4.StringTemplate/TemplateGroup.cs index 477c627..7c02e40 100644 --- a/Antlr4.StringTemplate/TemplateGroup.cs +++ b/Antlr4.StringTemplate/TemplateGroup.cs @@ -353,1025 +353,1025 @@ namespace Antlr4.StringTemplate if (Verbose) Console.WriteLine(string.Format("getEmbeddedInstanceOf({0})", fullyQualifiedName)); Template st = GetInstanceOf(fullyQualifiedName); if (st == null) { ErrorManager.RuntimeError(frame, ErrorType.NO_SUCH_TEMPLATE, fullyQualifiedName); return CreateStringTemplateInternally(new CompiledTemplate()); } // this is only called internally. wack any debug ST create events if (TrackCreationEvents) { // toss it out st.DebugState.NewTemplateEvent = null; } return st; } /** Create singleton template for use with dictionary values */ public virtual Template CreateSingleton(IToken templateToken) { string template; if (templateToken.Type == GroupParser.BIGSTRING) { template = Utility.Strip(templateToken.Text, 2); } else { template = Utility.Strip(templateToken.Text, 1); } CompiledTemplate impl = Compile(FileName, null, null, template, templateToken); Template st = CreateStringTemplateInternally(impl); st.Group = this; st.impl.HasFormalArgs = false; st.impl.Name = Template.UnknownName; st.impl.DefineImplicitlyDefinedTemplates(this); return st; } /** Is this template defined in this group or from this group below? * Names must be absolute, fully-qualified names like /a/b */ public virtual bool IsDefined(string name) { return LookupTemplate(name) != null; } /** Look up a fully-qualified name */ public virtual CompiledTemplate LookupTemplate(string name) { if (name[0] != '/') name = "/" + name; if (Verbose) Console.WriteLine(string.Format("{0}.LookupTemplate({1})", Name, name)); CompiledTemplate code; templates.TryGetValue(name, out code); if (code == NotFoundTemplate) { if (Verbose) Console.WriteLine(string.Format("{0} previously seen as not found", name)); return null; } // try to load from disk and look up again if (code == null) code = Load(name); if (code == null) code = LookupImportedTemplate(name); if (code == null) { if (Verbose) Console.WriteLine(string.Format("{0} recorded not found", name)); templates[name] = NotFoundTemplate; } if (Verbose && code != null) Console.WriteLine(string.Format("{0}.LookupTemplate({1}) found", Name, name)); return code; } /** "Unload" all templates and dictionaries but leave renderers, adaptors, * and import relationships. This essentially forces next GetInstanceOf * to reload templates. */ [MethodImpl(MethodImplOptions.Synchronized)] public virtual void Unload() { templates.Clear(); dictionaries.Clear(); foreach (var import in _imports) import.Unload(); foreach (var import in _importsToClearOnUnload) _imports.Remove(import); _importsToClearOnUnload.Clear(); } /** Load st from disk if dir or load whole group file if .stg file (then * return just one template). name is fully-qualified. */ protected virtual CompiledTemplate Load(string name) { return null; } /** Force a load if it makes sense for the group */ public virtual void Load() { } protected internal virtual CompiledTemplate LookupImportedTemplate(string name) { if (_imports == null) return null; foreach (TemplateGroup g in _imports) { if (Verbose) Console.WriteLine(string.Format("checking {0} for imported {1}", g.Name, name)); CompiledTemplate code = g.LookupTemplate(name); if (code != null) { if (Verbose) Console.WriteLine(string.Format("{0}.LookupImportedTemplate({1}) found", g.Name, name)); return code; } } if (Verbose) Console.WriteLine(string.Format("{0} not found in {1} imports", name, Name)); return null; } public virtual CompiledTemplate RawGetTemplate(string name) { CompiledTemplate template; templates.TryGetValue(name, out template); return template; } public virtual IDictionary<string, object> RawGetDictionary(string name) { IDictionary<string, object> dictionary; dictionaries.TryGetValue(name, out dictionary); return dictionary; } public virtual bool IsDictionary(string name) { return RawGetDictionary(name) != null; } // for testing public virtual CompiledTemplate DefineTemplate(string name, string template) { if (name[0] != '/') name = "/" + name; try { CompiledTemplate impl = DefineTemplate(name, new CommonToken(GroupParser.ID, name), null, template, null); return impl; } catch (TemplateException) { Console.Error.WriteLine("eh?"); } return null; } // for testing public virtual CompiledTemplate DefineTemplate(string name, string template, string[] arguments) { if (name[0] != '/') name = "/" + name; List<FormalArgument> a = new List<FormalArgument>(); foreach (string arg in arguments) a.Add(new FormalArgument(arg)); return DefineTemplate(name, new CommonToken(GroupParser.ID, name), a, template, null); } public virtual CompiledTemplate DefineTemplate(string fullyQualifiedTemplateName, IToken nameT, List<FormalArgument> args, string template, IToken templateToken) { if (Verbose) Console.WriteLine(string.Format("DefineTemplate({0})", fullyQualifiedTemplateName)); if (fullyQualifiedTemplateName == null) throw new ArgumentNullException("fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName.Length == 0) throw new ArgumentException("empty template name", "fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName.IndexOf('.') >= 0) throw new ArgumentException("cannot have '.' in template names", "fullyQualifiedTemplateName"); if (fullyQualifiedTemplateName[0] != '/') throw new ArgumentException("Expected a fully qualified template name.", "fullyQualifiedTemplateName"); template = Utility.TrimOneStartingNewline(template); template = Utility.TrimOneTrailingNewline(template); // compile, passing in templateName as enclosing name for any embedded regions CompiledTemplate code = Compile(FileName, fullyQualifiedTemplateName, args, template, templateToken); code.Name = fullyQualifiedTemplateName; RawDefineTemplate(fullyQualifiedTemplateName, code, nameT); code.DefineArgumentDefaultValueTemplates(this); code.DefineImplicitlyDefinedTemplates(this); // define any anonymous subtemplates return code; } /** Make name and alias for target. Replace any previous def of name */ public virtual CompiledTemplate DefineTemplateAlias(IToken aliasT, IToken targetT) { string alias = aliasT.Text; string target = targetT.Text; CompiledTemplate targetCode = RawGetTemplate("/" + target); if (targetCode == null) { ErrorManager.CompiletimeError(ErrorType.ALIAS_TARGET_UNDEFINED, null, aliasT, alias, target); return null; } RawDefineTemplate("/" + alias, targetCode, aliasT); return targetCode; } public virtual CompiledTemplate DefineRegion(string enclosingTemplateName, IToken regionT, string template, IToken templateToken) { string name = regionT.Text; template = Utility.TrimOneStartingNewline(template); template = Utility.TrimOneTrailingNewline(template); CompiledTemplate code = Compile(FileName, enclosingTemplateName, null, template, templateToken); string mangled = GetMangledRegionName(enclosingTemplateName, name); if (LookupTemplate(mangled) == null) { ErrorManager.CompiletimeError(ErrorType.NO_SUCH_REGION, null, regionT, enclosingTemplateName, name); return new CompiledTemplate(); } code.Name = mangled; code.IsRegion = true; code.RegionDefType = Template.RegionType.Explicit; code.TemplateDefStartToken = regionT; RawDefineTemplate(mangled, code, regionT); code.DefineArgumentDefaultValueTemplates(this); code.DefineImplicitlyDefinedTemplates(this); // define any anonymous subtemplates return code; } public virtual void DefineTemplateOrRegion( string fullyQualifiedTemplateName, string regionSurroundingTemplateName, IToken templateToken, string template, IToken nameToken, List<FormalArgument> args) { if (fullyQualifiedTemplateName[0] != '/') throw new ArgumentException("Expected a fully qualified template name.", "fullyQualifiedTemplateName"); try { if (regionSurroundingTemplateName != null) { DefineRegion(regionSurroundingTemplateName, nameToken, template, templateToken); } else { DefineTemplate(fullyQualifiedTemplateName, nameToken, args, template, templateToken); } } catch (TemplateException) { // after getting syntax error in a template, we emit msg // and throw exception to blast all the way out to here. } } public virtual void RawDefineTemplate(string name, CompiledTemplate code, IToken defT) { CompiledTemplate prev; templates.TryGetValue(name, out prev); if (prev != null) { if (!prev.IsRegion) { ErrorManager.CompiletimeError(ErrorType.TEMPLATE_REDEFINITION, null, defT); return; } /* If this region was previously defined, the following actions should be taken: * * Previous type Current type Result Applied Reason * ------------- ------------ ------ ------- ------ * Implicit Implicit Success Previous A rule may make multiple implicit references to the same region. * Keeping either has the same semantics, so the existing one is * used for slightly less overhead. * Implicit Explicit Success Current A region with previous implicit references is now being explicitly * defined. * Implicit Embedded Success Current A region with previous implicit references is now being defined * with an embedded region. * Explicit Implicit Success Previous An explicitly defined region is now being implicitly referenced. * Make sure to keep the previous explicit definition as the actual * definition. * Explicit Explicit Error Previous Multiple explicit definitions exist for the same region (template * redefinition error). Give an error and use the previous one. * Explicit Embedded Warning Previous An explicit region definition already exists for the current * embedded region definition. The explicit definition overrides the * embedded definition and a warning is given since the embedded * definition is hidden. * Embedded Implicit Success Previous A region with an embedded definition is now being implicitly * referenced. The embedded definition should be used. * Embedded Explicit Warning Current A region with an embedded definition is now being explicitly * defined. The explicit definition overrides the embedded * definition and a warning is given since the embedded definition * is hidden. * Embedded Embedded Error Previous Multiple embedded definitions of the same region were given in a * template. Give an error and use the previous one. */ // handle the Explicit/Explicit and Embedded/Embedded error cases if (code.RegionDefType != Template.RegionType.Implicit && code.RegionDefType == prev.RegionDefType) { if (code.RegionDefType == Template.RegionType.Embedded) ErrorManager.CompiletimeError(ErrorType.EMBEDDED_REGION_REDEFINITION, null, defT, GetUnmangledTemplateName(name)); else ErrorManager.CompiletimeError(ErrorType.REGION_REDEFINITION, null, defT, GetUnmangledTemplateName(name)); // keep the previous one return; } // handle the Explicit/Embedded and Embedded/Explicit warning cases else if ((code.RegionDefType == Template.RegionType.Embedded && prev.RegionDefType == Template.RegionType.Explicit) || (code.RegionDefType == Template.RegionType.Explicit && prev.RegionDefType == Template.RegionType.Embedded)) { // TODO: can we make this a warning? ErrorManager.CompiletimeError(ErrorType.HIDDEN_EMBEDDED_REGION_DEFINITION, null, defT, GetUnmangledTemplateName(name)); // keep the previous one only if that's the explicit definition if (prev.RegionDefType == Template.RegionType.Explicit) return; } // else if the current definition type is implicit, keep the previous one else if (code.RegionDefType == Template.RegionType.Implicit) { return; } } code.NativeGroup = this; code.TemplateDefStartToken = defT; templates[name] = code; } public virtual void UndefineTemplate(string name) { templates.Remove(name); } /** Compile a template */ public virtual CompiledTemplate Compile(string srcName, string name, List<FormalArgument> args, string template, IToken templateToken) // for error location { //System.out.println("TemplateGroup.Compile: "+enclosingTemplateName); TemplateCompiler c = new TemplateCompiler(this); return c.Compile(srcName, name, args, template, templateToken); } /** The "foo" of t() ::= "&lt;@foo()&gt;" is mangled to "/region__/t__foo" */ public static string GetMangledRegionName(string enclosingTemplateName, string name) { if (enclosingTemplateName[0] != '/') enclosingTemplateName = '/' + enclosingTemplateName; return "/region__" + enclosingTemplateName + "__" + name; } /** Return "t.foo" from "/region__/t__foo" */ public static string GetUnmangledTemplateName(string mangledName) { string t = mangledName.Substring("/region__".Length, mangledName.LastIndexOf("__") - "/region__".Length); string r = mangledName.Substring(mangledName.LastIndexOf("__") + 2, mangledName.Length - mangledName.LastIndexOf("__") - 2); return t + '.' + r; } /** Define a map for this group; not thread safe...do not keep adding * these while you reference them. */ public virtual void DefineDictionary(string name, IDictionary<string, object> mapping) { dictionaries[name] = mapping; } public virtual void SetDelimiters(IToken openDelimiter, IToken closeDelimiter) { if (openDelimiter == null) throw new ArgumentNullException("openDelimiter"); if (closeDelimiter == null) throw new ArgumentNullException("closeDelimiter"); string openDelimiterText = openDelimiter.Text.Trim('"'); if (openDelimiterText.Length != 1) { ErrorManager.CompiletimeError(ErrorType.INVALID_DELIMITER, null, openDelimiter, openDelimiterText); return; } string closeDelimiterText = closeDelimiter.Text.Trim('"'); if (closeDelimiterText.Length != 1) { ErrorManager.CompiletimeError(ErrorType.INVALID_DELIMITER, null, openDelimiter, closeDelimiterText); return; } SetDelimiters(openDelimiterText[0], closeDelimiterText[0]); } public virtual void SetDelimiters(char delimiterStartChar, char delimiterStopChar) { this.delimiterStartChar = delimiterStartChar; this.delimiterStopChar = delimiterStopChar; } /** Make this group import templates/dictionaries from g. */ public virtual void ImportTemplates(TemplateGroup g) { ImportTemplates(g, false); } /** Make this group import templates/dictionaries from g. */ private void ImportTemplates(TemplateGroup group, bool clearOnUnload) { if (group == null) return; _imports.Add(group); if (clearOnUnload) _importsToClearOnUnload.Add(group); } /** Import template files, directories, and group files. * Priority is given to templates defined in the current group; * this, in effect, provides inheritance. Polymorphism is in effect so * that if an inherited template references template t() then we * search for t() in the subgroup first. * * Templates are loaded on-demand from import dirs. Imported groups are * loaded on-demand when searching for a template. * * The listener of this group is passed to the import group so errors * found while loading imported element are sent to listener of this group. */ public virtual void ImportTemplates(IToken fileNameToken) { string fileName = fileNameToken.Text; if (Verbose) Console.WriteLine("ImportTemplates({0})", fileName); // do nothing upon syntax error if (fileName == null || fileName.Equals("<missing STRING>")) return; fileName = Utility.Strip(fileName, 1); //Console.WriteLine("import {0}", fileName); bool isGroupFile = fileName.EndsWith(GroupFileExtension); bool isTemplateFile = fileName.EndsWith(TemplateFileExtension); bool isGroupDir = !(isGroupFile || isTemplateFile); TemplateGroup g = null; // search path is: working dir, g.stg's dir, CLASSPATH Uri thisRoot = RootDirUri; Uri fileUnderRoot = null; //Console.WriteLine("thisRoot={0}", thisRoot); try { fileUnderRoot = new Uri(thisRoot + "/" + fileName); } catch (UriFormatException mfe) { ErrorManager.InternalError(null, string.Format("can't build URL for {0}/{1}", thisRoot, fileName), mfe); return; } if (isTemplateFile) { - g = new TemplateGroup(); + g = new TemplateGroup(delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; Uri fileURL = null; if (File.Exists(fileUnderRoot.LocalPath)) fileURL = fileUnderRoot; if (fileURL != null) { try { Stream s = File.OpenRead(fileURL.LocalPath); ANTLRInputStream templateStream = new ANTLRInputStream(s); templateStream.name = fileName; CompiledTemplate code = g.LoadTemplateFile("/", fileName, templateStream); if (code == null) g = null; } catch (IOException ioe) { ErrorManager.InternalError(null, string.Format("can't read from {0}", fileURL), ioe); g = null; } } else { g = null; } } else if (isGroupFile) { //System.out.println("look for fileUnderRoot: "+fileUnderRoot); if (File.Exists(fileUnderRoot.LocalPath)) { g = new TemplateGroupFile(fileUnderRoot, Encoding, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } else { g = new TemplateGroupFile(fileName, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } } else if (isGroupDir) { // System.out.println("try dir "+fileUnderRoot); if (Directory.Exists(fileUnderRoot.LocalPath)) { g = new TemplateGroupDirectory(fileUnderRoot, Encoding, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } else { // try in CLASSPATH // System.out.println("try dir in CLASSPATH "+fileName); g = new TemplateGroupDirectory(fileName, delimiterStartChar, delimiterStopChar); g.Listener = this.Listener; } } if (g == null) { ErrorManager.CompiletimeError(ErrorType.CANT_IMPORT, null, fileNameToken, fileName); } else { ImportTemplates(g, true); } } /** Load a group file with full path fileName; it's relative to root by prefix. */ public virtual void LoadGroupFile(string prefix, string fileName) { if (Verbose) { Console.Out.WriteLine("{0}.LoadGroupFile(prefix={1}, fileName={2})", GetType().FullName, prefix, fileName); } GroupParser parser = null; try { Uri f = new Uri(fileName); ANTLRReaderStream fs = new ANTLRReaderStream(new System.IO.StreamReader(f.LocalPath, Encoding)); var timer = System.Diagnostics.Stopwatch.StartNew(); string cachePath = Path.Combine(Path.GetTempPath(), "ST4TemplateCache"); if (EnableCache && TryLoadGroupFromCache(cachePath, prefix, fileName)) { System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the group from cache {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); } else { GroupLexer lexer = new GroupLexer(fs); fs.name = fileName; CommonTokenStream tokens = new CommonTokenStream(lexer); parser = new GroupParser(tokens); parser.group(this, prefix); System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the group {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); if (EnableCache) CacheCompiledGroup(cachePath, prefix, fileName, File.GetLastWriteTimeUtc(f.LocalPath)); } } catch (Exception e) { e.PreserveStackTrace(); if (e.IsCritical()) throw; ErrorManager.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName); } } private bool TryLoadGroupFromCache(string cachePath, string prefix, string fileName) { string cacheFileName = Path.GetFileNameWithoutExtension(fileName) + (uint)fileName.GetHashCode() + prefix.Replace(Path.DirectorySeparatorChar, '_').Replace(Path.AltDirectorySeparatorChar, '_'); cacheFileName = Path.Combine(cachePath, cacheFileName); if (!File.Exists(cacheFileName)) return false; try { byte[] data = File.ReadAllBytes(cacheFileName); return TryLoadCachedGroup(data, File.GetLastWriteTimeUtc(new Uri(fileName).LocalPath)); } catch (IOException) { return false; } } private bool TryLoadCachedGroup(byte[] data, DateTime lastWriteTime) { var timer = System.Diagnostics.Stopwatch.StartNew(); var reader = new BinaryReader(new MemoryStream(data), Encoding.UTF8); DateTime cacheTime = new DateTime(reader.ReadInt64(), DateTimeKind.Utc); if (cacheTime != lastWriteTime) return false; Dictionary<int, object> objects = new Dictionary<int, object>(); objects.Add(0, null); // first pass constructs objects long objectTableOffset = reader.BaseStream.Position; int objectCount = reader.ReadInt32(); for (int i = 0; i < objectCount; i++) { int key = reader.ReadInt32(); object obj = CreateGroupObject(reader, key, objects); objects.Add(key, obj); } reader.BaseStream.Seek(objectTableOffset + 4, SeekOrigin.Begin); for (int i = 0; i < objectCount; i++) { int key = reader.ReadInt32(); LoadGroupObject(reader, key, objects); } List<TemplateGroup> importsToClearOnUnload = new List<TemplateGroup>(); Dictionary<string, CompiledTemplate> templates = new Dictionary<string, CompiledTemplate>(); Dictionary<string, IDictionary<string, object>> dictionaries = new Dictionary<string, IDictionary<string, object>>(); // imported groups int importCount = reader.ReadInt32(); for (int i = 0; i < importCount; i++) importsToClearOnUnload.Add((TemplateGroup)objects[reader.ReadInt32()]); // delimiters char delimiterStartChar = reader.ReadChar(); char delimiterStopChar = reader.ReadChar(); // templates & aliases int templateCount = reader.ReadInt32(); for (int i = 0; i < templateCount; i++) { string key = reader.ReadString(); CompiledTemplate value = (CompiledTemplate)objects[reader.ReadInt32()]; templates[key] = value; } // dictionaries int dictionaryCount = reader.ReadInt32(); for (int i = 0; i < dictionaryCount; i++) { string name = reader.ReadString(); IDictionary<string, object> dictionary = new Dictionary<string, object>(); dictionaries[name] = dictionary; int valueCount = reader.ReadInt32(); for (int j = 0; j < valueCount; j++) { string key = reader.ReadString(); object value = objects[reader.ReadInt32()]; dictionary[key] = value; } } this._importsToClearOnUnload.AddRange(importsToClearOnUnload); this.delimiterStartChar = delimiterStartChar; this.delimiterStopChar = delimiterStopChar; foreach (var pair in templates) this.templates[pair.Key] = pair.Value; foreach (var pair in dictionaries) this.dictionaries[pair.Key] = pair.Value; System.Diagnostics.Debug.WriteLine(string.Format("Successfully loaded the cached group {0} in {1}ms.", Name, timer.ElapsedMilliseconds)); return true; } private object CreateGroupObject(BinaryReader reader, int key, Dictionary<int, object> objects) { var comparer = ObjectReferenceEqualityComparer<object>.Default; int typeKey = reader.ReadInt32(); if (typeKey == 0) { // this is a string return reader.ReadString(); } string typeName = (string)objects[typeKey]; if (typeName == typeof(bool).FullName) { return reader.ReadBoolean(); } else if (typeName == typeof(TemplateToken).FullName || typeName == typeof(CommonToken).FullName) { int channel = reader.ReadInt32(); int charPositionInLine = reader.ReadInt32(); int line = reader.ReadInt32(); int startIndex = reader.ReadInt32(); int stopIndex = reader.ReadInt32(); string text = reader.ReadString(); int tokenIndex = reader.ReadInt32(); int type = reader.ReadInt32(); CommonToken token = new CommonToken(type, text) { Channel = channel, CharPositionInLine = charPositionInLine, Line = line, StartIndex = startIndex, StopIndex = stopIndex, TokenIndex = tokenIndex, }; return token; } else if (typeName == typeof(CompiledTemplate).FullName) { CompiledTemplate compiledTemplate = new CompiledTemplate(); compiledTemplate.Name = reader.ReadString(); compiledTemplate.Prefix = reader.ReadString(); compiledTemplate.Template = reader.ReadString(); int templateDefStartTokenObject = reader.ReadInt32(); compiledTemplate.HasFormalArgs = reader.ReadBoolean(); int nativeGroupObject = reader.ReadInt32(); compiledTemplate.IsRegion = reader.ReadBoolean(); compiledTemplate.RegionDefType = (Template.RegionType)reader.ReadInt32(); compiledTemplate.IsAnonSubtemplate = reader.ReadBoolean(); int formalArgsLength = reader.ReadInt32(); if (formalArgsLength > 0) { for (int i = 0; i < formalArgsLength; i++) { int formalArgObject = reader.ReadInt32(); } } int stringsLength = reader.ReadInt32(); if (stringsLength >= 0) { compiledTemplate.strings = new string[stringsLength]; for (int i = 0; i < stringsLength; i++) compiledTemplate.strings[i] = reader.ReadString(); } int instrsLength = reader.ReadInt32(); if (instrsLength >= 0) compiledTemplate.instrs = reader.ReadBytes(instrsLength); compiledTemplate.codeSize = reader.ReadInt32(); int sourceMapLength = reader.ReadInt32(); if (sourceMapLength >= 0) { compiledTemplate.sourceMap = new Interval[sourceMapLength]; for (int i = 0; i < sourceMapLength; i++) { int start = reader.ReadInt32(); int length = reader.ReadInt32(); if (length >= 0) compiledTemplate.sourceMap[i] = new Interval(start, length); } } return compiledTemplate; } else if (typeName == typeof(FormalArgument).FullName) { string name = reader.ReadString(); int index = reader.ReadInt32(); IToken defaultValueToken = (IToken)objects[reader.ReadInt32()]; int defaultValueObject = reader.ReadInt32(); int compiledDefaultValue = reader.ReadInt32(); FormalArgument formalArgument = new FormalArgument(name, defaultValueToken); formalArgument.Index = index; return formalArgument; } else if (typeName == typeof(Template).FullName) { int implObject = reader.ReadInt32(); int localsCount = reader.ReadInt32(); for (int i = 0; i < localsCount; i++) { int localObject = reader.ReadInt32(); } int groupObject = reader.ReadInt32(); TemplateGroup group = this; Template template = new Template(group); return template; } else if (typeName == typeof(TemplateGroupFile).FullName) { bool isDefaultGroup = reader.ReadBoolean(); if (!isDefaultGroup) return this; else throw new NotSupportedException(); } else if (typeName == typeof(TemplateGroup).FullName) { bool isDefaultGroup = reader.ReadBoolean(); if (isDefaultGroup) return TemplateGroup.DefaultGroup; else throw new NotSupportedException(); } else { throw new NotImplementedException(); } } private void LoadGroupObject(BinaryReader reader, int key, Dictionary<int, object> objects) { var comparer = ObjectReferenceEqualityComparer<object>.Default; int typeKey = reader.ReadInt32(); if (typeKey == 0) { // this is a string, nothing more to load reader.ReadString(); return; } string typeName = (string)objects[typeKey]; if (typeName == typeof(bool).FullName) { // nothing more to load reader.ReadBoolean(); return; } else if (typeName == typeof(TemplateToken).FullName || typeName == typeof(CommonToken).FullName) { // nothing more to load int channel = reader.ReadInt32(); int charPositionInLine = reader.ReadInt32(); int line = reader.ReadInt32(); int startIndex = reader.ReadInt32(); int stopIndex = reader.ReadInt32(); string text = reader.ReadString(); int tokenIndex = reader.ReadInt32(); int type = reader.ReadInt32(); return; } else if (typeName == typeof(CompiledTemplate).FullName) { CompiledTemplate compiledTemplate = (CompiledTemplate)objects[key]; string name = reader.ReadString(); string prefix = reader.ReadString(); string template = reader.ReadString(); int templateDefStartTokenObject = reader.ReadInt32(); bool hasFormalArgs = reader.ReadBoolean(); int nativeGroupObject = reader.ReadInt32(); bool isRegion = reader.ReadBoolean(); Template.RegionType regionDefType = (Template.RegionType)reader.ReadInt32(); bool isAnonSubtemplate = reader.ReadBoolean(); compiledTemplate.TemplateDefStartToken = (IToken)objects[templateDefStartTokenObject]; compiledTemplate.NativeGroup = this; int formalArgsLength = reader.ReadInt32(); if (formalArgsLength >= 0) { List<FormalArgument> formalArguments = new List<FormalArgument>(formalArgsLength); for (int i = 0; i < formalArgsLength; i++) { int formalArgObject = reader.ReadInt32(); formalArguments.Add((FormalArgument)objects[formalArgObject]); } compiledTemplate.FormalArguments = formalArguments; } int stringsLength = reader.ReadInt32(); for (int i = 0; i < stringsLength; i++) reader.ReadString(); int instrsLength = reader.ReadInt32(); if (instrsLength >= 0) reader.ReadBytes(instrsLength); int codeSize = reader.ReadInt32(); int sourceMapLength = reader.ReadInt32(); for (int i = 0; i < sourceMapLength; i++) { int start = reader.ReadInt32(); int length = reader.ReadInt32(); } return; } else if (typeName == typeof(FormalArgument).FullName) { FormalArgument formalArgument = (FormalArgument)objects[key]; string name = reader.ReadString(); int index = reader.ReadInt32(); IToken defaultValueToken = (IToken)objects[reader.ReadInt32()]; int defaultValueObject = reader.ReadInt32(); int compiledDefaultValue = reader.ReadInt32(); formalArgument.DefaultValue = objects[defaultValueObject]; formalArgument.CompiledDefaultValue = (CompiledTemplate)objects[compiledDefaultValue]; } else if (typeName == typeof(Template).FullName) { Template template = (Template)objects[key]; int implObject = reader.ReadInt32(); template.impl = (CompiledTemplate)objects[implObject]; int localsCount = reader.ReadInt32(); if (localsCount >= 0) { template.locals = new object[localsCount]; for (int i = 0; i < localsCount; i++) { int localObject = reader.ReadInt32(); template.locals[i] = objects[localObject]; } } int groupObject = reader.ReadInt32(); template.Group = (TemplateGroup)objects[groupObject]; return; } else if (typeName == typeof(TemplateGroupFile).FullName) { bool isDefaultGroup = reader.ReadBoolean(); return; } else if (typeName == typeof(TemplateGroup).FullName) { bool isDefaultGroup = reader.ReadBoolean(); } else { throw new NotImplementedException(); } } private void CacheCompiledGroup(string cachePath, string prefix, string fileName, DateTime lastWriteTime) { var timer = System.Diagnostics.Stopwatch.StartNew(); var serializedStrings = new HashSet<string>(StringComparer.OrdinalIgnoreCase); var comparer = ObjectReferenceEqualityComparer<object>.Default; var serializedObjects = new HashSet<object>(ObjectReferenceEqualityComparer<object>.Default); // start with the root set serializedObjects.UnionWith(_importsToClearOnUnload.OfType<object>()); serializedObjects.UnionWith(templates.Values.OfType<object>()); serializedObjects.UnionWith(dictionaries.Values.SelectMany(i => i.Values).OfType<object>()); // update to the reachable set serializedObjects = CalculateReachableSerializedObjects(serializedObjects.ToArray()); MemoryStream stream = new MemoryStream(); var writer = new BinaryWriter(stream, Encoding.UTF8); writer.Write(lastWriteTime.Ticks); // objects List<object> orderedObjectsForExport = GetOrderedExports(serializedObjects); writer.Write(orderedObjectsForExport.Count); foreach (var obj in orderedObjectsForExport) { WriteGroupObject(writer, obj); diff --git a/Antlr4.Test.StringTemplate/TestDollarDelimiters.cs b/Antlr4.Test.StringTemplate/TestDollarDelimiters.cs index d5ea1ac..dcc41e2 100644 --- a/Antlr4.Test.StringTemplate/TestDollarDelimiters.cs +++ b/Antlr4.Test.StringTemplate/TestDollarDelimiters.cs @@ -1,151 +1,314 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using Antlr4.StringTemplate; using Microsoft.VisualStudio.TestTools.UnitTesting; using Path = System.IO.Path; [TestClass] public class TestDollarDelimiters : BaseTest { [TestMethod][TestCategory(TestCategories.ST4)] public void TestAttr() { string template = "hi $name$!"; Template st = new Template(template, '$', '$'); st.Add("name", "Ter"); string expected = "hi Ter!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestParallelMap() { TemplateGroup group = new TemplateGroup('$', '$'); group.DefineTemplate("test", "hi $names,phones:{n,p | $n$:$p$;}$", new string[] { "names", "phones" }); Template st = group.GetInstanceOf("test"); st.Add("names", "Ter"); st.Add("names", "Tom"); st.Add("names", "Sumana"); st.Add("phones", "x5001"); st.Add("phones", "x5002"); st.Add("phones", "x5003"); string expected = "hi Ter:x5001;Tom:x5002;Sumana:x5003;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRefToAnotherTemplateInSameGroup() { string dir = tmpdir; string a = "a() ::= << <$b()$> >>\n"; string b = "b() ::= <<bar>>\n"; writeFile(dir, "a.st", a); writeFile(dir, "b.st", b); TemplateGroup group = new TemplateGroupDirectory(dir, '$', '$'); Template st = group.GetInstanceOf("a"); string expected = " <bar> "; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDefaultArgument() { string templates = "method(name) ::= <<" + newline + "$stat(name)$" + newline + ">>" + newline + "stat(name,value=\"99\") ::= \"x=$value$; // $name$\"" + newline ; writeFile(tmpdir, "group.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "group.stg"), '$', '$'); Template b = group.GetInstanceOf("method"); b.Add("name", "foo"); string expecting = "x=99; // foo"; string result = b.Render(); Assert.AreEqual(expecting, result); } /// <summary> /// This is part of a regression test for antlr/stringtemplate4#46. /// </summary> /// <seealso href="https://github.com/antlr/stringtemplate4/issues/46">STGroupString does not honor delimeter stanza in a string definition</seealso> [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDelimitersClause() { string templates = "delimiters \"$\", \"$\"" + newline + "method(name) ::= <<" + newline + "$stat(name)$" + newline + ">>" + newline + "stat(name,value=\"99\") ::= \"x=$value$; // $name$\"" + newline ; writeFile(tmpdir, "group.stg", templates); TemplateGroup group = new TemplateGroupFile(tmpdir + "/group.stg"); Template b = group.GetInstanceOf("method"); b.Add("name", "foo"); string expecting = "x=99; // foo"; string result = b.Render(); Assert.AreEqual(expecting, result); } /// <summary> /// This is part of a regression test for antlr/stringtemplate4#46. /// </summary> /// <seealso href="https://github.com/antlr/stringtemplate4/issues/46">STGroupString does not honor delimeter stanza in a string definition</seealso> [TestMethod] [TestCategory(TestCategories.ST4)] public void TestDelimitersClauseInGroupString() { string templates = "delimiters \"$\", \"$\"" + newline + "method(name) ::= <<" + newline + "$stat(name)$" + newline + ">>" + newline + "stat(name,value=\"99\") ::= \"x=$value$; // $name$\"" + newline ; TemplateGroup group = new TemplateGroupString(templates); Template b = group.GetInstanceOf("method"); b.Add("name", "foo"); string expecting = "x=99; // foo"; string result = b.Render(); Assert.AreEqual(expecting, result); } + + /// <summary> + /// This is part of a regression test for antlr/stringtemplate4#66. + /// </summary> + /// <seealso href="https://github.com/antlr/stringtemplate4/issues/66">Changing delimiters doesn't work with STGroupFile</seealso> + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestImportTemplatePreservesDelimiters() + { + string groupFile = + "group GenerateHtml;" + newline + + "import \"html.st\"" + newline + + "entry() ::= <<" + newline + + "$html()$" + newline + + ">>" + newline; + string htmlFile = + "html() ::= <<" + newline + + "<table style=\"stuff\">" + newline + + ">>" + newline; + + string dir = tmpdir; + writeFile(dir, "GenerateHtml.stg", groupFile); + writeFile(dir, "html.st", htmlFile); + + TemplateGroup group = new TemplateGroupFile(dir + "/GenerateHtml.stg", '$', '$'); + + // test html template directly + Template st = group.GetInstanceOf("html"); + Assert.IsNotNull(st); + string expected = "<table style=\"stuff\">"; + string result = st.Render(); + Assert.AreEqual(expected, result); + + // test from entry template + st = group.GetInstanceOf("entry"); + Assert.IsNotNull(st); + expected = "<table style=\"stuff\">"; + result = st.Render(); + Assert.AreEqual(expected, result); + } + + /// <summary> + /// This is part of a regression test for antlr/stringtemplate4#66. + /// </summary> + /// <seealso href="https://github.com/antlr/stringtemplate4/issues/66">Changing delimiters doesn't work with STGroupFile</seealso> + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void testImportGroupPreservesDelimiters() + { + string groupFile = + "group GenerateHtml;" + newline + + "import \"HtmlTemplates.stg\"" + newline + + "entry() ::= <<" + newline + + "$html()$" + newline + + ">>" + newline; + string htmlFile = + "html() ::= <<" + newline + + "<table style=\"stuff\">" + newline + + ">>" + newline; + + string dir = tmpdir; + writeFile(dir, "GenerateHtml.stg", groupFile); + writeFile(dir, "HtmlTemplates.stg", htmlFile); + + TemplateGroup group = new TemplateGroupFile(dir + "/GenerateHtml.stg", '$', '$'); + + // test html template directly + Template st = group.GetInstanceOf("html"); + Assert.IsNotNull(st); + string expected = "<table style=\"stuff\">"; + string result = st.Render(); + Assert.AreEqual(expected, result); + + // test from entry template + st = group.GetInstanceOf("entry"); + Assert.IsNotNull(st); + expected = "<table style=\"stuff\">"; + result = st.Render(); + Assert.AreEqual(expected, result); + } + + /// <summary> + /// This is part of a regression test for antlr/stringtemplate4#66. + /// </summary> + /// <seealso href="https://github.com/antlr/stringtemplate4/issues/66">Changing delimiters doesn't work with STGroupFile</seealso> + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void testDelimitersClauseOverridesConstructorDelimiters() + { + string groupFile = + "group GenerateHtml;" + newline + + "delimiters \"$\", \"$\"" + newline + + "import \"html.st\"" + newline + + "entry() ::= <<" + newline + + "$html()$" + newline + + ">>" + newline; + string htmlFile = + "html() ::= <<" + newline + + "<table style=\"stuff\">" + newline + + ">>" + newline; + + string dir = tmpdir; + writeFile(dir, "GenerateHtml.stg", groupFile); + writeFile(dir, "html.st", htmlFile); + + TemplateGroup group = new TemplateGroupFile(dir + "/GenerateHtml.stg", '<', '>'); + + // test html template directly + Template st = group.GetInstanceOf("html"); + Assert.IsNotNull(st); + string expected = "<table style=\"stuff\">"; + string result = st.Render(); + Assert.AreEqual(expected, result); + + // test from entry template + st = group.GetInstanceOf("entry"); + Assert.IsNotNull(st); + expected = "<table style=\"stuff\">"; + result = st.Render(); + Assert.AreEqual(expected, result); + } + + /// <summary> + /// This is part of a regression test for antlr/stringtemplate4#66. + /// </summary> + /// <seealso href="https://github.com/antlr/stringtemplate4/issues/66">Changing delimiters doesn't work with STGroupFile</seealso> + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void testDelimitersClauseOverridesInheritedDelimiters() + { + string groupFile = + "group GenerateHtml;" + newline + + "delimiters \"<\", \">\"" + newline + + "import \"HtmlTemplates.stg\"" + newline + + "entry() ::= <<" + newline + + "<html()>" + newline + + ">>" + newline; + string htmlFile = + "delimiters \"$\", \"$\"" + newline + + "html() ::= <<" + newline + + "<table style=\"stuff\">" + newline + + ">>" + newline; + + string dir = tmpdir; + writeFile(dir, "GenerateHtml.stg", groupFile); + writeFile(dir, "HtmlTemplates.stg", htmlFile); + + TemplateGroup group = new TemplateGroupFile(dir + "/GenerateHtml.stg"); + + // test html template directly + Template st = group.GetInstanceOf("html"); + Assert.IsNotNull(st); + string expected = "<table style=\"stuff\">"; + string result = st.Render(); + Assert.AreEqual(expected, result); + + // test from entry template + st = group.GetInstanceOf("entry"); + Assert.IsNotNull(st); + expected = "<table style=\"stuff\">"; + result = st.Render(); + Assert.AreEqual(expected, result); + } } } diff --git a/Reference/stringtemplate3 b/Reference/stringtemplate3 index bb0a579..e60b235 160000 --- a/Reference/stringtemplate3 +++ b/Reference/stringtemplate3 @@ -1 +1 @@ -Subproject commit bb0a5791c6d93626a74d163afc57f750806efa00 +Subproject commit e60b23544539d64d2f57a87e87a5b383cc2b0ba9 diff --git a/Reference/stringtemplate4 b/Reference/stringtemplate4 index 0ac514f..45662f9 160000 --- a/Reference/stringtemplate4 +++ b/Reference/stringtemplate4 @@ -1 +1 @@ -Subproject commit 0ac514f440a0911c1468cc415dfb05a93c32cbb8 +Subproject commit 45662f900683a05e7c5f50300ed0de93861cc443
antlr/antlrcs
7e59a1373ab354a1ec166186057cac504e665bda
Rename project to reflect new netstandard target framework
diff --git a/Antlr3.sln b/Antlr3.sln index 198bc06..8ffe7aa 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,240 +1,240 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.netstandard", "Runtime\Antlr3.Runtime\Antlr3.Runtime.netstandard.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj similarity index 94% rename from Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj rename to Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj index 201b7a9..b5983ba 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.csproj @@ -1,153 +1,153 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}</ProjectGuid> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> <TargetFrameworkProfile /> <FileAlignment>512</FileAlignment> - <BaseIntermediateOutputPath>obj\portable-net45\</BaseIntermediateOutputPath> + <BaseIntermediateOutputPath>obj\netstandard\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> - <OutputPath>bin\portable-net45\Debug\</OutputPath> + <OutputPath>bin\netstandard\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\portable-net45\Debug\Antlr3.Runtime.xml</DocumentationFile> + <DocumentationFile>bin\netstandard\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\portable-net45\Release\</OutputPath> + <OutputPath>bin\netstandard\Release\</OutputPath> <DefineConstants>TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\portable-net45\Release\Antlr3.Runtime.xml</DocumentationFile> + <DocumentationFile>bin\netstandard\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> <Compile Include="System\OnSerializingAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> <Compile Include="System\StreamingContext.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> - <None Include="Antlr3.Runtime.portable-net45.project.json" /> + <None Include="Antlr3.Runtime.netstandard.project.json" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json b/Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.project.json similarity index 100% rename from Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json rename to Runtime/Antlr3.Runtime/Antlr3.Runtime.netstandard.project.json diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 228f471..600387f 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,48 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <group targetFramework="netstandard1.1"> <dependency id="NETStandard.Library" version="1.6.0"/> </group> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\netstandard\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
7740eeb57160b370b0f6db7068020a07f6b41e36
Remove reference to Microsoft.NETCore.Portable.Compatibility
diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json index c07e816..5cff9d9 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json @@ -1,11 +1,10 @@ { "dependencies": { - "NETStandard.Library": "1.6.0", - "Microsoft.NETCore.Portable.Compatibility": "1.0.1" + "NETStandard.Library": "1.6.0" }, "frameworks": { "netstandard1.1": { } } }
antlr/antlrcs
2f6a3700cf22662ce552716d4b419755be581088
Clean up using directives in BaseRecognizer
diff --git a/Runtime/Antlr3.Runtime/BaseRecognizer.cs b/Runtime/Antlr3.Runtime/BaseRecognizer.cs index d12ff9a..e66391a 100644 --- a/Runtime/Antlr3.Runtime/BaseRecognizer.cs +++ b/Runtime/Antlr3.Runtime/BaseRecognizer.cs @@ -1,561 +1,559 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; - using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using Conditional = System.Diagnostics.ConditionalAttribute; using IDebugEventListener = Antlr.Runtime.Debug.IDebugEventListener; - using MethodBase = System.Reflection.MethodBase; using Regex = System.Text.RegularExpressions.Regex; using TextWriter = System.IO.TextWriter; #if !PORTABLE + using ArgumentNullException = System.ArgumentNullException; + using MethodBase = System.Reflection.MethodBase; using StackFrame = System.Diagnostics.StackFrame; using StackTrace = System.Diagnostics.StackTrace; -#else - using NotSupportedException = System.NotSupportedException; #endif /** <summary> * A generic recognizer that can handle recognizers generated from * lexer, parser, and tree grammars. This is all the parsing * support code essentially; most of it is error recovery stuff and * backtracking. * </summary> */ public abstract class BaseRecognizer { public const int MemoRuleFailed = -2; public const int MemoRuleUnknown = -1; public const int InitialFollowStackSize = 100; // copies from Token object for convenience in actions public const int DefaultTokenChannel = TokenChannels.Default; public const int Hidden = TokenChannels.Hidden; public const string NextTokenRuleName = "nextToken"; /** <summary> * State of a lexer, parser, or tree parser are collected into a state * object so the state can be shared. This sharing is needed to * have one grammar import others and share same error variables * and other state variables. It's a kind of explicit multiple * inheritance via delegation of methods and shared state. * </summary> */ protected internal RecognizerSharedState state; public BaseRecognizer() : this(new RecognizerSharedState()) { } public BaseRecognizer( RecognizerSharedState state ) { if ( state == null ) { state = new RecognizerSharedState(); } this.state = state; InitDFAs(); } public TextWriter TraceDestination { get; set; } public virtual void SetState(RecognizerSharedState value) { this.state = value; } protected virtual void InitDFAs() { } /** <summary>reset the parser's state; subclasses must rewinds the input stream</summary> */ public virtual void Reset() { // wack everything related to error recovery if ( state == null ) { return; // no shared state work to do } state._fsp = -1; state.errorRecovery = false; state.lastErrorIndex = -1; state.failed = false; state.syntaxErrors = 0; // wack everything related to backtracking and memoization state.backtracking = 0; for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) { // wipe cache state.ruleMemo[i] = null; } } /** <summary> * Match current input symbol against ttype. Attempt * single token insertion or deletion error recovery. If * that fails, throw MismatchedTokenException. * </summary> * * <remarks> * To turn off single token insertion or deletion error * recovery, override recoverFromMismatchedToken() and have it * throw an exception. See TreeParser.recoverFromMismatchedToken(). * This way any error in a rule will cause an exception and * immediate exit from rule. Rule would recover by resynchronizing * to the set of symbols that can follow rule ref. * </remarks> */ public virtual object Match( IIntStream input, int ttype, BitSet follow ) { //System.out.println("match "+((TokenStream)input).LT(1)); object matchedSymbol = GetCurrentInputSymbol( input ); if ( input.LA( 1 ) == ttype ) { input.Consume(); state.errorRecovery = false; state.failed = false; return matchedSymbol; } if ( state.backtracking > 0 ) { state.failed = true; return matchedSymbol; } matchedSymbol = RecoverFromMismatchedToken( input, ttype, follow ); return matchedSymbol; } /** <summary>Match the wildcard: in a symbol</summary> */ public virtual void MatchAny( IIntStream input ) { state.errorRecovery = false; state.failed = false; input.Consume(); } public virtual bool MismatchIsUnwantedToken( IIntStream input, int ttype ) { return input.LA( 2 ) == ttype; } public virtual bool MismatchIsMissingToken( IIntStream input, BitSet follow ) { if ( follow == null ) { // we have no information about the follow; we can only consume // a single token and hope for the best return false; } // compute what can follow this grammar element reference if ( follow.Member( TokenTypes.EndOfRule ) ) { BitSet viableTokensFollowingThisRule = ComputeContextSensitiveRuleFOLLOW(); follow = follow.Or( viableTokensFollowingThisRule ); if ( state._fsp >= 0 ) { // remove EOR if we're not the start symbol follow.Remove( TokenTypes.EndOfRule ); } } // if current token is consistent with what could come after set // then we know we're missing a token; error recovery is free to // "insert" the missing token //System.out.println("viable tokens="+follow.toString(getTokenNames())); //System.out.println("LT(1)="+((TokenStream)input).LT(1)); // BitSet cannot handle negative numbers like -1 (EOF) so I leave EOR // in follow set to indicate that the fall of the start symbol is // in the set (EOF can follow). if ( follow.Member( input.LA( 1 ) ) || follow.Member( TokenTypes.EndOfRule ) ) { //System.out.println("LT(1)=="+((TokenStream)input).LT(1)+" is consistent with what follows; inserting..."); return true; } return false; } /** <summary>Report a recognition problem.</summary> * * <remarks> * This method sets errorRecovery to indicate the parser is recovering * not parsing. Once in recovery mode, no errors are generated. * To get out of recovery mode, the parser must successfully match * a token (after a resync). So it will go: * * 1. error occurs * 2. enter recovery mode, report error * 3. consume until token found in resynch set * 4. try to resume parsing * 5. next match() will reset errorRecovery mode * * If you override, make sure to update syntaxErrors if you care about that. * </remarks> */ public virtual void ReportError( RecognitionException e ) { // if we've already reported an error and have not matched a token // yet successfully, don't report any errors. if ( state.errorRecovery ) { //System.err.print("[SPURIOUS] "); return; } state.syntaxErrors++; // don't count spurious state.errorRecovery = true; DisplayRecognitionError( this.TokenNames, e ); } public virtual void DisplayRecognitionError( string[] tokenNames, RecognitionException e ) { string hdr = GetErrorHeader( e ); string msg = GetErrorMessage( e, tokenNames ); EmitErrorMessage( hdr + " " + msg ); } /** <summary>What error message should be generated for the various exception types?</summary> * * <remarks> * Not very object-oriented code, but I like having all error message * generation within one method rather than spread among all of the * exception classes. This also makes it much easier for the exception * handling because the exception classes do not have to have pointers back * to this object to access utility routines and so on. Also, changing * the message for an exception type would be difficult because you * would have to subclassing exception, but then somehow get ANTLR * to make those kinds of exception objects instead of the default. * This looks weird, but trust me--it makes the most sense in terms * of flexibility. * * For grammar debugging, you will want to override this to add * more information such as the stack frame with * getRuleInvocationStack(e, this.getClass().getName()) and, * for no viable alts, the decision description and state etc... * * Override this to change the message generated for one or more * exception types. * </remarks> */ public virtual string GetErrorMessage( RecognitionException e, string[] tokenNames ) { string msg = e.Message; if ( e is UnwantedTokenException ) { UnwantedTokenException ute = (UnwantedTokenException)e; string tokenName = "<unknown>"; if ( ute.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[ute.Expecting]; } msg = "extraneous input " + GetTokenErrorDisplay( ute.UnexpectedToken ) + " expecting " + tokenName; } else if ( e is MissingTokenException ) { MissingTokenException mte = (MissingTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "missing " + tokenName + " at " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedTokenException ) { MismatchedTokenException mte = (MismatchedTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting " + tokenName; } else if ( e is MismatchedTreeNodeException ) { MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e; string tokenName = "<unknown>"; if ( mtne.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mtne.Expecting]; } // workaround for a .NET framework bug (NullReferenceException) string nodeText = ( mtne.Node != null ) ? mtne.Node.ToString() ?? string.Empty : string.Empty; msg = "mismatched tree node: " + nodeText + " expecting " + tokenName; } else if ( e is NoViableAltException ) { //NoViableAltException nvae = (NoViableAltException)e; // for development, can add "decision=<<"+nvae.grammarDecisionDescription+">>" // and "(decision="+nvae.decisionNumber+") and // "state "+nvae.stateNumber msg = "no viable alternative at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is EarlyExitException ) { //EarlyExitException eee = (EarlyExitException)e; // for development, can add "(decision="+eee.decisionNumber+")" msg = "required (...)+ loop did not match anything at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedSetException ) { MismatchedSetException mse = (MismatchedSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedNotSetException ) { MismatchedNotSetException mse = (MismatchedNotSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is FailedPredicateException ) { FailedPredicateException fpe = (FailedPredicateException)e; msg = "rule " + fpe.RuleName + " failed predicate: {" + fpe.PredicateText + "}?"; } return msg; } /** <summary> * Get number of recognition errors (lexer, parser, tree parser). Each * recognizer tracks its own number. So parser and lexer each have * separate count. Does not count the spurious errors found between * an error and next valid token match * </summary> * * <seealso cref="ReportError(RecognitionException)"/> */ public virtual int NumberOfSyntaxErrors { get { return state.syntaxErrors; } } /** <summary>What is the error header, normally line/character position information?</summary> */ public virtual string GetErrorHeader( RecognitionException e ) { string prefix = SourceName ?? string.Empty; if (prefix.Length > 0) prefix += ' '; return string.Format("{0}line {1}:{2}", prefix, e.Line, e.CharPositionInLine + 1); } /** <summary> * How should a token be displayed in an error message? The default * is to display just the text, but during development you might * want to have a lot of information spit out. Override in that case * to use t.ToString() (which, for CommonToken, dumps everything about * the token). This is better than forcing you to override a method in * your token objects because you don't have to go modify your lexer * so that it creates a new Java type. * </summary> */ public virtual string GetTokenErrorDisplay( IToken t ) { string s = t.Text; if ( s == null ) { if ( t.Type == TokenTypes.EndOfFile ) { s = "<EOF>"; } else { s = "<" + t.Type + ">"; } } s = Regex.Replace( s, "\n", "\\\\n" ); s = Regex.Replace( s, "\r", "\\\\r" ); s = Regex.Replace( s, "\t", "\\\\t" ); return "'" + s + "'"; } /** <summary>Override this method to change where error messages go</summary> */ public virtual void EmitErrorMessage( string msg ) { if (TraceDestination != null) TraceDestination.WriteLine( msg ); } /** <summary> * Recover from an error found on the input stream. This is * for NoViableAlt and mismatched symbol exceptions. If you enable * single token insertion and deletion, this will usually not * handle mismatched symbol exceptions but there could be a mismatched * token that the match() routine could not recover from. * </summary> */ public virtual void Recover( IIntStream input, RecognitionException re ) { if ( state.lastErrorIndex == input.Index ) { // uh oh, another error at same token index; must be a case // where LT(1) is in the recovery token set so nothing is // consumed; consume a single token so at least to prevent // an infinite loop; this is a failsafe. input.Consume(); } state.lastErrorIndex = input.Index; BitSet followSet = ComputeErrorRecoverySet(); BeginResync(); ConsumeUntil( input, followSet ); EndResync(); } /** <summary> * A hook to listen in on the token consumption during error recovery. * The DebugParser subclasses this to fire events to the listenter. * </summary> */ public virtual void BeginResync() { } public virtual void EndResync() { } /* Compute the error recovery set for the current rule. During * rule invocation, the parser pushes the set of tokens that can * follow that rule reference on the stack; this amounts to * computing FIRST of what follows the rule reference in the * enclosing rule. This local follow set only includes tokens * from within the rule; i.e., the FIRST computation done by * ANTLR stops at the end of a rule. * * EXAMPLE * * When you find a "no viable alt exception", the input is not * consistent with any of the alternatives for rule r. The best * thing to do is to consume tokens until you see something that * can legally follow a call to r *or* any rule that called r. * You don't want the exact set of viable next tokens because the * input might just be missing a token--you might consume the * rest of the input looking for one of the missing tokens. * * Consider grammar: * * a : '[' b ']' * | '(' b ')' * ; * b : c '^' INT ; * c : ID * | INT * ; * * At each rule invocation, the set of tokens that could follow * that rule is pushed on a stack. Here are the various "local" * follow sets: * * FOLLOW(b1_in_a) = FIRST(']') = ']' * FOLLOW(b2_in_a) = FIRST(')') = ')' * FOLLOW(c_in_b) = FIRST('^') = '^' * * Upon erroneous input "[]", the call chain is * * a -> b -> c * * and, hence, the follow context stack is: * * depth local follow set after call to rule * 0 <EOF> a (from main()) * 1 ']' b * 3 '^' c * * Notice that ')' is not included, because b would have to have * been called from a different context in rule a for ')' to be * included. * * For error recovery, we cannot consider FOLLOW(c) * (context-sensitive or otherwise). We need the combined set of * all context-sensitive FOLLOW sets--the set of all tokens that * could follow any reference in the call chain. We need to * resync to one of those tokens. Note that FOLLOW(c)='^' and if * we resync'd to that token, we'd consume until EOF. We need to * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. * In this case, for input "[]", LA(1) is in this set so we would * not consume anything and after printing an error rule c would * return normally. It would not find the required '^' though. * At this point, it gets a mismatched token error and throws an * exception (since LA(1) is not in the viable following token * set). The rule exception handler tries to recover, but finds * the same recovery set and doesn't consume anything. Rule b * exits normally returning to rule a. Now it finds the ']' (and * with the successful match exits errorRecovery mode). * * So, you cna see that the parser walks up call chain looking * for the token that was a member of the recovery set. * * Errors are not generated in errorRecovery mode. * * ANTLR's error recovery mechanism is based upon original ideas: * * "Algorithms + Data Structures = Programs" by Niklaus Wirth * * and * * "A note on error recovery in recursive descent parsers": * http://portal.acm.org/citation.cfm?id=947902.947905
antlr/antlrcs
3c2767695a14960557a7cd49e7c3f8ee7328ffbc
Restore NuGet packages before building
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 5c9bc7d..04480e9 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,261 +1,265 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '14.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } $DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If ($Logger) { $LoggerArgument = "/logger:$Logger" } +# Restore packages +.\NuGet.exe update -self +.\NuGet.exe restore $SolutionPath + &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\net35-client\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-dev" $STVersion = "4.0.7.2-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
9a701359bbe4e3a94ab0909bd69b7d52d9b8b02a
Convert Antlr3.Runtime.portable-net45 to target .NET Standard 1.1
diff --git a/.gitignore b/.gitignore index efa8dee..3cb4ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,40 @@ # ignore thumbnails created by windows Thumbs.db # Ignore files build by Visual Studio *.user *.aps *.pch *.vspscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.cache *.ilk *.log *.sbr *.vs/ _ReSharper*/ [Tt]est[Rr]esult* +# User files related to NuGet project.json +*.lock.json +*.nuget.props +*.nuget.targets + # Ignore build output bin/ obj/ # Ignore prepared output folders build/prep/Backup/ build/prep/Bootstrap/ build/prep/dist/ build/prep/nuget/ build/prep/Runtime/ build/prep/ST3/ build/prep/ST4/ build/prep/Tool/ diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj index b348e9d..194e993 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj @@ -1,151 +1,153 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net20\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net20\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\OnSerializingAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="System\StreamingContext.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj index 4d68a19..0790c55 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj @@ -1,152 +1,154 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net40-client\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net40-client\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\OnSerializingAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="System\StreamingContext.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj index c55171c..026f560 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj @@ -1,150 +1,152 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{34BA0BD4-FB93-48D7-967E-83F229F220A0}</ProjectGuid> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\portable-net40\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\portable-net40\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net40\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\portable-net40\Release\</OutputPath> <DefineConstants>TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net40\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\OnSerializingAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="System\StreamingContext.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj index 080cdea..201b7a9 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj @@ -1,150 +1,153 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}</ProjectGuid> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <TargetFrameworkProfile>Profile259</TargetFrameworkProfile> + <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> + <TargetFrameworkProfile /> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\portable-net45\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\portable-net45\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <DefineConstants>DEBUG;TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net45\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\portable-net45\Release\</OutputPath> - <DefineConstants>TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <DefineConstants>TRACE;PORTABLE;NETSTANDARD;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net45\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\OnSerializingAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="System\StreamingContext.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> + <None Include="Antlr3.Runtime.portable-net45.project.json" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json new file mode 100644 index 0000000..c07e816 --- /dev/null +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.project.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0", + "Microsoft.NETCore.Portable.Compatibility": "1.0.1" + }, + + "frameworks": { + "netstandard1.1": { + } + } +} diff --git a/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs b/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs new file mode 100644 index 0000000..a14e6c6 --- /dev/null +++ b/Runtime/Antlr3.Runtime/System/OnSerializingAttribute.cs @@ -0,0 +1,11 @@ +#if NETSTANDARD + +namespace System.Runtime.Serialization +{ + [AttributeUsage(AttributeTargets.Method, Inherited = false)] + internal sealed class OnSerializingAttribute : Attribute + { + } +} + +#endif diff --git a/Runtime/Antlr3.Runtime/System/StreamingContext.cs b/Runtime/Antlr3.Runtime/System/StreamingContext.cs new file mode 100644 index 0000000..8bb3234 --- /dev/null +++ b/Runtime/Antlr3.Runtime/System/StreamingContext.cs @@ -0,0 +1,10 @@ +#if NETSTANDARD + +namespace System.Runtime.Serialization +{ + internal struct StreamingContext + { + } +} + +#endif diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 4f9e942..228f471 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,43 +1,48 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> + <dependencies> + <group targetFramework="netstandard1.1"> + <dependency id="NETStandard.Library" version="1.6.0"/> + </group> + </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> - <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.dll" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.pdb" target="lib\netstandard1.1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.xml" target="lib\netstandard1.1"/> <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
fc2dcc89eddbf7c55607e5a5e5ff55f55d19f286
Add existing files to projects
diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj index 12714e0..b348e9d 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj @@ -1,148 +1,151 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net20\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net20\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> + <Compile Include="System\ICloneable.cs" /> + <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\SerializableAttribute.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj index 14f140a..4d68a19 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj @@ -1,149 +1,152 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net40-client\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net40-client\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> + <Compile Include="System\ICloneable.cs" /> + <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\SerializableAttribute.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file
antlr/antlrcs
2a64d8f36c554652fcdc5c0b37ba12637aa44552
Rename project files to indicate the target framework
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj similarity index 98% rename from Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj rename to Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj index d7999dc..e399666 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.net35-client.csproj @@ -1,130 +1,131 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2F59DA1C-A502-440C-ABE8-240BDE2D0664}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Visualizer</RootNamespace> <AssemblyName>Antlr3.Runtime.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Include="Interval.cs" /> <Compile Include="RuntimeVisualizerExtensions.cs" /> <Compile Include="TreeViewModel.cs" /> <Compile Include="BaseTreeVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TokenStreamVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="TreeVisualizerViewModel.cs" /> <EmbeddedResource Include="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Include="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> -</Project> +</Project> \ No newline at end of file diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj similarity index 99% rename from Antlr3.StringTemplate/Antlr3.StringTemplate.csproj rename to Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj index 5a485a6..f68a5c2 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.net35-client.csproj @@ -1,143 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.ST</RootNamespace> <AssemblyName>Antlr3.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> - <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="CommonGroupLoader.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="PathGroupLoader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StringTemplate.cs" /> <Compile Include="StringTemplateErrorListener.cs" /> <Compile Include="StringTemplateGroup.cs" /> <Compile Include="StringTemplateGroupInterface.cs" /> <Compile Include="StringTemplateGroupLoader.cs" /> <Compile Include="StringTemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> <Compile Include="JavaExtensions\ListExtensions.cs" /> <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Include="Language\ASTExpr.cs" /> <Compile Include="Language\Cat.cs" /> <Compile Include="Language\ChunkToken.cs" /> <Compile Include="Language\ConditionalExpr.cs" /> <Compile Include="Language\Expr.cs" /> <Compile Include="Language\FormalArgument.cs" /> <Compile Include="Language\NewlineRef.cs" /> <Compile Include="Language\RegionType.cs" /> <Compile Include="Language\StringRef.cs" /> <Compile Include="Language\StringTemplateAST.cs" /> <Compile Include="Language\StringTemplateToken.cs" /> <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> <Compile Include="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Include="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Include="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Include="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Include="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Include="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Include="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Include="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> <Compile Include="TypeRegistry`1.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj index 7ba70d4..4fb23b6 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Antlr3.Targets.ActionScript.csproj @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.ActionScript</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="ActionScriptTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj index d7361cb..993e51e 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj +++ b/Antlr3.Targets/Antlr3.Targets.C/Antlr3.Targets.C.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.C</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="CTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj index d62ca56..d9737a6 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Antlr3.Targets.CSharp2.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.CSharp2</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="CSharp2Target.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj index d425d82..83da090 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Antlr3.Targets.CSharp3.csproj @@ -1,72 +1,72 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{67012F41-94F9-48E6-9677-E3C56E42917F}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.CSharp3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <DelaySign>false</DelaySign> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="CSharp3Target.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj index 44e9d07..7734415 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Antlr3.Targets.Cpp.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{46171154-755A-4595-99AA-537D684BCA28}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Cpp</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="CPPTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj index 1a311a0..79158a4 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Antlr3.Targets.Delphi.csproj @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{6689F268-CE30-4CEC-AAD5-2DF72C43623C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Delphi</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="DelphiTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj index f5e73fd..64a383c 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Java/Antlr3.Targets.Java.csproj @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{696F611F-003B-477D-AFA0-4F15478C9D32}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Java</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="JavaTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj index 8365b61..12465c9 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Antlr3.Targets.JavaScript.csproj @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1551D1E7-D515-4488-A889-5DEBB4950880}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.JavaScript</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="JavaScriptTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj index e328212..059a1c4 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Antlr3.Targets.ObjC.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8EFEA650-B9F6-498B-8865-A78103CCB590}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.ObjC</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="ObjCTarget.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj index af6b60e..3bed604 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Antlr3.Targets.Perl5.csproj @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{9444ACEF-784D-47B0-B317-F374782FA511}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Perl5</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Perl5Target.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj index 01d784c..f53651d 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Python</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="PythonTarget.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj index bb8a9d3..e55aafc 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Python3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Python3Target.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj index 088cbe4..2954138 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Antlr3.Targets.Ruby.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Ruby</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RubyTarget.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>False</Private> </ProjectReference> - <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 7b64a9a..133b73c 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,148 +1,148 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8B58597B-058E-4D7A-B83E-5269BDABBE2C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="DebugTestAutoAST.cs" /> <Compile Include="DebugTestCompositeGrammars.cs" /> <Compile Include="DebugTestRewriteAST.cs" /> <Compile Include="ErrorQueue.cs" /> <Compile Include="IRuntimeTestHarness.cs" /> <Compile Include="JavaRuntimeTestHarness.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RuntimeTestHarness.cs" /> <Compile Include="StringTemplateTests.cs" /> <Compile Include="TestASTConstruction.cs" /> <Compile Include="TestAttributes.cs" /> <Compile Include="TestAutoAST.cs" /> <Compile Include="TestBufferedTreeNodeStream.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestCharDFAConversion.cs" /> <Compile Include="TestCommonTokenStream.cs" /> <Compile Include="TestCompositeGrammars.cs" /> <Compile Include="TestDFAConversion.cs" /> <Compile Include="TestDFAMatching.cs" /> <Compile Include="TestFastQueue.cs" /> <Compile Include="TestHeteroAST.cs" /> <Compile Include="TestInterpretedLexing.cs" /> <Compile Include="TestInterpretedParsing.cs" /> <Compile Include="TestIntervalSet.cs" /> <Compile Include="TestJavaCodeGeneration.cs" /> <Compile Include="TestLeftRecursion.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLookaheadStream.cs" /> <Compile Include="TestMessages.cs" /> <Compile Include="TestNFAConstruction.cs" /> <Compile Include="TestRewriteAST.cs" /> <Compile Include="TestRewriteTemplates.cs" /> <Compile Include="TestSemanticPredicateEvaluation.cs" /> <Compile Include="TestSemanticPredicates.cs" /> <Compile Include="TestSets.cs" /> <Compile Include="TestSymbolDefinitions.cs" /> <Compile Include="TestSyntacticPredicateEvaluation.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTemplates.cs" /> <Compile Include="TestTokenRewriteStream.cs" /> <Compile Include="TestTopologicalSort.cs" /> <Compile Include="TestTreeGrammarRewriteAST.cs" /> <Compile Include="TestTreeIterator.cs" /> <Compile Include="TestTreeNodeStream.cs" /> <Compile Include="TestTreeParsing.cs" /> <Compile Include="TestTrees.cs" /> <Compile Include="TestTreeWizard.cs" /> </ItemGroup> <ItemGroup> <Content Include="AuthoringTests.txt" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug</Name> + <Name>Antlr3.Runtime.Debug.net20</Name> </ProjectReference> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> - <Name>Antlr3.Runtime.JavaExtensions</Name> + <Name>Antlr3.Runtime.JavaExtensions.net35-client</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> + <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> - <Name>Antlr3.StringTemplate</Name> + <Name>Antlr3.StringTemplate.net35-client</Name> <Private>True</Private> </ProjectReference> - <ProjectReference Include="..\Antlr3\Antlr3.csproj"> + <ProjectReference Include="..\Antlr3\Antlr3.net35-client.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> - <Name>Antlr3</Name> + <Name>Antlr3.net35-client</Name> <Private>True</Private> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> <PropertyGroup> <PostBuildEvent> </PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index ed7a34e..198bc06 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,240 +1,240 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.net35-client", "Antlr3\Antlr3.net35-client.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate.net35-client", "Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug.net20", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions.net35-client", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.net35-client", "Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate.net40", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.net40.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer.net35-client", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer.net35-client", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.net35-client.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.net35-client.csproj similarity index 98% rename from Antlr3/Antlr3.csproj rename to Antlr3/Antlr3.net35-client.csproj index 3d22031..e82d2c1 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.net35-client.csproj @@ -1,510 +1,510 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug</Name> + <Name>Antlr3.Runtime.Debug.net20</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> - <Name>Antlr4.StringTemplate.Visualizer</Name> + <Name>Antlr4.StringTemplate.Visualizer.net35-client</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj similarity index 98% rename from Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj rename to Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj index 7edddd0..539b49f 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.net35-client.csproj @@ -1,130 +1,130 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate.Visualizer</RootNamespace> <AssemblyName>Antlr4.StringTemplate.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> </ItemGroup> <ItemGroup> <Compile Include="AstNodeToStringConverter.cs" /> <Compile Include="AttributeViewModel.cs" /> <Compile Include="Extensions\FlowDocumentExtensions.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TemplateCallHierarchyViewModel.cs" /> <Compile Include="TemplateFrameAttributeViewModel.cs" /> <Compile Include="TemplateVisualizer.cs" /> <Compile Include="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Include="TemplateVisualizerViewModel.cs" /> <Compile Include="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> <Compile Include="TreeViewItemDisplay.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj similarity index 99% rename from Antlr4.StringTemplate/Antlr4.StringTemplate.csproj rename to Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj index d667a04..4e974dd 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.net35-client.csproj @@ -1,162 +1,162 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <FileAlignment>512</FileAlignment> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj similarity index 95% rename from Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj rename to Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj index 12f8c45..57eafd3 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.net40.csproj @@ -1,112 +1,112 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> <Visible>False</Visible> </CodeAnalysisDependentAssemblyPaths> </ItemGroup> <ItemGroup> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="TestAggregates.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestNoNewlineTemplates.cs" /> <Compile Include="TestTemplateNames.cs" /> <Compile Include="TestTemplateRawGroupDirectory.cs" /> <Compile Include="TestVisualizer.cs" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="ErrorBufferAllErrors.cs" /> <Compile Include="TestCompiler.cs" /> <Compile Include="TestCoreBasics.cs" /> <Compile Include="TestDebugEvents.cs" /> <Compile Include="TestDictionaries.cs" /> <Compile Include="TestDollarDelimiters.cs" /> <Compile Include="TestFunctions.cs" /> <Compile Include="TestGroups.cs" /> <Compile Include="TestGroupSyntax.cs" /> <Compile Include="TestGroupSyntaxErrors.cs" /> <Compile Include="TestImports.cs" /> <Compile Include="TestIndentation.cs" /> <Compile Include="TestIndirectionAndEarlyEval.cs" /> <Compile Include="TestInterptimeErrors.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLineWrap.cs" /> <Compile Include="TestLists.cs" /> <Compile Include="TestModelAdaptors.cs" /> <Compile Include="TestNullAndEmptyValues.cs" /> <Compile Include="TestOptions.cs" /> <Compile Include="TestRegions.cs" /> <Compile Include="TestRenderers.cs" /> <Compile Include="TestScopes.cs" /> <Compile Include="TestSubtemplates.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTokensForDollarDelimiters.cs" /> <Compile Include="TestWhitespace.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.net35-client.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> - <Name>Antlr4.StringTemplate.Visualizer</Name> + <Name>Antlr4.StringTemplate.Visualizer.net35-client</Name> </ProjectReference> - <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> + <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.net35-client.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> - <Name>Antlr4.StringTemplate</Name> + <Name>Antlr4.StringTemplate.net35-client</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.net20.csproj similarity index 100% rename from Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj rename to Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.net20.csproj diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.net35-client.csproj similarity index 100% rename from Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj rename to Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.net35-client.csproj diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index b3c8b01..c801869 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,190 +1,190 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Test</RootNamespace> <AssemblyName>Antlr3.Runtime.Test</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Numerics" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.net35-client.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> - <Name>Antlr3.StringTemplate</Name> + <Name>Antlr3.StringTemplate.net35-client</Name> </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.net20.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> - <Name>Antlr3.Runtime.Debug</Name> + <Name>Antlr3.Runtime.Debug.net20</Name> </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> + <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.net35-client.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> - <Name>Antlr3.Runtime.JavaExtensions</Name> + <Name>Antlr3.Runtime.JavaExtensions.net35-client</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Include="Composition\Program.cs" /> <Compile Include="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Include="PreprocessorTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Include="SlimParsing\ITokenSource`1.cs" /> <Compile Include="SlimParsing\ITokenStream`1.cs" /> <Compile Include="SlimParsing\SlimLexer.cs" /> <Compile Include="SlimParsing\SlimStringStream.cs" /> <Compile Include="SlimParsing\SlimToken.cs" /> <Compile Include="SlimParsing\SlimTokenStream.cs" /> <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> <Compile Include="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestDotTreeGenerator.cs" /> <Compile Include="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestFastLexer.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file
antlr/antlrcs
19ca2ebf3cd95f31520a7ce49635a66145fb398b
Fix small errors in build script
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 23481fe..ab9f653 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,261 +1,261 @@ param ( [switch]$Debug, [string]$VisualStudioVersion = '14.0', [string]$Verbosity = 'minimal', [string]$Logger ) # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } If ($Debug) { $BuildConfig = 'Debug' } Else { $BuildConfig = 'Release' } -$DebugBuild = false +$DebugBuild = $false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" If ($Logger) { $LoggerArgument = "/logger:$Logger" } &$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } } If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" If (-not $?) { $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" If (-not $?) { $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files -&$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath +&$msbuild /nologo /m /nr:false /t:rebuild "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath If (-not $?) { $host.ui.WriteErrorLine("Build Failed, Aborting!") exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-dev" $STVersion = "4.0.7.2-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE } .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols If (-not $?) { $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") exit $LASTEXITCODE }
antlr/antlrcs
ca61802a5680b03ce477d893197d449ba04c5772
Fix all violations of CS1574
diff --git a/Runtime/Antlr3.Runtime/BaseRecognizer.cs b/Runtime/Antlr3.Runtime/BaseRecognizer.cs index aa76c29..d564c2c 100644 --- a/Runtime/Antlr3.Runtime/BaseRecognizer.cs +++ b/Runtime/Antlr3.Runtime/BaseRecognizer.cs @@ -1,898 +1,898 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using Conditional = System.Diagnostics.ConditionalAttribute; using IDebugEventListener = Antlr.Runtime.Debug.IDebugEventListener; using MethodBase = System.Reflection.MethodBase; using Regex = System.Text.RegularExpressions.Regex; using TextWriter = System.IO.TextWriter; #if !PORTABLE using StackFrame = System.Diagnostics.StackFrame; using StackTrace = System.Diagnostics.StackTrace; #else using NotSupportedException = System.NotSupportedException; #endif /** <summary> * A generic recognizer that can handle recognizers generated from * lexer, parser, and tree grammars. This is all the parsing * support code essentially; most of it is error recovery stuff and * backtracking. * </summary> */ public abstract class BaseRecognizer { public const int MemoRuleFailed = -2; public const int MemoRuleUnknown = -1; public const int InitialFollowStackSize = 100; // copies from Token object for convenience in actions public const int DefaultTokenChannel = TokenChannels.Default; public const int Hidden = TokenChannels.Hidden; public const string NextTokenRuleName = "nextToken"; /** <summary> * State of a lexer, parser, or tree parser are collected into a state * object so the state can be shared. This sharing is needed to * have one grammar import others and share same error variables * and other state variables. It's a kind of explicit multiple * inheritance via delegation of methods and shared state. * </summary> */ protected internal RecognizerSharedState state; public BaseRecognizer() : this(new RecognizerSharedState()) { } public BaseRecognizer( RecognizerSharedState state ) { if ( state == null ) { state = new RecognizerSharedState(); } this.state = state; InitDFAs(); } public TextWriter TraceDestination { get; set; } public virtual void SetState(RecognizerSharedState value) { this.state = value; } protected virtual void InitDFAs() { } /** <summary>reset the parser's state; subclasses must rewinds the input stream</summary> */ public virtual void Reset() { // wack everything related to error recovery if ( state == null ) { return; // no shared state work to do } state._fsp = -1; state.errorRecovery = false; state.lastErrorIndex = -1; state.failed = false; state.syntaxErrors = 0; // wack everything related to backtracking and memoization state.backtracking = 0; for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) { // wipe cache state.ruleMemo[i] = null; } } /** <summary> * Match current input symbol against ttype. Attempt * single token insertion or deletion error recovery. If * that fails, throw MismatchedTokenException. * </summary> * * <remarks> * To turn off single token insertion or deletion error * recovery, override recoverFromMismatchedToken() and have it * throw an exception. See TreeParser.recoverFromMismatchedToken(). * This way any error in a rule will cause an exception and * immediate exit from rule. Rule would recover by resynchronizing * to the set of symbols that can follow rule ref. * </remarks> */ public virtual object Match( IIntStream input, int ttype, BitSet follow ) { //System.out.println("match "+((TokenStream)input).LT(1)); object matchedSymbol = GetCurrentInputSymbol( input ); if ( input.LA( 1 ) == ttype ) { input.Consume(); state.errorRecovery = false; state.failed = false; return matchedSymbol; } if ( state.backtracking > 0 ) { state.failed = true; return matchedSymbol; } matchedSymbol = RecoverFromMismatchedToken( input, ttype, follow ); return matchedSymbol; } /** <summary>Match the wildcard: in a symbol</summary> */ public virtual void MatchAny( IIntStream input ) { state.errorRecovery = false; state.failed = false; input.Consume(); } public virtual bool MismatchIsUnwantedToken( IIntStream input, int ttype ) { return input.LA( 2 ) == ttype; } public virtual bool MismatchIsMissingToken( IIntStream input, BitSet follow ) { if ( follow == null ) { // we have no information about the follow; we can only consume // a single token and hope for the best return false; } // compute what can follow this grammar element reference if ( follow.Member( TokenTypes.EndOfRule ) ) { BitSet viableTokensFollowingThisRule = ComputeContextSensitiveRuleFOLLOW(); follow = follow.Or( viableTokensFollowingThisRule ); if ( state._fsp >= 0 ) { // remove EOR if we're not the start symbol follow.Remove( TokenTypes.EndOfRule ); } } // if current token is consistent with what could come after set // then we know we're missing a token; error recovery is free to // "insert" the missing token //System.out.println("viable tokens="+follow.toString(getTokenNames())); //System.out.println("LT(1)="+((TokenStream)input).LT(1)); // BitSet cannot handle negative numbers like -1 (EOF) so I leave EOR // in follow set to indicate that the fall of the start symbol is // in the set (EOF can follow). if ( follow.Member( input.LA( 1 ) ) || follow.Member( TokenTypes.EndOfRule ) ) { //System.out.println("LT(1)=="+((TokenStream)input).LT(1)+" is consistent with what follows; inserting..."); return true; } return false; } /** <summary>Report a recognition problem.</summary> * * <remarks> * This method sets errorRecovery to indicate the parser is recovering * not parsing. Once in recovery mode, no errors are generated. * To get out of recovery mode, the parser must successfully match * a token (after a resync). So it will go: * * 1. error occurs * 2. enter recovery mode, report error * 3. consume until token found in resynch set * 4. try to resume parsing * 5. next match() will reset errorRecovery mode * * If you override, make sure to update syntaxErrors if you care about that. * </remarks> */ public virtual void ReportError( RecognitionException e ) { // if we've already reported an error and have not matched a token // yet successfully, don't report any errors. if ( state.errorRecovery ) { //System.err.print("[SPURIOUS] "); return; } state.syntaxErrors++; // don't count spurious state.errorRecovery = true; DisplayRecognitionError( this.TokenNames, e ); } public virtual void DisplayRecognitionError( string[] tokenNames, RecognitionException e ) { string hdr = GetErrorHeader( e ); string msg = GetErrorMessage( e, tokenNames ); EmitErrorMessage( hdr + " " + msg ); } /** <summary>What error message should be generated for the various exception types?</summary> * * <remarks> * Not very object-oriented code, but I like having all error message * generation within one method rather than spread among all of the * exception classes. This also makes it much easier for the exception * handling because the exception classes do not have to have pointers back * to this object to access utility routines and so on. Also, changing * the message for an exception type would be difficult because you * would have to subclassing exception, but then somehow get ANTLR * to make those kinds of exception objects instead of the default. * This looks weird, but trust me--it makes the most sense in terms * of flexibility. * * For grammar debugging, you will want to override this to add * more information such as the stack frame with * getRuleInvocationStack(e, this.getClass().getName()) and, * for no viable alts, the decision description and state etc... * * Override this to change the message generated for one or more * exception types. * </remarks> */ public virtual string GetErrorMessage( RecognitionException e, string[] tokenNames ) { string msg = e.Message; if ( e is UnwantedTokenException ) { UnwantedTokenException ute = (UnwantedTokenException)e; string tokenName = "<unknown>"; if ( ute.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[ute.Expecting]; } msg = "extraneous input " + GetTokenErrorDisplay( ute.UnexpectedToken ) + " expecting " + tokenName; } else if ( e is MissingTokenException ) { MissingTokenException mte = (MissingTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "missing " + tokenName + " at " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedTokenException ) { MismatchedTokenException mte = (MismatchedTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting " + tokenName; } else if ( e is MismatchedTreeNodeException ) { MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e; string tokenName = "<unknown>"; if ( mtne.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mtne.Expecting]; } // workaround for a .NET framework bug (NullReferenceException) string nodeText = ( mtne.Node != null ) ? mtne.Node.ToString() ?? string.Empty : string.Empty; msg = "mismatched tree node: " + nodeText + " expecting " + tokenName; } else if ( e is NoViableAltException ) { //NoViableAltException nvae = (NoViableAltException)e; // for development, can add "decision=<<"+nvae.grammarDecisionDescription+">>" // and "(decision="+nvae.decisionNumber+") and // "state "+nvae.stateNumber msg = "no viable alternative at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is EarlyExitException ) { //EarlyExitException eee = (EarlyExitException)e; // for development, can add "(decision="+eee.decisionNumber+")" msg = "required (...)+ loop did not match anything at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedSetException ) { MismatchedSetException mse = (MismatchedSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedNotSetException ) { MismatchedNotSetException mse = (MismatchedNotSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is FailedPredicateException ) { FailedPredicateException fpe = (FailedPredicateException)e; msg = "rule " + fpe.RuleName + " failed predicate: {" + fpe.PredicateText + "}?"; } return msg; } /** <summary> * Get number of recognition errors (lexer, parser, tree parser). Each * recognizer tracks its own number. So parser and lexer each have * separate count. Does not count the spurious errors found between * an error and next valid token match * </summary> * - * <seealso cref="reportError()"/> + * <seealso cref="ReportError(RecognitionException)"/> */ public virtual int NumberOfSyntaxErrors { get { return state.syntaxErrors; } } /** <summary>What is the error header, normally line/character position information?</summary> */ public virtual string GetErrorHeader( RecognitionException e ) { string prefix = SourceName ?? string.Empty; if (prefix.Length > 0) prefix += ' '; return string.Format("{0}line {1}:{2}", prefix, e.Line, e.CharPositionInLine + 1); } /** <summary> * How should a token be displayed in an error message? The default * is to display just the text, but during development you might * want to have a lot of information spit out. Override in that case * to use t.ToString() (which, for CommonToken, dumps everything about * the token). This is better than forcing you to override a method in * your token objects because you don't have to go modify your lexer * so that it creates a new Java type. * </summary> */ public virtual string GetTokenErrorDisplay( IToken t ) { string s = t.Text; if ( s == null ) { if ( t.Type == TokenTypes.EndOfFile ) { s = "<EOF>"; } else { s = "<" + t.Type + ">"; } } s = Regex.Replace( s, "\n", "\\\\n" ); s = Regex.Replace( s, "\r", "\\\\r" ); s = Regex.Replace( s, "\t", "\\\\t" ); return "'" + s + "'"; } /** <summary>Override this method to change where error messages go</summary> */ public virtual void EmitErrorMessage( string msg ) { if (TraceDestination != null) TraceDestination.WriteLine( msg ); } /** <summary> * Recover from an error found on the input stream. This is * for NoViableAlt and mismatched symbol exceptions. If you enable * single token insertion and deletion, this will usually not * handle mismatched symbol exceptions but there could be a mismatched * token that the match() routine could not recover from. * </summary> */ public virtual void Recover( IIntStream input, RecognitionException re ) { if ( state.lastErrorIndex == input.Index ) { // uh oh, another error at same token index; must be a case // where LT(1) is in the recovery token set so nothing is // consumed; consume a single token so at least to prevent // an infinite loop; this is a failsafe. input.Consume(); } state.lastErrorIndex = input.Index; BitSet followSet = ComputeErrorRecoverySet(); BeginResync(); ConsumeUntil( input, followSet ); EndResync(); } /** <summary> * A hook to listen in on the token consumption during error recovery. * The DebugParser subclasses this to fire events to the listenter. * </summary> */ public virtual void BeginResync() { } public virtual void EndResync() { } /* Compute the error recovery set for the current rule. During * rule invocation, the parser pushes the set of tokens that can * follow that rule reference on the stack; this amounts to * computing FIRST of what follows the rule reference in the * enclosing rule. This local follow set only includes tokens * from within the rule; i.e., the FIRST computation done by * ANTLR stops at the end of a rule. * * EXAMPLE * * When you find a "no viable alt exception", the input is not * consistent with any of the alternatives for rule r. The best * thing to do is to consume tokens until you see something that * can legally follow a call to r *or* any rule that called r. * You don't want the exact set of viable next tokens because the * input might just be missing a token--you might consume the * rest of the input looking for one of the missing tokens. * * Consider grammar: * * a : '[' b ']' * | '(' b ')' * ; * b : c '^' INT ; * c : ID * | INT * ; * * At each rule invocation, the set of tokens that could follow * that rule is pushed on a stack. Here are the various "local" * follow sets: * * FOLLOW(b1_in_a) = FIRST(']') = ']' * FOLLOW(b2_in_a) = FIRST(')') = ')' * FOLLOW(c_in_b) = FIRST('^') = '^' * * Upon erroneous input "[]", the call chain is * * a -> b -> c * * and, hence, the follow context stack is: * * depth local follow set after call to rule * 0 <EOF> a (from main()) * 1 ']' b * 3 '^' c * * Notice that ')' is not included, because b would have to have * been called from a different context in rule a for ')' to be * included. * * For error recovery, we cannot consider FOLLOW(c) * (context-sensitive or otherwise). We need the combined set of * all context-sensitive FOLLOW sets--the set of all tokens that * could follow any reference in the call chain. We need to * resync to one of those tokens. Note that FOLLOW(c)='^' and if * we resync'd to that token, we'd consume until EOF. We need to * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. * In this case, for input "[]", LA(1) is in this set so we would * not consume anything and after printing an error rule c would * return normally. It would not find the required '^' though. * At this point, it gets a mismatched token error and throws an * exception (since LA(1) is not in the viable following token * set). The rule exception handler tries to recover, but finds * the same recovery set and doesn't consume anything. Rule b * exits normally returning to rule a. Now it finds the ']' (and * with the successful match exits errorRecovery mode). * * So, you cna see that the parser walks up call chain looking * for the token that was a member of the recovery set. * * Errors are not generated in errorRecovery mode. * * ANTLR's error recovery mechanism is based upon original ideas: * * "Algorithms + Data Structures = Programs" by Niklaus Wirth * * and * * "A note on error recovery in recursive descent parsers": * http://portal.acm.org/citation.cfm?id=947902.947905 * * Later, Josef Grosch had some good ideas: * * "Efficient and Comfortable Error Recovery in Recursive Descent * Parsers": * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip * * Like Grosch I implemented local FOLLOW sets that are combined * at run-time upon error to avoid overhead during parsing. */ protected virtual BitSet ComputeErrorRecoverySet() { return CombineFollows( false ); } /** <summary> * Compute the context-sensitive FOLLOW set for current rule. * This is set of token types that can follow a specific rule * reference given a specific call chain. You get the set of * viable tokens that can possibly come next (lookahead depth 1) * given the current call chain. Contrast this with the * definition of plain FOLLOW for rule r: * </summary> * * FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} * * where x in T* and alpha, beta in V*; T is set of terminals and * V is the set of terminals and nonterminals. In other words, * FOLLOW(r) is the set of all tokens that can possibly follow * references to r in *any* sentential form (context). At * runtime, however, we know precisely which context applies as * we have the call chain. We may compute the exact (rather * than covering superset) set of following tokens. * * For example, consider grammar: * * stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} * | "return" expr '.' * ; * expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} * atom : INT // FOLLOW(atom)=={'+',')',';','.'} * | '(' expr ')' * ; * * The FOLLOW sets are all inclusive whereas context-sensitive * FOLLOW sets are precisely what could follow a rule reference. * For input input "i=(3);", here is the derivation: * * stat => ID '=' expr ';' * => ID '=' atom ('+' atom)* ';' * => ID '=' '(' expr ')' ('+' atom)* ';' * => ID '=' '(' atom ')' ('+' atom)* ';' * => ID '=' '(' INT ')' ('+' atom)* ';' * => ID '=' '(' INT ')' ';' * * At the "3" token, you'd have a call chain of * * stat -> expr -> atom -> expr -> atom * * What can follow that specific nested ref to atom? Exactly ')' * as you can see by looking at the derivation of this specific * input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. * * You want the exact viable token set when recovering from a * token mismatch. Upon token mismatch, if LA(1) is member of * the viable next token set, then you know there is most likely * a missing token in the input stream. "Insert" one by just not * throwing an exception. */ protected virtual BitSet ComputeContextSensitiveRuleFOLLOW() { return CombineFollows( true ); } // what is exact? it seems to only add sets from above on stack // if EOR is in set i. When it sees a set w/o EOR, it stops adding. // Why would we ever want them all? Maybe no viable alt instead of // mismatched token? protected virtual BitSet CombineFollows(bool exact) { int top = state._fsp; BitSet followSet = new BitSet(); for ( int i = top; i >= 0; i-- ) { BitSet localFollowSet = (BitSet)state.following[i]; /* System.out.println("local follow depth "+i+"="+ localFollowSet.toString(getTokenNames())+")"); */ followSet.OrInPlace( localFollowSet ); if ( exact ) { // can we see end of rule? if ( localFollowSet.Member( TokenTypes.EndOfRule ) ) { // Only leave EOR in set if at top (start rule); this lets // us know if have to include follow(start rule); i.e., EOF if ( i > 0 ) { followSet.Remove( TokenTypes.EndOfRule ); } } else { // can't see end of rule, quit break; } } } return followSet; } /** <summary>Attempt to recover from a single missing or extra token.</summary> * * EXTRA TOKEN * * LA(1) is not what we are looking for. If LA(2) has the right token, * however, then assume LA(1) is some extra spurious token. Delete it * and LA(2) as if we were doing a normal match(), which advances the * input. * * MISSING TOKEN * * If current token is consistent with what could come after * ttype then it is ok to "insert" the missing token, else throw * exception For example, Input "i=(3;" is clearly missing the * ')'. When the parser returns from the nested call to expr, it * will have call chain: * * stat -> expr -> atom * * and it will be trying to match the ')' at this point in the * derivation: * * => ID '=' '(' INT ')' ('+' atom)* ';' * ^ * match() will see that ';' doesn't match ')' and report a * mismatched token error. To recover, it sees that LA(1)==';' * is in the set of tokens that can follow the ')' token * reference in rule atom. It can assume that you forgot the ')'. */ protected virtual object RecoverFromMismatchedToken( IIntStream input, int ttype, BitSet follow ) { RecognitionException e = null; // if next token is what we are looking for then "delete" this token if ( MismatchIsUnwantedToken( input, ttype ) ) { e = new UnwantedTokenException( ttype, input, TokenNames ); /* System.err.println("recoverFromMismatchedToken deleting "+ ((TokenStream)input).LT(1)+ " since "+((TokenStream)input).LT(2)+" is what we want"); */ BeginResync(); input.Consume(); // simply delete extra token EndResync(); ReportError( e ); // report after consuming so AW sees the token in the exception // we want to return the token we're actually matching object matchedSymbol = GetCurrentInputSymbol( input ); input.Consume(); // move past ttype token as if all were ok return matchedSymbol; } // can't recover with single token deletion, try insertion if ( MismatchIsMissingToken( input, follow ) ) { object inserted = GetMissingSymbol( input, e, ttype, follow ); e = new MissingTokenException( ttype, input, inserted ); ReportError( e ); // report after inserting so AW sees the token in the exception return inserted; } // even that didn't work; must throw the exception e = new MismatchedTokenException(ttype, input, TokenNames); throw e; } /** Not currently used */ public virtual object RecoverFromMismatchedSet( IIntStream input, RecognitionException e, BitSet follow ) { if ( MismatchIsMissingToken( input, follow ) ) { // System.out.println("missing token"); ReportError( e ); // we don't know how to conjure up a token for sets yet return GetMissingSymbol( input, e, TokenTypes.Invalid, follow ); } // TODO do single token deletion like above for Token mismatch throw e; } /** <summary> * Match needs to return the current input symbol, which gets put * into the label for the associated token ref; e.g., x=ID. Token * and tree parsers need to return different objects. Rather than test * for input stream type or change the IntStream interface, I use * a simple method to ask the recognizer to tell me what the current * input symbol is. * </summary> * * <remarks>This is ignored for lexers.</remarks> */ protected virtual object GetCurrentInputSymbol( IIntStream input ) { return null; } /** <summary>Conjure up a missing token during error recovery.</summary> * * <remarks> * The recognizer attempts to recover from single missing * symbols. But, actions might refer to that missing symbol. * For example, x=ID {f($x);}. The action clearly assumes * that there has been an identifier matched previously and that * $x points at that token. If that token is missing, but * the next token in the stream is what we want we assume that * this token is missing and we keep going. Because we * have to return some token to replace the missing token, * we have to conjure one up. This method gives the user control * over the tokens returned for missing tokens. Mostly, * you will want to create something special for identifier * tokens. For literals such as '{' and ',', the default * action in the parser or tree parser works. It simply creates * a CommonToken of the appropriate type. The text will be the token. * If you change what tokens must be created by the lexer, * override this method to create the appropriate tokens. * </remarks> */ protected virtual object GetMissingSymbol( IIntStream input, RecognitionException e, int expectedTokenType, BitSet follow ) { return null; } public virtual void ConsumeUntil( IIntStream input, int tokenType ) { //System.out.println("consumeUntil "+tokenType); int ttype = input.LA( 1 ); while ( ttype != TokenTypes.EndOfFile && ttype != tokenType ) { input.Consume(); ttype = input.LA( 1 ); } } /** <summary>Consume tokens until one matches the given token set</summary> */ public virtual void ConsumeUntil( IIntStream input, BitSet set ) { //System.out.println("consumeUntil("+set.toString(getTokenNames())+")"); int ttype = input.LA( 1 ); while ( ttype != TokenTypes.EndOfFile && !set.Member( ttype ) ) { //System.out.println("consume during recover LA(1)="+getTokenNames()[input.LA(1)]); input.Consume(); ttype = input.LA( 1 ); } } /** <summary>Push a rule's follow set using our own hardcoded stack</summary> */ protected void PushFollow( BitSet fset ) { if ( ( state._fsp + 1 ) >= state.following.Length ) { Array.Resize(ref state.following, state.following.Length * 2); } state.following[++state._fsp] = fset; } protected void PopFollow() { state._fsp--; } #if !PORTABLE /** <summary> * Return List<String> of the rules in your parser instance * leading up to a call to this method. You could override if * you want more details such as the file/line info of where * in the parser java code a rule is invoked. * </summary> * * <remarks> * This is very useful for error messages and for context-sensitive * error recovery. * </remarks> */ public virtual IList<string> GetRuleInvocationStack() { return GetRuleInvocationStack( new StackTrace(true) ); } /** <summary> * A more general version of GetRuleInvocationStack where you can * pass in the StackTrace of, for example, a RecognitionException * to get it's rule stack trace. * </summary> */ public static IList<string> GetRuleInvocationStack(StackTrace trace) { if (trace == null) throw new ArgumentNullException("trace"); List<string> rules = new List<string>(); StackFrame[] stack = trace.GetFrames() ?? new StackFrame[0]; for (int i = stack.Length - 1; i >= 0; i--) { StackFrame frame = stack[i]; MethodBase method = frame.GetMethod(); GrammarRuleAttribute[] attributes = (GrammarRuleAttribute[])method.GetCustomAttributes(typeof(GrammarRuleAttribute), true); if (attributes != null && attributes.Length > 0) rules.Add(attributes[0].Name); } return rules; } #endif public virtual int BacktrackingLevel { get { return state.backtracking; } set { state.backtracking = value; } } /** <summary>Return whether or not a backtracking attempt failed.</summary> */ public virtual bool Failed { get { return state.failed; diff --git a/Runtime/Antlr3.Runtime/Debug/IDebugEventListener.cs b/Runtime/Antlr3.Runtime/Debug/IDebugEventListener.cs index 0f5d2c5..bc77ead 100644 --- a/Runtime/Antlr3.Runtime/Debug/IDebugEventListener.cs +++ b/Runtime/Antlr3.Runtime/Debug/IDebugEventListener.cs @@ -1,387 +1,388 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Debug { + using ITreeAdaptor = Antlr.Runtime.Tree.ITreeAdaptor; /** <summary>All debugging events that a recognizer can trigger.</summary> * * <remarks> * I did not create a separate AST debugging interface as it would create * lots of extra classes and DebugParser has a dbg var defined, which makes * it hard to change to ASTDebugEventListener. I looked hard at this issue * and it is easier to understand as one monolithic event interface for all * possible events. Hopefully, adding ST debugging stuff won't be bad. Leave * for future. 4/26/2006. * </remarks> */ public interface IDebugEventListener { void Initialize(); /** <summary> * The parser has just entered a rule. No decision has been made about * which alt is predicted. This is fired AFTER init actions have been * executed. Attributes are defined and available etc... * The grammarFileName allows composite grammars to jump around among * multiple grammar files. * </summary> */ void EnterRule( string grammarFileName, string ruleName ); /** <summary> * Because rules can have lots of alternatives, it is very useful to * know which alt you are entering. This is 1..n for n alts. * </summary> */ void EnterAlt( int alt ); /** <summary> * This is the last thing executed before leaving a rule. It is * executed even if an exception is thrown. This is triggered after * error reporting and recovery have occurred (unless the exception is * not caught in this rule). This implies an "exitAlt" event. * The grammarFileName allows composite grammars to jump around among * multiple grammar files. * </summary> */ void ExitRule( string grammarFileName, string ruleName ); /** <summary>Track entry into any (...) subrule other EBNF construct</summary> */ void EnterSubRule( int decisionNumber ); void ExitSubRule( int decisionNumber ); /** <summary> * Every decision, fixed k or arbitrary, has an enter/exit event * so that a GUI can easily track what LT/consume events are * associated with prediction. You will see a single enter/exit * subrule but multiple enter/exit decision events, one for each * loop iteration. * </summary> */ void EnterDecision(int decisionNumber, bool couldBacktrack); void ExitDecision( int decisionNumber ); /** <summary> * An input token was consumed; matched by any kind of element. * Trigger after the token was matched by things like match(), matchAny(). * </summary> */ void ConsumeToken( IToken t ); /** <summary> * An off-channel input token was consumed. * Trigger after the token was matched by things like match(), matchAny(). * (unless of course the hidden token is first stuff in the input stream). * </summary> */ void ConsumeHiddenToken( IToken t ); /** <summary> * Somebody (anybody) looked ahead. Note that this actually gets * triggered by both LA and LT calls. The debugger will want to know * which Token object was examined. Like consumeToken, this indicates * what token was seen at that depth. A remote debugger cannot look * ahead into a file it doesn't have so LT events must pass the token * even if the info is redundant. * </summary> */ void LT( int i, IToken t ); /** <summary> * The parser is going to look arbitrarily ahead; mark this location, * the token stream's marker is sent in case you need it. * </summary> */ void Mark( int marker ); /** <summary> * After an arbitrairly long lookahead as with a cyclic DFA (or with * any backtrack), this informs the debugger that stream should be * rewound to the position associated with marker. * </summary> */ void Rewind( int marker ); /** <summary> * Rewind to the input position of the last marker. * Used currently only after a cyclic DFA and just * before starting a sem/syn predicate to get the * input position back to the start of the decision. * Do not "pop" the marker off the state. mark(i) * and rewind(i) should balance still. * </summary> */ void Rewind(); void BeginBacktrack( int level ); void EndBacktrack( int level, bool successful ); /** <summary> * To watch a parser move through the grammar, the parser needs to * inform the debugger what line/charPos it is passing in the grammar. * For now, this does not know how to switch from one grammar to the * other and back for island grammars etc... * </summary> * * <remarks> * This should also allow breakpoints because the debugger can stop * the parser whenever it hits this line/pos. * </remarks> */ void Location( int line, int pos ); /** <summary> * A recognition exception occurred such as NoViableAltException. I made * this a generic event so that I can alter the exception hierachy later * without having to alter all the debug objects. * </summary> * * <remarks> * Upon error, the stack of enter rule/subrule must be properly unwound. * If no viable alt occurs it is within an enter/exit decision, which * also must be rewound. Even the rewind for each mark must be unwount. * In the Java target this is pretty easy using try/finally, if a bit * ugly in the generated code. The rewind is generated in DFA.predict() * actually so no code needs to be generated for that. For languages * w/o this "finally" feature (C++?), the target implementor will have * to build an event stack or something. * * Across a socket for remote debugging, only the RecognitionException * data fields are transmitted. The token object or whatever that * caused the problem was the last object referenced by LT. The * immediately preceding LT event should hold the unexpected Token or * char. * * Here is a sample event trace for grammar: * * b : C ({;}A|B) // {;} is there to prevent A|B becoming a set * | D * ; * * The sequence for this rule (with no viable alt in the subrule) for * input 'c c' (there are 3 tokens) is: * * commence * LT(1) * enterRule b * location 7 1 * enter decision 3 * LT(1) * exit decision 3 * enterAlt1 * location 7 5 * LT(1) * consumeToken [c/<4>,1:0] * location 7 7 * enterSubRule 2 * enter decision 2 * LT(1) * LT(1) * recognitionException NoViableAltException 2 1 2 * exit decision 2 * exitSubRule 2 * beginResync * LT(1) * consumeToken [c/<4>,1:1] * LT(1) * endResync * LT(-1) * exitRule b * terminate * </remarks> */ void RecognitionException( RecognitionException e ); /** <summary> * Indicates the recognizer is about to consume tokens to resynchronize * the parser. Any consume events from here until the recovered event * are not part of the parse--they are dead tokens. * </summary> */ void BeginResync(); /** <summary> * Indicates that the recognizer has finished consuming tokens in order * to resychronize. There may be multiple beginResync/endResync pairs * before the recognizer comes out of errorRecovery mode (in which * multiple errors are suppressed). This will be useful * in a gui where you want to probably grey out tokens that are consumed * but not matched to anything in grammar. Anything between * a beginResync/endResync pair was tossed out by the parser. * </summary> */ void EndResync(); /** <summary>A semantic predicate was evaluate with this result and action text</summary> */ void SemanticPredicate( bool result, string predicate ); /** <summary> * Announce that parsing has begun. Not technically useful except for * sending events over a socket. A GUI for example will launch a thread * to connect and communicate with a remote parser. The thread will want * to notify the GUI when a connection is made. ANTLR parsers * trigger this upon entry to the first rule (the ruleLevel is used to * figure this out). * </summary> */ void Commence(); /** <summary> * Parsing is over; successfully or not. Mostly useful for telling * remote debugging listeners that it's time to quit. When the rule * invocation level goes to zero at the end of a rule, we are done * parsing. * </summary> */ void Terminate(); #region Tree Parsing /** <summary> * Input for a tree parser is an AST, but we know nothing for sure * about a node except its type and text (obtained from the adaptor). * This is the analog of the consumeToken method. Again, the ID is * the hashCode usually of the node so it only works if hashCode is * not implemented. If the type is UP or DOWN, then * the ID is not really meaningful as it's fixed--there is * just one UP node and one DOWN navigation node. * </summary> * * <param name="t" /> */ void ConsumeNode( object t ); /** <summary> * The tree parser lookedahead. If the type is UP or DOWN, * then the ID is not really meaningful as it's fixed--there is * just one UP node and one DOWN navigation node. * </summary> */ void LT( int i, object t ); #endregion #region AST Events /** <summary> * A nil was created (even nil nodes have a unique ID... * they are not "null" per se). As of 4/28/2006, this * seems to be uniquely triggered when starting a new subtree * such as when entering a subrule in automatic mode and when * building a tree in rewrite mode. * </summary> * * <remarks> * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only t.ID is set. * </remarks> */ void NilNode( object t ); /** <summary> * Upon syntax error, recognizers bracket the error with an error node * if they are building ASTs. * </summary> * * <param name="t"/> */ void ErrorNode( object t ); /** <summary>Announce a new node built from token elements such as type etc...</summary> * * <remarks> * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only t.ID, type, text are * set. * </remarks> */ void CreateNode( object t ); /** <summary>Announce a new node built from an existing token.</summary> * * <remarks> * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only node.ID and token.tokenIndex * are set. * </remarks> */ void CreateNode( object node, IToken token ); /** <summary>Make a node the new root of an existing root. See</summary> * * <remarks> * Note: the newRootID parameter is possibly different * than the TreeAdaptor.becomeRoot() newRoot parameter. * In our case, it will always be the result of calling * TreeAdaptor.becomeRoot() and not root_n or whatever. * * The listener should assume that this event occurs * only when the current subrule (or rule) subtree is * being reset to newRootID. * * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only IDs are set. * </remarks> * - * <seealso cref="Antlr.Runtime.Tree.TreeAdaptor.becomeRoot()"/> + * <seealso cref="ITreeAdaptor.BecomeRoot(object, object)"/> */ void BecomeRoot( object newRoot, object oldRoot ); /** <summary>Make childID a child of rootID.</summary> * * <remarks> * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only IDs are set. * </remarks> * - * <seealso cref="Antlr.Runtime.Tree.TreeAdaptor.addChild()"/> + * <seealso cref="ITreeAdaptor.AddChild(object, object)"/> */ void AddChild( object root, object child ); /** <summary>Set the token start/stop token index for a subtree root or node.</summary> * * <remarks> * If you are receiving this event over a socket via * RemoteDebugEventSocketListener then only t.ID is set. * </remarks> */ void SetTokenBoundaries( object t, int tokenStartIndex, int tokenStopIndex ); #endregion } }
antlr/antlrcs
0e0fb75e02c29ee4a2623a31040601e615b5d09f
Fix all violations of CS1587
diff --git a/Antlr3/Analysis/Label.cs b/Antlr3/Analysis/Label.cs index 1d6d3dc..a98c13f 100644 --- a/Antlr3/Analysis/Label.cs +++ b/Antlr3/Analysis/Label.cs @@ -1,503 +1,505 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Analysis { using CLSCompliant = System.CLSCompliantAttribute; using Grammar = Antlr3.Tool.Grammar; using ICloneable = System.ICloneable; using IComparable = System.IComparable; using IIntSet = Antlr3.Misc.IIntSet; using InvalidOperationException = System.InvalidOperationException; using IntervalSet = Antlr3.Misc.IntervalSet; using TokenTypes = Antlr.Runtime.TokenTypes; /** A state machine transition label. A label can be either a simple * label such as a token or character. A label can be a set of char or * tokens. It can be an epsilon transition. It can be a semantic predicate * (which assumes an epsilon transition) or a tree of predicates (in a DFA). * Special label types have to be &lt; 0 to avoid conflict with char. */ public class Label : System.IComparable<Label>, ICloneable { public const int INVALID = -7; public const int ACTION = -6; public const int EPSILON = -5; public const string EPSILON_STR = "<EPSILON>"; /** label is a semantic predicate; implies label is epsilon also */ public const int SEMPRED = -4; /** label is a set of tokens or char */ public const int SET = -3; /** End of Token is like EOF for lexer rules. It implies that no more * characters are available and that NFA conversion should terminate * for this path. For example * * A : 'a' 'b' | 'a' ; * * yields a DFA predictor: * * o-a->o-b->1 predict alt 1 * | * |-EOT->o predict alt 2 * * To generate code for EOT, treat it as the "default" path, which * implies there is no way to mismatch a char for the state from * which the EOT emanates. */ public const int EOT = -2; public const int EOF = -1; /** We have labels like EPSILON that are below 0; it's hard to * store them in an array with negative index so use this * constant as an index shift when accessing arrays based upon * token type. If real token type is i, then array index would be * NUM_FAUX_LABELS + i. */ public const int NUM_FAUX_LABELS = -INVALID; /** Anything at this value or larger can be considered a simple atom int * for easy comparison during analysis only; faux labels are not used * during parse time for real token types or char values. */ public const int MIN_ATOM_VALUE = EOT; // TODO: is 0 a valid unicode char? max is FFFF -1, right? public const int MIN_CHAR_VALUE = '\u0000'; public const int MAX_CHAR_VALUE = '\uFFFF'; /** End of rule token type; imaginary token type used only for * local, partial FOLLOW sets to indicate that the local FOLLOW * hit the end of rule. During error recovery, the local FOLLOW * of a token reference may go beyond the end of the rule and have * to use FOLLOW(rule). I have to just shift the token types to 2..n * rather than 1..n to accommodate this imaginary token in my bitsets. * If I didn't use a bitset implementation for runtime sets, I wouldn't * need this. EOF is another candidate for a run time token type for * parsers. Follow sets are not computed for lexers so we do not have * this issue. */ public const int EOR_TOKEN_TYPE = TokenTypes.EndOfRule; public const int DOWN = TokenTypes.Down; public const int UP = TokenTypes.Up; /** tokens and char range overlap; tokens are MIN_TOKEN_TYPE..n */ public const int MIN_TOKEN_TYPE = TokenTypes.Min; - /** The wildcard '.' char atom implies all valid characters==UNICODE */ + ///// <summary> + ///// The wildcard '.' char atom implies all valid characters==UNICODE + ///// </summary> //public static readonly IIntSet ALLCHAR = IntervalSet.of( MIN_CHAR_VALUE, MAX_CHAR_VALUE ); /** The token type or character value; or, signifies special label. */ internal int label; /** A set of token types or character codes if label==SET */ // TODO: try IntervalSet for everything private IIntSet _labelSet; public Label( int label ) { this.label = label; } /** Make a set label */ public Label( IIntSet labelSet ) { if ( labelSet == null ) { this.label = SET; this._labelSet = IntervalSet.Of( INVALID ); return; } int singleAtom = labelSet.GetSingleElement(); if ( singleAtom != INVALID ) { // convert back to a single atomic element if |labelSet|==1 label = singleAtom; return; } this.label = SET; this._labelSet = labelSet; } /** return the single atom label or INVALID if not a single atom */ public virtual int Atom { get { if ( IsAtom ) { return label; } return INVALID; } } /// <summary> /// Gets whether or not the label is an action /// </summary> public virtual bool IsAction { get { return false; } } /// <summary> /// Gets whether or not the label is an atom /// </summary> public virtual bool IsAtom { get { return label >= MIN_ATOM_VALUE; } } /// <summary> /// Gets whether or not the label is an epsilon label /// </summary> public virtual bool IsEpsilon { get { return label == EPSILON; } } /// <summary> /// Gets whether or not the label is a semantic predicate /// </summary> public virtual bool IsSemanticPredicate { get { return false; } } /// <summary> /// Gets whether or not the label matches a set /// </summary> public virtual bool IsSet { get { return label == SET; } } /// <summary> /// Gets the semantic context for the label /// </summary> public virtual SemanticContext SemanticContext { get { return null; } } [CLSCompliant(false)] public virtual IIntSet Set { get { if ( label != SET ) { // convert single element to a set if they ask for it. return IntervalSet.Of( label ); } return _labelSet; } set { label = SET; _labelSet = value; } } public virtual Label Clone() { Label l = new Label(label); l._labelSet = new IntervalSet(); l._labelSet.AddAll(this._labelSet); return l; } object ICloneable.Clone() { return Clone(); } public virtual void Add( Label a ) { if ( IsAtom ) { _labelSet = IntervalSet.Of( label ); label = SET; if ( a.IsAtom ) { _labelSet.Add( a.Atom ); } else if ( a.IsSet ) { _labelSet.AddAll( a.Set ); } else { throw new InvalidOperationException( "can't add element to Label of type " + label ); } return; } if ( IsSet ) { if ( a.IsAtom ) { _labelSet.Add( a.Atom ); } else if ( a.IsSet ) { _labelSet.AddAll( a.Set ); } else { throw new InvalidOperationException( "can't add element to Label of type " + label ); } return; } throw new InvalidOperationException( "can't add element to Label of type " + label ); } public virtual bool Matches( int atom ) { if ( label == atom ) { // handle the single atom case efficiently return true; } if ( IsSet ) { return _labelSet.Contains( atom ); } return false; } public virtual bool Matches( IIntSet set ) { if ( IsAtom ) { return set.Contains( Atom ); } if ( IsSet ) { // matches if intersection non-nil return !Set.And( set ).IsNil; } return false; } public virtual bool Matches( Label other ) { if ( other.IsSet ) { return Matches( other.Set ); } if ( other.IsAtom ) { return Matches( other.Atom ); } return false; } public override int GetHashCode() { if ( label == SET ) { return _labelSet.GetHashCode(); } else { return label; } } // TODO: do we care about comparing set {A} with atom A? Doesn't now. public override bool Equals( object o ) { Label other = o as Label; if (other == null) return false; if (object.ReferenceEquals(this, o)) { // equals if same object return true; } // labels must be the same even if epsilon or set or sempred etc... if ( label != other.label ) { return false; } if ( label == SET ) { return this._labelSet.Equals( other._labelSet ); } // label values are same, so true return true; } public virtual int CompareTo( Label other ) { return this.label - other.label; } #if false /** Predicates are lists of AST nodes from the NFA created from the * grammar, but the same predicate could be cut/paste into multiple * places in the grammar. I must compare the text of all the * predicates to truly answer whether {p1,p2} .equals {p1,p2}. * Unfortunately, I cannot rely on the AST.equals() to work properly * so I must do a brute force O(n^2) nested traversal of the Set * doing a String compare. * * At this point, Labels are not compared for equals when they are * predicates, but here's the code for future use. */ protected boolean PredicatesEquals(Set others) { Iterator iter = semanticContext.iterator(); while (iter.hasNext()) { AST predAST = (AST) iter.next(); Iterator inner = semanticContext.iterator(); while (inner.hasNext()) { AST otherPredAST = (AST) inner.next(); if ( !predAST.getText().equals(otherPredAST.getText()) ) { return false; } } } return true; } #endif public override string ToString() { switch ( label ) { case SET: return _labelSet.ToString(); default: return label.ToString(); //String.valueOf( label ); } } public virtual string ToString( Grammar g ) { switch ( label ) { case SET: return _labelSet.ToString( g ); default: return g.GetTokenDisplayName( label ); } } #if false public String PredicatesToString() { if ( semanticContext==NFAConfiguration.DEFAULT_CLAUSE_SEMANTIC_CONTEXT ) { return "!other preds"; } StringBuffer buf = new StringBuffer(); Iterator iter = semanticContext.iterator(); while (iter.hasNext()) { AST predAST = (AST) iter.next(); buf.append(predAST.getText()); if ( iter.hasNext() ) { buf.append("&"); } } return buf.toString(); } #endif public static bool Intersect( Label label, Label edgeLabel ) { bool hasIntersection = false; bool labelIsSet = label.IsSet; bool edgeIsSet = edgeLabel.IsSet; if ( !labelIsSet && !edgeIsSet && edgeLabel.label == label.label ) { hasIntersection = true; } else if ( labelIsSet && edgeIsSet && !edgeLabel.Set.And( label.Set ).IsNil ) { hasIntersection = true; } else if ( labelIsSet && !edgeIsSet && label.Set.Contains( edgeLabel.label ) ) { hasIntersection = true; } else if ( !labelIsSet && edgeIsSet && edgeLabel.Set.Contains( label.label ) ) { hasIntersection = true; } return hasIntersection; } } } diff --git a/Antlr3/Analysis/NFAConfiguration.cs b/Antlr3/Analysis/NFAConfiguration.cs index 9e6aab5..fd5e4e6 100644 --- a/Antlr3/Analysis/NFAConfiguration.cs +++ b/Antlr3/Analysis/NFAConfiguration.cs @@ -1,264 +1,265 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Analysis { using ArgumentNullException = System.ArgumentNullException; using StringBuilder = System.Text.StringBuilder; /** An NFA state, predicted alt, and syntactic/semantic context. * The syntactic context is a pointer into the rule invocation * chain used to arrive at the state. The semantic context is * the unordered set semantic predicates encountered before reaching * an NFA state. */ public class NFAConfiguration : System.IEquatable<NFAConfiguration> { /** The NFA state associated with this configuration */ private readonly int _state; /** What alt is predicted by this configuration */ private readonly int _alt; /** What is the stack of rule invocations that got us to state? */ private readonly NFAContext _context; /** The set of semantic predicates associated with this NFA * configuration. The predicates were found on the way to * the associated NFA state in this syntactic context. * Set<AST>: track nodes in grammar containing the predicate * for error messages and such (nice to know where the predicate * came from in case of duplicates etc...). By using a set, * the equals() method will correctly show {pred1,pred2} as equals() * to {pred2,pred1}. */ private SemanticContext _semanticContext = SemanticContext.EmptySemanticContext; /** Indicate that this configuration has been resolved and no further * DFA processing should occur with it. Essentially, this is used * as an "ignore" bit so that upon a set of nondeterministic configurations * such as (s|2) and (s|3), I can set (s|3) to resolved=true (and any * other configuration associated with alt 3). */ private bool _resolved; /** This bit is used to indicate a semantic predicate will be * used to resolve the conflict. Method * DFA.findNewDFAStatesAndAddDFATransitions will add edges for * the predicates after it performs the reach operation. The * nondeterminism resolver sets this when it finds a set of * nondeterministic configurations (as it does for "resolved" field) * that have enough predicates to resolve the conflit. */ private bool _resolveWithPredicate; - /** Lots of NFA states have only epsilon edges (1 or 2). We can - * safely consider only n>0 during closure. - */ + ///// <summary> + ///// Lots of NFA states have only epsilon edges (1 or 2). We can + ///// safely consider only n>0 during closure. + ///// </summary> //int _numberEpsilonTransitionsEmanatingFromState; /** Indicates that the NFA state associated with this configuration * has exactly one transition and it's an atom (not epsilon etc...). */ private bool _singleAtomTransitionEmanating; //protected boolean addedDuringClosure = true; public NFAConfiguration( int state, int alt, NFAContext context, SemanticContext semanticContext ) { this._state = state; this._alt = alt; this._context = context; this._semanticContext = semanticContext; } public int State { get { return _state; } } public int Alt { get { return _alt; } } public NFAContext Context { get { return _context; } } public SemanticContext SemanticContext { get { return _semanticContext; } set { if (value == null) throw new ArgumentNullException("value"); _semanticContext = value; } } protected internal bool Resolved { get { return _resolved; } set { _resolved = value; } } protected internal bool ResolveWithPredicate { get { return _resolveWithPredicate; } set { _resolveWithPredicate = value; } } protected internal bool SingleAtomTransitionEmanating { get { return _singleAtomTransitionEmanating; } set { _singleAtomTransitionEmanating = value; } } /** An NFA configuration is equal to another if both have * the same state, the predict the same alternative, and * syntactic/semantic contexts are the same. I don't think * the state|alt|ctx could be the same and have two different * semantic contexts, but might as well define equals to be * everything. */ public override bool Equals(object obj) { NFAConfiguration other = obj as NFAConfiguration; if (other == null) return false; return this.Equals(other); } public bool Equals(NFAConfiguration other) { if (object.ReferenceEquals(this, other)) return true; if (other == null) return false; return this._state == other._state && this._alt == other._alt && this._context.Equals(other._context) && this._semanticContext.Equals(other._semanticContext); } public override int GetHashCode() { int h = _state ^ _alt ^ _context.GetHashCode(); return h; } public override string ToString() { return ToString( true ); } public string ToString( bool showAlt ) { StringBuilder buf = new StringBuilder(); buf.Append( _state ); if ( showAlt ) { buf.Append( "|" ); buf.Append( _alt ); } if ( _context.Parent != null ) { buf.Append( "|" ); buf.Append( _context ); } if ( _semanticContext != null && _semanticContext != SemanticContext.EmptySemanticContext ) { buf.Append( "|" ); string escQuote = _semanticContext.ToString().Replace( "\"", "\\\"" ); buf.Append( escQuote ); } if ( _resolved ) { buf.Append( "|resolved" ); } if ( _resolveWithPredicate ) { buf.Append( "|resolveWithPredicate" ); } return buf.ToString(); } } } diff --git a/Antlr3/Misc/OrderedHashSet.cs b/Antlr3/Misc/OrderedHashSet.cs index 17a11e0..df40545 100644 --- a/Antlr3/Misc/OrderedHashSet.cs +++ b/Antlr3/Misc/OrderedHashSet.cs @@ -1,175 +1,175 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Misc { using System.Collections.Generic; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; /** A HashMap that remembers the order that the elements were added. * You can alter the ith element with this[i]=value too :) Unique list. * I need the replace/set-element-i functionality so I'm subclassing * OrderedHashSet. */ public class OrderedHashSet<T> : ICollection<T> { /** Track the elements as they are added to the set */ private readonly List<T> _elements = new List<T>(); private readonly HashSet<T> _elementSet = new HashSet<T>(); public T this[int i] { get { return _elements[i]; } - /** Replace an existing value with a new value; updates the element + /* Replace an existing value with a new value; updates the element * list and the hash table, but not the key as that has not changed. */ set { if (value == null) throw new ArgumentNullException("value"); T oldElement = _elements[i]; if (_elementSet.Contains(value) && !_elementSet.Comparer.Equals(oldElement, value)) throw new ArgumentException("The value already exists in this set.", "value"); _elements[i] = value; // update list _elementSet.Remove( oldElement ); _elementSet.Add( value ); } } /** Add a value to list; keep in hashtable for consistency also; * Key is object itself. Good for say asking if a certain string is in * a list of strings. */ public bool Add( T value ) { if ( _elementSet.Add( value ) ) { _elements.Add( value ); return true; } return false; } public bool Remove( T o ) { if (_elementSet.Remove(o)) { _elements.Remove(o); return true; } return false; } public void Clear() { _elements.Clear(); _elementSet.Clear(); } /** Return the List holding list of table elements. Note that you are * NOT getting a copy so don't write to the list. */ public IList<T> GetElements() { return _elements; } public override string ToString() { return _elements.ToString(); } #region ICollection<T> Members void ICollection<T>.Add( T item ) { this.Add( item ); } public bool Contains( T item ) { return _elementSet.Contains( item ); } public void CopyTo( T[] array, int arrayIndex ) { _elements.CopyTo(array, arrayIndex); } public int Count { get { return _elements.Count; } } public bool IsReadOnly { get { return false; } } #endregion #region IEnumerable<T> Members public IEnumerator<T> GetEnumerator() { return _elements.GetEnumerator(); } #endregion #region IEnumerable Members System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return GetEnumerator(); } #endregion } } diff --git a/Antlr4.StringTemplate/Compiler/CodeGenerator.g3 b/Antlr4.StringTemplate/Compiler/CodeGenerator.g3 index e8f56e3..b2c0471 100644 --- a/Antlr4.StringTemplate/Compiler/CodeGenerator.g3 +++ b/Antlr4.StringTemplate/Compiler/CodeGenerator.g3 @@ -1,321 +1,321 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ tree grammar CodeGenerator; options { language=CSharp3; tokenVocab=TemplateParser; ASTLabelType=CommonTree; } @header{ using Antlr4.StringTemplate.Misc; } @namespace{Antlr4.StringTemplate.Compiler} @ctorModifier{private} templateAndEOF : template[null,null] EOF; // hush warning; ignore public template[string name, List<FormalArgument> args] returns [CompiledTemplate impl] scope { CompilationState state; // automatically get a new state pointer per invocation } @init { $template::state = new CompilationState(errMgr, name, input.TokenStream); $impl = $template::state.impl; if ($template.Count == 1) outermostImpl = $impl; $impl.DefineFormalArguments($args); // make sure args are defined prior to compilation if ( name!=null && name.StartsWith(TemplateCompiler.SubtemplatePrefix) ) { $impl.AddArgument(new FormalArgument("i")); $impl.AddArgument(new FormalArgument("i0")); } $impl.Template = _template; // always forget the entire template; char indexes are relative to it } : chunk { // finish off the CompiledTemplate result if ( $template::state.stringtable!=null ) $impl.strings = $template::state.stringtable.ToArray(); $impl.codeSize = $template::state.ip; } ; chunk : element* ; element : ^(INDENT compoundElement[$INDENT]) | compoundElement[null] | ^(INDENT {Indent($INDENT);} singleElement {Dedent();}) | INDENT {Indent($INDENT); Dedent();} | singleElement ; singleElement : exprElement | TEXT { if ($TEXT.text.Length > 0) emit1($TEXT,Bytecode.INSTR_WRITE_STR, $TEXT.text); } | NEWLINE {emit($NEWLINE, Bytecode.INSTR_NEWLINE);} ; compoundElement[CommonTree indent] : ifstat[$indent] | region[$indent] ; exprElement @init { Bytecode op = Bytecode.INSTR_WRITE; } : ^( EXPR expr (exprOptions {op=Bytecode.INSTR_WRITE_OPT;})? ) {emit($EXPR, op);} ; region[CommonTree indent] returns [string name] @init {if ($indent != null) Indent($indent);} @after {if ($indent != null) Dedent();} : ^( REGION ID {$name = TemplateGroup.GetMangledRegionName(outermostTemplateName, $ID.text);} template[$name,null] { CompiledTemplate sub = $template.impl; sub.IsRegion = true; sub.RegionDefType = Template.RegionType.Embedded; sub.TemplateDefStartToken = $ID.Token; outermostImpl.AddImplicitlyDefinedTemplate(sub); emit2($start, Bytecode.INSTR_NEW, $region.name, 0); emit($start, Bytecode.INSTR_WRITE); } ) ; subtemplate returns [string name, int nargs] @init { $name = TemplateCompiler.GetNewSubtemplateName(); List<FormalArgument> args = new List<FormalArgument>(); } : ^( SUBTEMPLATE (^(ARGS (ID {args.Add(new FormalArgument($ID.text));})+))* {$nargs = args.Count;} template[$name,args] { CompiledTemplate sub = $template.impl; sub.IsAnonSubtemplate = true; sub.TemplateDefStartToken = $SUBTEMPLATE.Token; sub.Ast = $SUBTEMPLATE; sub.Ast.SetUnknownTokenBoundaries(); sub.Tokens = input.TokenStream; outermostImpl.AddImplicitlyDefinedTemplate(sub); } ) ; ifstat[CommonTree indent] @init { - ///** Tracks address of branch operand (in code block). It's how - // * we backpatch forward references when generating code for IFs. - // */ + /* Tracks address of branch operand (in code block). It's how + * we backpatch forward references when generating code for IFs. + */ int prevBranchOperand = -1; - ///** Branch instruction operands that are forward refs to end of IF. - // * We need to update them once we see the endif. - // */ + /* Branch instruction operands that are forward refs to end of IF. + * We need to update them once we see the endif. + */ List<int> endRefs = new List<int>(); if ($indent != null) Indent($indent); } @after { if ($indent != null) Dedent(); } : ^( i='if' conditional { prevBranchOperand = address()+1; emit1($i,Bytecode.INSTR_BRF, -1); // write placeholder as branch target } chunk ( ^(eif='elseif' { endRefs.Add(address()+1); emit1($eif,Bytecode.INSTR_BR, -1); // br end // update previous branch instruction write(prevBranchOperand, (short)address()); prevBranchOperand = -1; } ec=conditional { prevBranchOperand = address()+1; // write placeholder as branch target emit1($ec.start, Bytecode.INSTR_BRF, -1); } chunk ) )* ( ^( el='else' { endRefs.Add(address()+1); emit1($el, Bytecode.INSTR_BR, -1); // br end // update previous branch instruction write(prevBranchOperand, (short)address()); prevBranchOperand = -1; } chunk ) )? ) { if ( prevBranchOperand>=0 ) { write(prevBranchOperand, (short)address()); } foreach (int opnd in endRefs) write(opnd, (short)address()); } ; conditional : ^(OR conditional conditional) {emit($OR, Bytecode.INSTR_OR);} | ^(AND conditional conditional) {emit($AND, Bytecode.INSTR_AND);} | ^(BANG conditional) {emit($BANG, Bytecode.INSTR_NOT);} | expr // not all expr are valid, but reuse code gen (parser restricts syntax) ; exprOptions : {emit($start, Bytecode.INSTR_OPTIONS);} ^(OPTIONS option*) ; option : ^('=' ID expr) {setOption($ID);} ; expr @init {int nt = 0, ne = 0;} : ^(ZIP ^(ELEMENTS (expr {ne++;})+) mapTemplateRef[ne]) {emit1($ZIP, Bytecode.INSTR_ZIP_MAP, ne);} | ^(MAP expr (mapTemplateRef[1] {nt++;})+) { if ( nt>1 ) emit1($MAP, nt>1?Bytecode.INSTR_ROT_MAP:Bytecode.INSTR_MAP, nt); else emit($MAP, Bytecode.INSTR_MAP); } | prop | includeExpr ; prop: ^(PROP expr ID) {emit1($PROP, Bytecode.INSTR_LOAD_PROP, $ID.text);} | ^(PROP_IND expr expr) {emit($PROP_IND, Bytecode.INSTR_LOAD_PROP_IND);} ; mapTemplateRef[int num_exprs] : ^( INCLUDE ID {for (int i=1; i<=$num_exprs; i++) emit($INCLUDE,Bytecode.INSTR_NULL);} args ) { if ( $args.passThru ) emit1($start, Bytecode.INSTR_PASSTHRU, $ID.text); if ( $args.namedArgs ) emit1($INCLUDE, Bytecode.INSTR_NEW_BOX_ARGS, $ID.text); else emit2($INCLUDE, Bytecode.INSTR_NEW, $ID.text, $args.n+$num_exprs); } | subtemplate { if ($subtemplate.nargs != $num_exprs) { errMgr.CompiletimeError(ErrorType.ANON_ARGUMENT_MISMATCH, templateToken, $subtemplate.start.Token, $subtemplate.nargs, $num_exprs); } for (int i=1; i<=$num_exprs; i++) emit($subtemplate.start,Bytecode.INSTR_NULL); emit2($subtemplate.start, Bytecode.INSTR_NEW, $subtemplate.name, $num_exprs); } | ^( INCLUDE_IND expr { emit($INCLUDE_IND,Bytecode.INSTR_TOSTR); for (int i=1; i<=$num_exprs; i++) emit($INCLUDE_IND,Bytecode.INSTR_NULL); } args {emit1($INCLUDE_IND, Bytecode.INSTR_NEW_IND, $args.n+$num_exprs);} ) ; includeExpr : ^(EXEC_FUNC ID expr?) {func($ID);} | ^(INCLUDE ID args) { if ( $args.passThru ) emit1($start, Bytecode.INSTR_PASSTHRU, $ID.text); if ( $args.namedArgs ) emit1($INCLUDE, Bytecode.INSTR_NEW_BOX_ARGS, $ID.text); else emit2($INCLUDE, Bytecode.INSTR_NEW, $ID.text, $args.n); } | ^(INCLUDE_SUPER ID args) { if ( $args.passThru ) emit1($start, Bytecode.INSTR_PASSTHRU, $ID.text); if ( $args.namedArgs ) emit1($INCLUDE_SUPER, Bytecode.INSTR_SUPER_NEW_BOX_ARGS, $ID.text); else emit2($INCLUDE_SUPER, Bytecode.INSTR_SUPER_NEW, $ID.text, $args.n); } | ^(INCLUDE_REGION ID) { CompiledTemplate impl = TemplateCompiler.DefineBlankRegion(outermostImpl, $ID.Token); emit2($INCLUDE_REGION,Bytecode.INSTR_NEW,impl.Name,0); } | ^(INCLUDE_SUPER_REGION ID) { string mangled = TemplateGroup.GetMangledRegionName(outermostImpl.Name, $ID.Text); emit2($INCLUDE_SUPER_REGION,Bytecode.INSTR_SUPER_NEW,mangled,0); } | primary ; primary : ID {refAttr($ID);} | STRING {emit1($STRING,Bytecode.INSTR_LOAD_STR, Utility.Strip($STRING.text,1));} | TRUE {emit($TRUE, Bytecode.INSTR_TRUE);} | FALSE {emit($FALSE, Bytecode.INSTR_FALSE);} | subtemplate // push a subtemplate but ignore args since we can't pass any to it here {emit2($start,Bytecode.INSTR_NEW, $subtemplate.name, 0);} | list | ^( INCLUDE_IND expr {emit($INCLUDE_IND, Bytecode.INSTR_TOSTR);} args {emit1($INCLUDE_IND, Bytecode.INSTR_NEW_IND, $args.n);} ) | ^(TO_STR expr) {emit($TO_STR, Bytecode.INSTR_TOSTR);} ; arg : expr ; args returns [int n=0, bool namedArgs=false, bool passThru] : ( arg {$n++;} )+ | {emit($args.start, Bytecode.INSTR_ARGS); $namedArgs=true;} ( ^(eq='=' ID expr) {$n++; emit1($eq, Bytecode.INSTR_STORE_ARG, defineString($ID.text));} )+ ('...' {$passThru=true;})? | '...' {$passThru=true; emit($args.start, Bytecode.INSTR_ARGS); $namedArgs=true;} | ; list: {emit($start, Bytecode.INSTR_LIST);} ^(LIST (listElement {emit($listElement.start, Bytecode.INSTR_ADD);})* ) ; listElement : expr | NULL {emit($NULL,Bytecode.INSTR_NULL);} ; diff --git a/Runtime/Antlr3.Runtime/CommonToken.cs b/Runtime/Antlr3.Runtime/CommonToken.cs index 5797ca8..2305915 100644 --- a/Runtime/Antlr3.Runtime/CommonToken.cs +++ b/Runtime/Antlr3.Runtime/CommonToken.cs @@ -1,260 +1,260 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using NonSerialized = System.NonSerializedAttribute; using Regex = System.Text.RegularExpressions.Regex; using Serializable = System.SerializableAttribute; [Serializable] public class CommonToken : IToken { int type; int line; int charPositionInLine = -1; // set to invalid position int channel = TokenChannels.Default; [NonSerialized] ICharStream input; /** <summary> * We need to be able to change the text once in a while. If * this is non-null, then getText should return this. Note that * start/stop are not affected by changing this. * </summary> */ string text; /** <summary>What token number is this from 0..n-1 tokens; &lt; 0 implies invalid index</summary> */ int index = -1; /** <summary>The char position into the input buffer where this token starts</summary> */ int start; /** <summary>The char position into the input buffer where this token stops</summary> */ int stop; public CommonToken() { } public CommonToken( int type ) { this.type = type; } public CommonToken( ICharStream input, int type, int channel, int start, int stop ) { this.input = input; this.type = type; this.channel = channel; this.start = start; this.stop = stop; } public CommonToken( int type, string text ) { this.type = type; this.channel = TokenChannels.Default; this.text = text; } public CommonToken( IToken oldToken ) { text = oldToken.Text; type = oldToken.Type; line = oldToken.Line; index = oldToken.TokenIndex; charPositionInLine = oldToken.CharPositionInLine; channel = oldToken.Channel; input = oldToken.InputStream; if ( oldToken is CommonToken ) { start = ( (CommonToken)oldToken ).start; stop = ( (CommonToken)oldToken ).stop; } } #region IToken Members public string Text { get { if ( text != null ) return text; if ( input == null ) return null; if (start <= stop && stop < input.Count) return input.Substring( start, stop - start + 1 ); return "<EOF>"; } set { - /** Override the text for this token. getText() will return this text + /* Override the text for this token. getText() will return this text * rather than pulling from the buffer. Note that this does not mean * that start/stop indexes are not valid. It means that that input * was converted to a new string in the token object. */ text = value; } } public int Type { get { return type; } set { type = value; } } public int Line { get { return line; } set { line = value; } } public int CharPositionInLine { get { return charPositionInLine; } set { charPositionInLine = value; } } public int Channel { get { return channel; } set { channel = value; } } public int StartIndex { get { return start; } set { start = value; } } public int StopIndex { get { return stop; } set { stop = value; } } public int TokenIndex { get { return index; } set { index = value; } } public ICharStream InputStream { get { return input; } set { input = value; } } #endregion public override string ToString() { string channelStr = ""; if ( channel > 0 ) { channelStr = ",channel=" + channel; } string txt = Text; if ( txt != null ) { txt = Regex.Replace( txt, "\n", "\\\\n" ); txt = Regex.Replace( txt, "\r", "\\\\r" ); txt = Regex.Replace( txt, "\t", "\\\\t" ); } else { txt = "<no text>"; } return "[@" + TokenIndex + "," + start + ":" + stop + "='" + txt + "',<" + type + ">" + channelStr + "," + line + ":" + CharPositionInLine + "]"; } [System.Runtime.Serialization.OnSerializing] internal void OnSerializing( System.Runtime.Serialization.StreamingContext context ) { if ( text == null ) text = Text; } } } diff --git a/Runtime/Antlr3.Runtime/Lexer.cs b/Runtime/Antlr3.Runtime/Lexer.cs index daf530d..ec26769 100644 --- a/Runtime/Antlr3.Runtime/Lexer.cs +++ b/Runtime/Antlr3.Runtime/Lexer.cs @@ -1,443 +1,447 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ConditionalAttribute = System.Diagnostics.ConditionalAttribute; /** <summary> * A lexer is recognizer that draws input symbols from a character stream. * lexer grammars result in a subclass of this object. A Lexer object * uses simplified match() and error recovery mechanisms in the interest * of speed. * </summary> */ public abstract class Lexer : BaseRecognizer, ITokenSource { /** <summary>Where is the lexer drawing characters from?</summary> */ protected ICharStream input; public Lexer() { } public Lexer( ICharStream input ) { this.input = input; } public Lexer( ICharStream input, RecognizerSharedState state ) : base(state) { this.input = input; } #region Properties + /// <summary> + /// Gets or sets the text matched so far for the current token or any text override. + /// </summary> + /// <remarks> + /// <para>Setting this value replaces any previously set value, and overrides the original text.</para> + /// </remarks> public string Text { - /** <summary>Return the text matched so far for the current token or any text override.</summary> */ get { if ( state.text != null ) { return state.text; } return input.Substring( state.tokenStartCharIndex, CharIndex - state.tokenStartCharIndex ); } - /** <summary>Set the complete text of this token; it wipes any previous changes to the text.</summary> */ set { state.text = value; } } public int Line { get { return input.Line; } set { input.Line = value; } } public int CharPositionInLine { get { return input.CharPositionInLine; } set { input.CharPositionInLine = value; } } #endregion public override void Reset() { base.Reset(); // reset all recognizer state variables // wack Lexer state variables if ( input != null ) { input.Seek( 0 ); // rewind the input } if ( state == null ) { return; // no shared state work to do } state.token = null; state.type = TokenTypes.Invalid; state.channel = TokenChannels.Default; state.tokenStartCharIndex = -1; state.tokenStartCharPositionInLine = -1; state.tokenStartLine = -1; state.text = null; } /** <summary>Return a token from this source; i.e., match a token on the char stream.</summary> */ public virtual IToken NextToken() { for ( ; ; ) { state.token = null; state.channel = TokenChannels.Default; state.tokenStartCharIndex = input.Index; state.tokenStartCharPositionInLine = input.CharPositionInLine; state.tokenStartLine = input.Line; state.text = null; if ( input.LA( 1 ) == CharStreamConstants.EndOfFile ) { return GetEndOfFileToken(); } try { ParseNextToken(); if ( state.token == null ) { Emit(); } else if ( state.token == Tokens.Skip ) { continue; } return state.token; } catch (MismatchedRangeException mre) { ReportError(mre); // MatchRange() routine has already called recover() } catch (MismatchedTokenException mte) { ReportError(mte); // Match() routine has already called recover() } catch ( RecognitionException re ) { ReportError( re ); Recover( re ); // throw out current char and try again } } } /** Returns the EOF token (default), if you need * to return a custom token instead override this method. */ public virtual IToken GetEndOfFileToken() { IToken eof = new CommonToken((ICharStream)input, CharStreamConstants.EndOfFile, TokenChannels.Default, input.Index, input.Index); eof.Line = Line; eof.CharPositionInLine = CharPositionInLine; return eof; } /** <summary> * Instruct the lexer to skip creating a token for current lexer rule * and look for another token. nextToken() knows to keep looking when * a lexer rule finishes with token set to SKIP_TOKEN. Recall that * if token==null at end of any token rule, it creates one for you * and emits it. * </summary> */ public virtual void Skip() { state.token = Tokens.Skip; } /** <summary>This is the lexer entry point that sets instance var 'token'</summary> */ public abstract void mTokens(); public virtual ICharStream CharStream { get { return input; } - /** <summary>Set the char stream and reset the lexer</summary> */ + /* Set the char stream and reset the lexer */ set { input = null; Reset(); input = value; } } public override string SourceName { get { return input.SourceName; } } /** <summary> * Currently does not support multiple emits per nextToken invocation * for efficiency reasons. Subclass and override this method and * nextToken (to push tokens into a list and pull from that list rather * than a single variable as this implementation does). * </summary> */ public virtual void Emit( IToken token ) { state.token = token; } /** <summary> * The standard method called to automatically emit a token at the * outermost lexical rule. The token object should point into the * char buffer start..stop. If there is a text override in 'text', * use that to set the token's text. Override this method to emit * custom Token objects. * </summary> * * <remarks> * If you are building trees, then you should also override * Parser or TreeParser.getMissingSymbol(). * </remarks> */ public virtual IToken Emit() { IToken t = new CommonToken( input, state.type, state.channel, state.tokenStartCharIndex, CharIndex - 1 ); t.Line = state.tokenStartLine; t.Text = state.text; t.CharPositionInLine = state.tokenStartCharPositionInLine; Emit( t ); return t; } public virtual void Match( string s ) { int i = 0; while ( i < s.Length ) { if ( input.LA( 1 ) != s[i] ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedTokenException mte = new MismatchedTokenException(s[i], input, TokenNames); Recover( mte ); throw mte; } i++; input.Consume(); state.failed = false; } } public virtual void MatchAny() { input.Consume(); } public virtual void Match( int c ) { if ( input.LA( 1 ) != c ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedTokenException mte = new MismatchedTokenException(c, input, TokenNames); Recover( mte ); // don't really recover; just consume in lexer throw mte; } input.Consume(); state.failed = false; } public virtual void MatchRange( int a, int b ) { if ( input.LA( 1 ) < a || input.LA( 1 ) > b ) { if ( state.backtracking > 0 ) { state.failed = true; return; } MismatchedRangeException mre = new MismatchedRangeException(a, b, input); Recover( mre ); throw mre; } input.Consume(); state.failed = false; } /** <summary>What is the index of the current character of lookahead?</summary> */ public virtual int CharIndex { get { return input.Index; } } public override void ReportError( RecognitionException e ) { - /** TODO: not thought about recovery in lexer yet. + /* TODO: not thought about recovery in lexer yet. * - // if we've already reported an error and have not matched a token - // yet successfully, don't report any errors. - if ( errorRecovery ) { - //System.err.print("[SPURIOUS] "); - return; - } - errorRecovery = true; + * // if we've already reported an error and have not matched a token + * // yet successfully, don't report any errors. + * if ( errorRecovery ) { + * //System.err.print("[SPURIOUS] "); + * return; + * } + * errorRecovery = true; */ DisplayRecognitionError( this.TokenNames, e ); } public override string GetErrorMessage( RecognitionException e, string[] tokenNames ) { string msg = null; if ( e is MismatchedTokenException ) { MismatchedTokenException mte = (MismatchedTokenException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting " + GetCharErrorDisplay( mte.Expecting ); } else if ( e is NoViableAltException ) { NoViableAltException nvae = (NoViableAltException)e; // for development, can add "decision=<<"+nvae.grammarDecisionDescription+">>" // and "(decision="+nvae.decisionNumber+") and // "state "+nvae.stateNumber msg = "no viable alternative at character " + GetCharErrorDisplay( e.Character ); } else if ( e is EarlyExitException ) { EarlyExitException eee = (EarlyExitException)e; // for development, can add "(decision="+eee.decisionNumber+")" msg = "required (...)+ loop did not match anything at character " + GetCharErrorDisplay( e.Character ); } else if ( e is MismatchedNotSetException ) { MismatchedNotSetException mse = (MismatchedNotSetException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedSetException ) { MismatchedSetException mse = (MismatchedSetException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedRangeException ) { MismatchedRangeException mre = (MismatchedRangeException)e; msg = "mismatched character " + GetCharErrorDisplay( e.Character ) + " expecting set " + GetCharErrorDisplay( mre.A ) + ".." + GetCharErrorDisplay( mre.B ); } else { msg = base.GetErrorMessage( e, tokenNames ); } return msg; } public virtual string GetCharErrorDisplay( int c ) { string s = ( (char)c ).ToString(); switch ( c ) { case TokenTypes.EndOfFile: s = "<EOF>"; break; case '\n': s = "\\n"; break; case '\t': s = "\\t"; break; case '\r': s = "\\r"; break; } return "'" + s + "'"; } /** <summary> * Lexers can normally match any char in it's vocabulary after matching * a token, so do the easy thing and just kill a character and hope * it all works out. You can instead use the rule invocation stack * to do sophisticated error recovery if you are in a fragment rule. * </summary> */ public virtual void Recover( RecognitionException re ) { //System.out.println("consuming char "+(char)input.LA(1)+" during recovery"); //re.printStackTrace(); input.Consume(); } [Conditional("ANTLR_TRACE")] public virtual void TraceIn( string ruleName, int ruleIndex ) { string inputSymbol = ( (char)input.LT( 1 ) ) + " line=" + Line + ":" + CharPositionInLine; base.TraceIn( ruleName, ruleIndex, inputSymbol ); } [Conditional("ANTLR_TRACE")] public virtual void TraceOut( string ruleName, int ruleIndex ) { string inputSymbol = ( (char)input.LT( 1 ) ) + " line=" + Line + ":" + CharPositionInLine; base.TraceOut( ruleName, ruleIndex, inputSymbol ); } protected virtual void ParseNextToken() { mTokens(); } } }
antlr/antlrcs
1d55ffd84efd59d96533b69f86a23f1fd0869e60
Disable CS1573 and CS1591 via a rule set
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index d07f506..d7999dc 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,127 +1,130 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2F59DA1C-A502-440C-ABE8-240BDE2D0664}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Visualizer</RootNamespace> <AssemblyName>Antlr3.Runtime.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Include="Interval.cs" /> <Compile Include="RuntimeVisualizerExtensions.cs" /> <Compile Include="TreeViewModel.cs" /> <Compile Include="BaseTreeVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TokenStreamVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="TreeVisualizerViewModel.cs" /> <EmbeddedResource Include="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Include="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index b5be71d..5a485a6 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,140 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.ST</RootNamespace> <AssemblyName>Antlr3.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="CommonGroupLoader.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="PathGroupLoader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StringTemplate.cs" /> <Compile Include="StringTemplateErrorListener.cs" /> <Compile Include="StringTemplateGroup.cs" /> <Compile Include="StringTemplateGroupInterface.cs" /> <Compile Include="StringTemplateGroupLoader.cs" /> <Compile Include="StringTemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> <Compile Include="JavaExtensions\ListExtensions.cs" /> <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Include="Language\ASTExpr.cs" /> <Compile Include="Language\Cat.cs" /> <Compile Include="Language\ChunkToken.cs" /> <Compile Include="Language\ConditionalExpr.cs" /> <Compile Include="Language\Expr.cs" /> <Compile Include="Language\FormalArgument.cs" /> <Compile Include="Language\NewlineRef.cs" /> <Compile Include="Language\RegionType.cs" /> <Compile Include="Language\StringRef.cs" /> <Compile Include="Language\StringTemplateAST.cs" /> <Compile Include="Language\StringTemplateToken.cs" /> <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> <Compile Include="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Include="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Include="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Include="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Include="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Include="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Include="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Include="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> <Compile Include="TypeRegistry`1.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index 29a5cde..7b64a9a 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,145 +1,148 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8B58597B-058E-4D7A-B83E-5269BDABBE2C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="DebugTestAutoAST.cs" /> <Compile Include="DebugTestCompositeGrammars.cs" /> <Compile Include="DebugTestRewriteAST.cs" /> <Compile Include="ErrorQueue.cs" /> <Compile Include="IRuntimeTestHarness.cs" /> <Compile Include="JavaRuntimeTestHarness.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RuntimeTestHarness.cs" /> <Compile Include="StringTemplateTests.cs" /> <Compile Include="TestASTConstruction.cs" /> <Compile Include="TestAttributes.cs" /> <Compile Include="TestAutoAST.cs" /> <Compile Include="TestBufferedTreeNodeStream.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestCharDFAConversion.cs" /> <Compile Include="TestCommonTokenStream.cs" /> <Compile Include="TestCompositeGrammars.cs" /> <Compile Include="TestDFAConversion.cs" /> <Compile Include="TestDFAMatching.cs" /> <Compile Include="TestFastQueue.cs" /> <Compile Include="TestHeteroAST.cs" /> <Compile Include="TestInterpretedLexing.cs" /> <Compile Include="TestInterpretedParsing.cs" /> <Compile Include="TestIntervalSet.cs" /> <Compile Include="TestJavaCodeGeneration.cs" /> <Compile Include="TestLeftRecursion.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLookaheadStream.cs" /> <Compile Include="TestMessages.cs" /> <Compile Include="TestNFAConstruction.cs" /> <Compile Include="TestRewriteAST.cs" /> <Compile Include="TestRewriteTemplates.cs" /> <Compile Include="TestSemanticPredicateEvaluation.cs" /> <Compile Include="TestSemanticPredicates.cs" /> <Compile Include="TestSets.cs" /> <Compile Include="TestSymbolDefinitions.cs" /> <Compile Include="TestSyntacticPredicateEvaluation.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTemplates.cs" /> <Compile Include="TestTokenRewriteStream.cs" /> <Compile Include="TestTopologicalSort.cs" /> <Compile Include="TestTreeGrammarRewriteAST.cs" /> <Compile Include="TestTreeIterator.cs" /> <Compile Include="TestTreeNodeStream.cs" /> <Compile Include="TestTreeParsing.cs" /> <Compile Include="TestTrees.cs" /> <Compile Include="TestTreeWizard.cs" /> </ItemGroup> <ItemGroup> <Content Include="AuthoringTests.txt" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> <Private>True</Private> </ProjectReference> <ProjectReference Include="..\Antlr3\Antlr3.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> <Name>Antlr3</Name> <Private>True</Private> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> <PropertyGroup> <PostBuildEvent> </PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.ruleset b/Antlr3.ruleset new file mode 100644 index 0000000..e01b801 --- /dev/null +++ b/Antlr3.ruleset @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<RuleSet Name="Code Analysis Rules for ANTLR 3" Description=" " ToolsVersion="14.0"> + <Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp"> + <Rule Id="CS1573" Action="None" /> + <Rule Id="CS1591" Action="None" /> + </Rules> +</RuleSet> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index 49d01bd..ed7a34e 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,239 +1,240 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject + Antlr3.ruleset = Antlr3.ruleset Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 374f607..3d22031 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,507 +1,510 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 511ded2..7edddd0 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,127 +1,130 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate.Visualizer</RootNamespace> <AssemblyName>Antlr4.StringTemplate.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> </ItemGroup> <ItemGroup> <Compile Include="AstNodeToStringConverter.cs" /> <Compile Include="AttributeViewModel.cs" /> <Compile Include="Extensions\FlowDocumentExtensions.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TemplateCallHierarchyViewModel.cs" /> <Compile Include="TemplateFrameAttributeViewModel.cs" /> <Compile Include="TemplateVisualizer.cs" /> <Compile Include="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Include="TemplateVisualizerViewModel.cs" /> <Compile Include="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> <Compile Include="TreeViewItemDisplay.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 9499e0e..d667a04 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,159 +1,162 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index b8da100..12f8c45 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,109 +1,112 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> <Visible>False</Visible> </CodeAnalysisDependentAssemblyPaths> </ItemGroup> <ItemGroup> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="TestAggregates.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestNoNewlineTemplates.cs" /> <Compile Include="TestTemplateNames.cs" /> <Compile Include="TestTemplateRawGroupDirectory.cs" /> <Compile Include="TestVisualizer.cs" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="ErrorBufferAllErrors.cs" /> <Compile Include="TestCompiler.cs" /> <Compile Include="TestCoreBasics.cs" /> <Compile Include="TestDebugEvents.cs" /> <Compile Include="TestDictionaries.cs" /> <Compile Include="TestDollarDelimiters.cs" /> <Compile Include="TestFunctions.cs" /> <Compile Include="TestGroups.cs" /> <Compile Include="TestGroupSyntax.cs" /> <Compile Include="TestGroupSyntaxErrors.cs" /> <Compile Include="TestImports.cs" /> <Compile Include="TestIndentation.cs" /> <Compile Include="TestIndirectionAndEarlyEval.cs" /> <Compile Include="TestInterptimeErrors.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLineWrap.cs" /> <Compile Include="TestLists.cs" /> <Compile Include="TestModelAdaptors.cs" /> <Compile Include="TestNullAndEmptyValues.cs" /> <Compile Include="TestOptions.cs" /> <Compile Include="TestRegions.cs" /> <Compile Include="TestRenderers.cs" /> <Compile Include="TestScopes.cs" /> <Compile Include="TestSubtemplates.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTokensForDollarDelimiters.cs" /> <Compile Include="TestWhitespace.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index 2e171e8..736de0c 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,77 +1,80 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AntlrBuildTask</RootNamespace> <AssemblyName>AntlrBuildTask</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\AntlrBuildTask.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\AntlrBuildTask.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.Build.Engine" /> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Utilities.v3.5"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AntlrClassGenerationTask.cs" /> <Compile Include="AntlrClassGenerationTaskInternal.cs" /> <Compile Include="BuildMessage.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Content Include="Antlr3.targets"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> <SubType>Designer</SubType> </Content> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Antlr3.Java.targets" /> <None Include="Antlr3.props"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index b385ab9..2d3b350 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,79 +1,82 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <AssemblyName>Antlr3.Runtime.Debug</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="BlankDebugEventListener.cs" /> <Compile Include="DebugEventHub.cs" /> <Compile Include="DebugEventListenerConstants.cs" /> <Compile Include="DebugEventRepeater.cs" /> <Compile Include="DebugEventSocketProxy.cs" /> <Compile Include="DebugParser.cs" /> <Compile Include="DebugTokenStream.cs" /> <Compile Include="DebugTreeAdaptor.cs" /> <Compile Include="DebugTreeNodeStream.cs" /> <Compile Include="DebugTreeParser.cs" /> <Compile Include="JavaExtensions\ExceptionExtensions.cs" /> <Compile Include="Misc\DoubleKeyMap`3.cs" /> <Compile Include="Misc\Stats.cs" /> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="ParserDebugger.cs" /> <Compile Include="ParseTreeBuilder.cs" /> <Compile Include="Profiler.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RemoteDebugEventSocketListener.cs" /> <Compile Include="TraceDebugEventListener.cs" /> <Compile Include="Tracer.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index b7cfbec..3159488 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,91 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.JavaExtensions</RootNamespace> <AssemblyName>Antlr3.Runtime.JavaExtensions</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data.DataSetExtensions"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="DictionaryExtensions.cs" /> <Compile Include="ExceptionExtensions.cs" /> <Compile Include="IOExtensions.cs" /> <Compile Include="LexerExtensions.cs" /> <Compile Include="JSystem.cs" /> <Compile Include="ListExtensions.cs" /> <Compile Include="ObjectExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SetExtensions.cs" /> <Compile Include="StackExtensions.cs" /> <Compile Include="StringBuilderExtensions.cs" /> <Compile Include="StringExtensions.cs" /> <Compile Include="StringTokenizer.cs" /> <Compile Include="SubList.cs" /> <Compile Include="TreeExtensions.cs" /> <Compile Include="TypeExtensions.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index e7ccf7c..b3c8b01 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,187 +1,190 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Test</RootNamespace> <AssemblyName>Antlr3.Runtime.Test</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Numerics" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Include="Composition\Program.cs" /> <Compile Include="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Include="PreprocessorTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Include="SlimParsing\ITokenSource`1.cs" /> <Compile Include="SlimParsing\ITokenStream`1.cs" /> <Compile Include="SlimParsing\SlimLexer.cs" /> <Compile Include="SlimParsing\SlimStringStream.cs" /> <Compile Include="SlimParsing\SlimToken.cs" /> <Compile Include="SlimParsing\SlimTokenStream.cs" /> <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> <Compile Include="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestDotTreeGenerator.cs" /> <Compile Include="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestFastLexer.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj index 8eba523..12714e0 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj @@ -1,145 +1,148 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net20\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net20\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj index 728baac..14f140a 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj @@ -1,146 +1,149 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net40-client\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net40-client\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj index decdcfe..c55171c 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj @@ -1,147 +1,150 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{34BA0BD4-FB93-48D7-967E-83F229F220A0}</ProjectGuid> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\portable-net40\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\portable-net40\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net40\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\portable-net40\Release\</OutputPath> <DefineConstants>TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net40\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj index a08f5bb..080cdea 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj @@ -1,147 +1,150 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}</ProjectGuid> <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkProfile>Profile259</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\portable-net45\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\portable-net45\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net45\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\portable-net45\Release\</OutputPath> <DefineConstants>TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\portable-net45\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> + <PropertyGroup> + <CodeAnalysisRuleSet>..\..\Antlr3.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="System\ICloneable.cs" /> <Compile Include="System\NonSerializedAttribute.cs" /> <Compile Include="System\SerializableAttribute.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file
antlr/antlrcs
b98b62b1c297b57c564c1a5e92d9d76cf264da6d
Add README.md with Gitter and Build Status badges
diff --git a/Antlr3.sln b/Antlr3.sln index caca523..49d01bd 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,238 +1,239 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt + README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..670da76 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# ANTLR 3 C# Target + +[![Join the chat at https://gitter.im/antlr/antlrcs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/antlr/antlrcs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +[![Build status](https://ci.appveyor.com/api/projects/status/x21gyx4ikxsa9n3t/branch/master?svg=true)](https://ci.appveyor.com/project/sharwell/antlrcs/branch/master)
antlr/antlrcs
e32c7b0afaa0924be0ad7cfc249b273366fff6a1
Add AppVeyor configuration
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..2444aa6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,19 @@ +version: 1.0.{build} +os: Visual Studio 2015 +init: +- cmd: >- + git config --global core.autocrlf true + + mkdir ..\..\..\keys\antlr + + "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sn.exe" -k ..\..\..\keys\antlr\Key.snk +install: +- git submodule update --init --recursive +build_script: +- cd build\prep +- powershell -Command .\prepare.ps1 -Logger "${env:ProgramFiles}\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" +- cd ..\.. +test: off +artifacts: +- path: build\prep\nuget\*.nupkg +- path: build\prep\dist\*.7z
antlr/antlrcs
4798e430aaa3522f22fb8959dc756fdf96d02ce9
Fix error reporting in build script
diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 46eaca0..23481fe 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,220 +1,261 @@ +param ( + [switch]$Debug, + [string]$VisualStudioVersion = '14.0', + [string]$Verbosity = 'minimal', + [string]$Logger +) + # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { - echo "The script was run from an invalid working directory." + $host.ui.WriteErrorLine("The script was run from an invalid working directory.") exit 1 } -$BuildConfig = "Release" +If ($Debug) { + $BuildConfig = 'Debug' +} Else { + $BuildConfig = 'Release' +} + $DebugBuild = false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project -$msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" -#if (!(Test-Path $msbuild)) { -# [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') -# $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest") -#} +$msbuild = "${env:ProgramFiles(x86)}\MSBuild\$VisualStudioVersion\Bin\MSBuild.exe" -&$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath -if ($LASTEXITCODE -ne 0) { - echo "Build Failed, Aborting!" - exit $p.ExitCode +If ($Logger) { + $LoggerArgument = "/logger:$Logger" +} + +&$msbuild /nologo /m /nr:false /t:rebuild $LoggerArgument "/verbosity:$Verbosity" /p:Configuration=$BuildConfig $SolutionPath +If (-not $?) { + $host.ui.WriteErrorLine("Build Failed, Aborting!") + exit $LASTEXITCODE } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" - if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode + If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } } -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine('Bootstrap update failed, Aborting!') + exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" -if ($LASTEXITCODE -ne 0) { - echo "Bootstrap update failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Bootstrap update failed, Aborting!") + exit $LASTEXITCODE } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath -if ($LASTEXITCODE -ne 0) { - echo "Build Failed, Aborting!" - exit $p.ExitCode +If (-not $?) { + $host.ui.WriteErrorLine("Build Failed, Aborting!") + exit $LASTEXITCODE } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-dev" $STVersion = "4.0.7.2-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } -.\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -.\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -.\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -.\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -.\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols -.\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +} + +.\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +} + +.\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +} + +.\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +} + +.\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +} + +.\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=$BuildConfig -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +If (-not $?) { + $host.ui.WriteErrorLine("Failed to create NuGet package, Aborting!") + exit $LASTEXITCODE +}
antlr/antlrcs
a4c47dca5bb1fb9979e5072457dbd831c8b08ae1
Open the solution in Visual Studio 2015 by default
diff --git a/Antlr3.sln b/Antlr3.sln index 2d75e3e..caca523 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,236 +1,238 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" EndProject Global - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = Antlr3.vsmdi - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = Antlr3.vsmdi + EndGlobalSection EndGlobal
antlr/antlrcs
d10691737ecb28695d147fc3ab55f1b9e748b684
Add portable-net45 build (Profile 259)
diff --git a/Antlr3.sln b/Antlr3.sln index b6ba210..2d75e3e 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,230 +1,236 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net45", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net45.csproj", "{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU + {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj new file mode 100644 index 0000000..a08f5bb --- /dev/null +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net45.csproj @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{AC2C28AB-D93A-41E3-85A6-5ECB08CAE5C3}</ProjectGuid> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Antlr.Runtime</RootNamespace> + <AssemblyName>Antlr3.Runtime</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkProfile>Profile259</TargetFrameworkProfile> + <FileAlignment>512</FileAlignment> + <BaseIntermediateOutputPath>obj\portable-net45\</BaseIntermediateOutputPath> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\portable-net45\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\portable-net45\Debug\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\portable-net45\Release\</OutputPath> + <DefineConstants>TRACE;PORTABLE;NET45;NET45PLUS;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\portable-net45\Release\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Compile Include="ANTLRFileStream.cs" /> + <Compile Include="ANTLRInputStream.cs" /> + <Compile Include="ANTLRReaderStream.cs" /> + <Compile Include="ANTLRStringStream.cs" /> + <Compile Include="AstParserRuleReturnScope`2.cs" /> + <Compile Include="BaseRecognizer.cs" /> + <Compile Include="BitSet.cs" /> + <Compile Include="BufferedTokenStream.cs" /> + <Compile Include="CharStreamConstants.cs" /> + <Compile Include="CharStreamState.cs" /> + <Compile Include="ClassicToken.cs" /> + <Compile Include="CommonToken.cs" /> + <Compile Include="CommonTokenStream.cs" /> + <Compile Include="Debug\IDebugEventListener.cs" /> + <Compile Include="DFA.cs" /> + <Compile Include="EarlyExitException.cs" /> + <Compile Include="FailedPredicateException.cs" /> + <Compile Include="GrammarRuleAttribute.cs" /> + <Compile Include="IAstRuleReturnScope.cs" /> + <Compile Include="IAstRuleReturnScope`1.cs" /> + <Compile Include="ICharStream.cs" /> + <Compile Include="IIntStream.cs" /> + <Compile Include="IRuleReturnScope.cs" /> + <Compile Include="IRuleReturnScope`1.cs" /> + <Compile Include="ITemplateRuleReturnScope.cs" /> + <Compile Include="ITemplateRuleReturnScope`1.cs" /> + <Compile Include="IToken.cs" /> + <Compile Include="ITokenSource.cs" /> + <Compile Include="ITokenStream.cs" /> + <Compile Include="ITokenStreamInformation.cs" /> + <Compile Include="LegacyCommonTokenStream.cs" /> + <Compile Include="Lexer.cs" /> + <Compile Include="Misc\FastQueue.cs" /> + <Compile Include="Misc\FunctionDelegates.cs" /> + <Compile Include="Misc\ListStack`1.cs" /> + <Compile Include="Misc\LookaheadStream.cs" /> + <Compile Include="Misc\RegexOptionsHelper.cs" /> + <Compile Include="MismatchedNotSetException.cs" /> + <Compile Include="MismatchedRangeException.cs" /> + <Compile Include="MismatchedSetException.cs" /> + <Compile Include="MismatchedTokenException.cs" /> + <Compile Include="MismatchedTreeNodeException.cs" /> + <Compile Include="MissingTokenException.cs" /> + <Compile Include="NoViableAltException.cs" /> + <Compile Include="Parser.cs" /> + <Compile Include="ParserRuleReturnScope.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RecognitionException.cs" /> + <Compile Include="RecognizerSharedState.cs" /> + <Compile Include="System\ICloneable.cs" /> + <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="TemplateParserRuleReturnScope`2.cs" /> + <Compile Include="TokenChannels.cs" /> + <Compile Include="TokenRewriteStream.cs" /> + <Compile Include="Tokens.cs" /> + <Compile Include="TokenTypes.cs" /> + <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\BaseTree.cs" /> + <Compile Include="Tree\BaseTreeAdaptor.cs" /> + <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> + <Compile Include="Tree\BufferedTreeNodeStream.cs" /> + <Compile Include="Tree\CommonErrorNode.cs" /> + <Compile Include="Tree\CommonTree.cs" /> + <Compile Include="Tree\CommonTreeAdaptor.cs" /> + <Compile Include="Tree\CommonTreeNodeStream.cs" /> + <Compile Include="Tree\DotTreeGenerator.cs" /> + <Compile Include="Tree\IPositionTrackingStream.cs" /> + <Compile Include="Tree\ITree.cs" /> + <Compile Include="Tree\ITreeAdaptor.cs" /> + <Compile Include="Tree\ITreeNodeStream.cs" /> + <Compile Include="Tree\ITreeVisitorAction.cs" /> + <Compile Include="Tree\ParseTree.cs" /> + <Compile Include="Tree\RewriteCardinalityException.cs" /> + <Compile Include="Tree\RewriteEarlyExitException.cs" /> + <Compile Include="Tree\RewriteEmptyStreamException.cs" /> + <Compile Include="Tree\RewriteRuleElementStream.cs" /> + <Compile Include="Tree\RewriteRuleNodeStream.cs" /> + <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> + <Compile Include="Tree\RewriteRuleTokenStream.cs" /> + <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\TreeFilter.cs" /> + <Compile Include="Tree\TreeIterator.cs" /> + <Compile Include="Tree\TreeParser.cs" /> + <Compile Include="Tree\TreePatternLexer.cs" /> + <Compile Include="Tree\TreePatternParser.cs" /> + <Compile Include="Tree\TreeRewriter.cs" /> + <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> + <Compile Include="Tree\TreeVisitor.cs" /> + <Compile Include="Tree\TreeWizard.cs" /> + <Compile Include="UnbufferedTokenStream.cs" /> + <Compile Include="UnwantedTokenException.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> + <Link>Key.snk</Link> + </None> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index c4ff6b2..4f9e942 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,39 +1,43 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net45\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
5ef0f9f743e0a20e88eb4fd693ac46758c9adb49
Include portable-net40 build in the Antlr.Runtime NuGet package
diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index b5c32ce..c4ff6b2 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,35 +1,39 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.dll" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.pdb" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\portable-net40\$Configuration$\Antlr3.Runtime.xml" target="lib\portable-net4+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1"/> + <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
619ad58f9e7cca7f04f939c4b17b6f20b783533f
Add a PCL build of the ANTLR 3 Runtime (Profile 328) (fixes #14)
diff --git a/Antlr3.sln b/Antlr3.sln index 00cef77..b6ba210 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,224 +1,230 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.portable-net40", "Runtime\Antlr3.Runtime\Antlr3.Runtime.portable-net40.csproj", "{34BA0BD4-FB93-48D7-967E-83F229F220A0}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU + {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34BA0BD4-FB93-48D7-967E-83F229F220A0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime/ANTLRFileStream.cs b/Runtime/Antlr3.Runtime/ANTLRFileStream.cs index b4725e3..9860bde 100644 --- a/Runtime/Antlr3.Runtime/ANTLRFileStream.cs +++ b/Runtime/Antlr3.Runtime/ANTLRFileStream.cs @@ -1,88 +1,92 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if !PORTABLE + namespace Antlr.Runtime { using Encoding = System.Text.Encoding; using File = System.IO.File; /** <summary> * This is a char buffer stream that is loaded from a file * all at once when you construct the object. This looks very * much like an ANTLReader or ANTLRInputStream, but it's a special case * since we know the exact size of the object to load. We can avoid lots * of data copying. * </summary> */ [System.Serializable] [System.Security.Permissions.FileIOPermission(System.Security.Permissions.SecurityAction.Demand, Unrestricted = true)] public class ANTLRFileStream : ANTLRStringStream { protected string fileName; public ANTLRFileStream( string fileName ) : this( fileName, null ) { } public ANTLRFileStream( string fileName, Encoding encoding ) { this.fileName = fileName; Load( fileName, encoding ); } public virtual void Load( string fileName, Encoding encoding ) { if ( fileName == null ) { return; } string text; if (encoding == null) text = File.ReadAllText(fileName); else text = File.ReadAllText(fileName, encoding); data = text.ToCharArray(); n = data.Length; } public override string SourceName { get { return fileName; } } } } + +#endif diff --git a/Runtime/Antlr3.Runtime/ANTLRReaderStream.cs b/Runtime/Antlr3.Runtime/ANTLRReaderStream.cs index b8ecc26..1564769 100644 --- a/Runtime/Antlr3.Runtime/ANTLRReaderStream.cs +++ b/Runtime/Antlr3.Runtime/ANTLRReaderStream.cs @@ -1,93 +1,93 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using TextReader = System.IO.TextReader; /** <summary> * Vacuum all input from a Reader and then treat it like a StringStream. * Manage the buffer manually to avoid unnecessary data copying. * </summary> * * <remarks> * If you need encoding, use ANTLRInputStream. * </remarks> */ [System.Serializable] public class ANTLRReaderStream : ANTLRStringStream { public const int ReadBufferSize = 1024; public const int InitialBufferSize = 1024; public ANTLRReaderStream( TextReader r ) : this( r, InitialBufferSize, ReadBufferSize ) { } public ANTLRReaderStream( TextReader r, int size ) : this( r, size, ReadBufferSize ) { } public ANTLRReaderStream( TextReader r, int size, int readChunkSize ) { Load( r, size, readChunkSize ); } public virtual void Load( TextReader r, int size, int readChunkSize ) { if ( r == null ) { return; } if ( size <= 0 ) { size = InitialBufferSize; } if ( readChunkSize <= 0 ) { readChunkSize = ReadBufferSize; } // System.out.println("load "+size+" in chunks of "+readChunkSize); try { data = r.ReadToEnd().ToCharArray(); base.n = data.Length; } finally { - r.Close(); + r.Dispose(); } } } } diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj index 13d6036..8eba523 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj @@ -1,144 +1,145 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net20\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net20\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> + <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj index f023ea8..728baac 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj @@ -1,145 +1,146 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\net40-client\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\net40-client\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> + <Compile Include="Misc\RegexOptionsHelper.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj new file mode 100644 index 0000000..decdcfe --- /dev/null +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.portable-net40.csproj @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{34BA0BD4-FB93-48D7-967E-83F229F220A0}</ProjectGuid> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Antlr.Runtime</RootNamespace> + <AssemblyName>Antlr3.Runtime</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Profile328</TargetFrameworkProfile> + <FileAlignment>512</FileAlignment> + <BaseIntermediateOutputPath>obj\portable-net40\</BaseIntermediateOutputPath> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\portable-net40\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\portable-net40\Debug\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\portable-net40\Release\</OutputPath> + <DefineConstants>TRACE;PORTABLE;NET40;NET40PLUS;NET35PLUS;NET20PLUS</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\portable-net40\Release\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Compile Include="ANTLRFileStream.cs" /> + <Compile Include="ANTLRInputStream.cs" /> + <Compile Include="ANTLRReaderStream.cs" /> + <Compile Include="ANTLRStringStream.cs" /> + <Compile Include="AstParserRuleReturnScope`2.cs" /> + <Compile Include="BaseRecognizer.cs" /> + <Compile Include="BitSet.cs" /> + <Compile Include="BufferedTokenStream.cs" /> + <Compile Include="CharStreamConstants.cs" /> + <Compile Include="CharStreamState.cs" /> + <Compile Include="ClassicToken.cs" /> + <Compile Include="CommonToken.cs" /> + <Compile Include="CommonTokenStream.cs" /> + <Compile Include="Debug\IDebugEventListener.cs" /> + <Compile Include="DFA.cs" /> + <Compile Include="EarlyExitException.cs" /> + <Compile Include="FailedPredicateException.cs" /> + <Compile Include="GrammarRuleAttribute.cs" /> + <Compile Include="IAstRuleReturnScope.cs" /> + <Compile Include="IAstRuleReturnScope`1.cs" /> + <Compile Include="ICharStream.cs" /> + <Compile Include="IIntStream.cs" /> + <Compile Include="IRuleReturnScope.cs" /> + <Compile Include="IRuleReturnScope`1.cs" /> + <Compile Include="ITemplateRuleReturnScope.cs" /> + <Compile Include="ITemplateRuleReturnScope`1.cs" /> + <Compile Include="IToken.cs" /> + <Compile Include="ITokenSource.cs" /> + <Compile Include="ITokenStream.cs" /> + <Compile Include="ITokenStreamInformation.cs" /> + <Compile Include="LegacyCommonTokenStream.cs" /> + <Compile Include="Lexer.cs" /> + <Compile Include="Misc\FastQueue.cs" /> + <Compile Include="Misc\FunctionDelegates.cs" /> + <Compile Include="Misc\ListStack`1.cs" /> + <Compile Include="Misc\LookaheadStream.cs" /> + <Compile Include="Misc\RegexOptionsHelper.cs" /> + <Compile Include="MismatchedNotSetException.cs" /> + <Compile Include="MismatchedRangeException.cs" /> + <Compile Include="MismatchedSetException.cs" /> + <Compile Include="MismatchedTokenException.cs" /> + <Compile Include="MismatchedTreeNodeException.cs" /> + <Compile Include="MissingTokenException.cs" /> + <Compile Include="NoViableAltException.cs" /> + <Compile Include="Parser.cs" /> + <Compile Include="ParserRuleReturnScope.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RecognitionException.cs" /> + <Compile Include="RecognizerSharedState.cs" /> + <Compile Include="System\ICloneable.cs" /> + <Compile Include="System\NonSerializedAttribute.cs" /> + <Compile Include="System\SerializableAttribute.cs" /> + <Compile Include="TemplateParserRuleReturnScope`2.cs" /> + <Compile Include="TokenChannels.cs" /> + <Compile Include="TokenRewriteStream.cs" /> + <Compile Include="Tokens.cs" /> + <Compile Include="TokenTypes.cs" /> + <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\BaseTree.cs" /> + <Compile Include="Tree\BaseTreeAdaptor.cs" /> + <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> + <Compile Include="Tree\BufferedTreeNodeStream.cs" /> + <Compile Include="Tree\CommonErrorNode.cs" /> + <Compile Include="Tree\CommonTree.cs" /> + <Compile Include="Tree\CommonTreeAdaptor.cs" /> + <Compile Include="Tree\CommonTreeNodeStream.cs" /> + <Compile Include="Tree\DotTreeGenerator.cs" /> + <Compile Include="Tree\IPositionTrackingStream.cs" /> + <Compile Include="Tree\ITree.cs" /> + <Compile Include="Tree\ITreeAdaptor.cs" /> + <Compile Include="Tree\ITreeNodeStream.cs" /> + <Compile Include="Tree\ITreeVisitorAction.cs" /> + <Compile Include="Tree\ParseTree.cs" /> + <Compile Include="Tree\RewriteCardinalityException.cs" /> + <Compile Include="Tree\RewriteEarlyExitException.cs" /> + <Compile Include="Tree\RewriteEmptyStreamException.cs" /> + <Compile Include="Tree\RewriteRuleElementStream.cs" /> + <Compile Include="Tree\RewriteRuleNodeStream.cs" /> + <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> + <Compile Include="Tree\RewriteRuleTokenStream.cs" /> + <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\TreeFilter.cs" /> + <Compile Include="Tree\TreeIterator.cs" /> + <Compile Include="Tree\TreeParser.cs" /> + <Compile Include="Tree\TreePatternLexer.cs" /> + <Compile Include="Tree\TreePatternParser.cs" /> + <Compile Include="Tree\TreeRewriter.cs" /> + <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> + <Compile Include="Tree\TreeVisitor.cs" /> + <Compile Include="Tree\TreeWizard.cs" /> + <Compile Include="UnbufferedTokenStream.cs" /> + <Compile Include="UnwantedTokenException.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> + <Link>Key.snk</Link> + </None> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/BaseRecognizer.cs b/Runtime/Antlr3.Runtime/BaseRecognizer.cs index c62a5bf..aa76c29 100644 --- a/Runtime/Antlr3.Runtime/BaseRecognizer.cs +++ b/Runtime/Antlr3.Runtime/BaseRecognizer.cs @@ -1,1186 +1,1193 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using ArgumentNullException = System.ArgumentNullException; using Array = System.Array; using Conditional = System.Diagnostics.ConditionalAttribute; using IDebugEventListener = Antlr.Runtime.Debug.IDebugEventListener; using MethodBase = System.Reflection.MethodBase; using Regex = System.Text.RegularExpressions.Regex; + using TextWriter = System.IO.TextWriter; + +#if !PORTABLE using StackFrame = System.Diagnostics.StackFrame; using StackTrace = System.Diagnostics.StackTrace; - using TextWriter = System.IO.TextWriter; +#else + using NotSupportedException = System.NotSupportedException; +#endif /** <summary> * A generic recognizer that can handle recognizers generated from * lexer, parser, and tree grammars. This is all the parsing * support code essentially; most of it is error recovery stuff and * backtracking. * </summary> */ public abstract class BaseRecognizer { public const int MemoRuleFailed = -2; public const int MemoRuleUnknown = -1; public const int InitialFollowStackSize = 100; // copies from Token object for convenience in actions public const int DefaultTokenChannel = TokenChannels.Default; public const int Hidden = TokenChannels.Hidden; public const string NextTokenRuleName = "nextToken"; /** <summary> * State of a lexer, parser, or tree parser are collected into a state * object so the state can be shared. This sharing is needed to * have one grammar import others and share same error variables * and other state variables. It's a kind of explicit multiple * inheritance via delegation of methods and shared state. * </summary> */ protected internal RecognizerSharedState state; public BaseRecognizer() : this(new RecognizerSharedState()) { } public BaseRecognizer( RecognizerSharedState state ) { if ( state == null ) { state = new RecognizerSharedState(); } this.state = state; InitDFAs(); } public TextWriter TraceDestination { get; set; } public virtual void SetState(RecognizerSharedState value) { this.state = value; } protected virtual void InitDFAs() { } /** <summary>reset the parser's state; subclasses must rewinds the input stream</summary> */ public virtual void Reset() { // wack everything related to error recovery if ( state == null ) { return; // no shared state work to do } state._fsp = -1; state.errorRecovery = false; state.lastErrorIndex = -1; state.failed = false; state.syntaxErrors = 0; // wack everything related to backtracking and memoization state.backtracking = 0; for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) { // wipe cache state.ruleMemo[i] = null; } } /** <summary> * Match current input symbol against ttype. Attempt * single token insertion or deletion error recovery. If * that fails, throw MismatchedTokenException. * </summary> * * <remarks> * To turn off single token insertion or deletion error * recovery, override recoverFromMismatchedToken() and have it * throw an exception. See TreeParser.recoverFromMismatchedToken(). * This way any error in a rule will cause an exception and * immediate exit from rule. Rule would recover by resynchronizing * to the set of symbols that can follow rule ref. * </remarks> */ public virtual object Match( IIntStream input, int ttype, BitSet follow ) { //System.out.println("match "+((TokenStream)input).LT(1)); object matchedSymbol = GetCurrentInputSymbol( input ); if ( input.LA( 1 ) == ttype ) { input.Consume(); state.errorRecovery = false; state.failed = false; return matchedSymbol; } if ( state.backtracking > 0 ) { state.failed = true; return matchedSymbol; } matchedSymbol = RecoverFromMismatchedToken( input, ttype, follow ); return matchedSymbol; } /** <summary>Match the wildcard: in a symbol</summary> */ public virtual void MatchAny( IIntStream input ) { state.errorRecovery = false; state.failed = false; input.Consume(); } public virtual bool MismatchIsUnwantedToken( IIntStream input, int ttype ) { return input.LA( 2 ) == ttype; } public virtual bool MismatchIsMissingToken( IIntStream input, BitSet follow ) { if ( follow == null ) { // we have no information about the follow; we can only consume // a single token and hope for the best return false; } // compute what can follow this grammar element reference if ( follow.Member( TokenTypes.EndOfRule ) ) { BitSet viableTokensFollowingThisRule = ComputeContextSensitiveRuleFOLLOW(); follow = follow.Or( viableTokensFollowingThisRule ); if ( state._fsp >= 0 ) { // remove EOR if we're not the start symbol follow.Remove( TokenTypes.EndOfRule ); } } // if current token is consistent with what could come after set // then we know we're missing a token; error recovery is free to // "insert" the missing token //System.out.println("viable tokens="+follow.toString(getTokenNames())); //System.out.println("LT(1)="+((TokenStream)input).LT(1)); // BitSet cannot handle negative numbers like -1 (EOF) so I leave EOR // in follow set to indicate that the fall of the start symbol is // in the set (EOF can follow). if ( follow.Member( input.LA( 1 ) ) || follow.Member( TokenTypes.EndOfRule ) ) { //System.out.println("LT(1)=="+((TokenStream)input).LT(1)+" is consistent with what follows; inserting..."); return true; } return false; } /** <summary>Report a recognition problem.</summary> * * <remarks> * This method sets errorRecovery to indicate the parser is recovering * not parsing. Once in recovery mode, no errors are generated. * To get out of recovery mode, the parser must successfully match * a token (after a resync). So it will go: * * 1. error occurs * 2. enter recovery mode, report error * 3. consume until token found in resynch set * 4. try to resume parsing * 5. next match() will reset errorRecovery mode * * If you override, make sure to update syntaxErrors if you care about that. * </remarks> */ public virtual void ReportError( RecognitionException e ) { // if we've already reported an error and have not matched a token // yet successfully, don't report any errors. if ( state.errorRecovery ) { //System.err.print("[SPURIOUS] "); return; } state.syntaxErrors++; // don't count spurious state.errorRecovery = true; DisplayRecognitionError( this.TokenNames, e ); } public virtual void DisplayRecognitionError( string[] tokenNames, RecognitionException e ) { string hdr = GetErrorHeader( e ); string msg = GetErrorMessage( e, tokenNames ); EmitErrorMessage( hdr + " " + msg ); } /** <summary>What error message should be generated for the various exception types?</summary> * * <remarks> * Not very object-oriented code, but I like having all error message * generation within one method rather than spread among all of the * exception classes. This also makes it much easier for the exception * handling because the exception classes do not have to have pointers back * to this object to access utility routines and so on. Also, changing * the message for an exception type would be difficult because you * would have to subclassing exception, but then somehow get ANTLR * to make those kinds of exception objects instead of the default. * This looks weird, but trust me--it makes the most sense in terms * of flexibility. * * For grammar debugging, you will want to override this to add * more information such as the stack frame with * getRuleInvocationStack(e, this.getClass().getName()) and, * for no viable alts, the decision description and state etc... * * Override this to change the message generated for one or more * exception types. * </remarks> */ public virtual string GetErrorMessage( RecognitionException e, string[] tokenNames ) { string msg = e.Message; if ( e is UnwantedTokenException ) { UnwantedTokenException ute = (UnwantedTokenException)e; string tokenName = "<unknown>"; if ( ute.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[ute.Expecting]; } msg = "extraneous input " + GetTokenErrorDisplay( ute.UnexpectedToken ) + " expecting " + tokenName; } else if ( e is MissingTokenException ) { MissingTokenException mte = (MissingTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "missing " + tokenName + " at " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedTokenException ) { MismatchedTokenException mte = (MismatchedTokenException)e; string tokenName = "<unknown>"; if ( mte.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mte.Expecting]; } msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting " + tokenName; } else if ( e is MismatchedTreeNodeException ) { MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e; string tokenName = "<unknown>"; if ( mtne.Expecting == TokenTypes.EndOfFile ) { tokenName = "EndOfFile"; } else { tokenName = tokenNames[mtne.Expecting]; } // workaround for a .NET framework bug (NullReferenceException) string nodeText = ( mtne.Node != null ) ? mtne.Node.ToString() ?? string.Empty : string.Empty; msg = "mismatched tree node: " + nodeText + " expecting " + tokenName; } else if ( e is NoViableAltException ) { //NoViableAltException nvae = (NoViableAltException)e; // for development, can add "decision=<<"+nvae.grammarDecisionDescription+">>" // and "(decision="+nvae.decisionNumber+") and // "state "+nvae.stateNumber msg = "no viable alternative at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is EarlyExitException ) { //EarlyExitException eee = (EarlyExitException)e; // for development, can add "(decision="+eee.decisionNumber+")" msg = "required (...)+ loop did not match anything at input " + GetTokenErrorDisplay( e.Token ); } else if ( e is MismatchedSetException ) { MismatchedSetException mse = (MismatchedSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is MismatchedNotSetException ) { MismatchedNotSetException mse = (MismatchedNotSetException)e; msg = "mismatched input " + GetTokenErrorDisplay( e.Token ) + " expecting set " + mse.Expecting; } else if ( e is FailedPredicateException ) { FailedPredicateException fpe = (FailedPredicateException)e; msg = "rule " + fpe.RuleName + " failed predicate: {" + fpe.PredicateText + "}?"; } return msg; } /** <summary> * Get number of recognition errors (lexer, parser, tree parser). Each * recognizer tracks its own number. So parser and lexer each have * separate count. Does not count the spurious errors found between * an error and next valid token match * </summary> * * <seealso cref="reportError()"/> */ public virtual int NumberOfSyntaxErrors { get { return state.syntaxErrors; } } /** <summary>What is the error header, normally line/character position information?</summary> */ public virtual string GetErrorHeader( RecognitionException e ) { string prefix = SourceName ?? string.Empty; if (prefix.Length > 0) prefix += ' '; return string.Format("{0}line {1}:{2}", prefix, e.Line, e.CharPositionInLine + 1); } /** <summary> * How should a token be displayed in an error message? The default * is to display just the text, but during development you might * want to have a lot of information spit out. Override in that case * to use t.ToString() (which, for CommonToken, dumps everything about * the token). This is better than forcing you to override a method in * your token objects because you don't have to go modify your lexer * so that it creates a new Java type. * </summary> */ public virtual string GetTokenErrorDisplay( IToken t ) { string s = t.Text; if ( s == null ) { if ( t.Type == TokenTypes.EndOfFile ) { s = "<EOF>"; } else { s = "<" + t.Type + ">"; } } s = Regex.Replace( s, "\n", "\\\\n" ); s = Regex.Replace( s, "\r", "\\\\r" ); s = Regex.Replace( s, "\t", "\\\\t" ); return "'" + s + "'"; } /** <summary>Override this method to change where error messages go</summary> */ public virtual void EmitErrorMessage( string msg ) { if (TraceDestination != null) TraceDestination.WriteLine( msg ); } /** <summary> * Recover from an error found on the input stream. This is * for NoViableAlt and mismatched symbol exceptions. If you enable * single token insertion and deletion, this will usually not * handle mismatched symbol exceptions but there could be a mismatched * token that the match() routine could not recover from. * </summary> */ public virtual void Recover( IIntStream input, RecognitionException re ) { if ( state.lastErrorIndex == input.Index ) { // uh oh, another error at same token index; must be a case // where LT(1) is in the recovery token set so nothing is // consumed; consume a single token so at least to prevent // an infinite loop; this is a failsafe. input.Consume(); } state.lastErrorIndex = input.Index; BitSet followSet = ComputeErrorRecoverySet(); BeginResync(); ConsumeUntil( input, followSet ); EndResync(); } /** <summary> * A hook to listen in on the token consumption during error recovery. * The DebugParser subclasses this to fire events to the listenter. * </summary> */ public virtual void BeginResync() { } public virtual void EndResync() { } /* Compute the error recovery set for the current rule. During * rule invocation, the parser pushes the set of tokens that can * follow that rule reference on the stack; this amounts to * computing FIRST of what follows the rule reference in the * enclosing rule. This local follow set only includes tokens * from within the rule; i.e., the FIRST computation done by * ANTLR stops at the end of a rule. * * EXAMPLE * * When you find a "no viable alt exception", the input is not * consistent with any of the alternatives for rule r. The best * thing to do is to consume tokens until you see something that * can legally follow a call to r *or* any rule that called r. * You don't want the exact set of viable next tokens because the * input might just be missing a token--you might consume the * rest of the input looking for one of the missing tokens. * * Consider grammar: * * a : '[' b ']' * | '(' b ')' * ; * b : c '^' INT ; * c : ID * | INT * ; * * At each rule invocation, the set of tokens that could follow * that rule is pushed on a stack. Here are the various "local" * follow sets: * * FOLLOW(b1_in_a) = FIRST(']') = ']' * FOLLOW(b2_in_a) = FIRST(')') = ')' * FOLLOW(c_in_b) = FIRST('^') = '^' * * Upon erroneous input "[]", the call chain is * * a -> b -> c * * and, hence, the follow context stack is: * * depth local follow set after call to rule * 0 <EOF> a (from main()) * 1 ']' b * 3 '^' c * * Notice that ')' is not included, because b would have to have * been called from a different context in rule a for ')' to be * included. * * For error recovery, we cannot consider FOLLOW(c) * (context-sensitive or otherwise). We need the combined set of * all context-sensitive FOLLOW sets--the set of all tokens that * could follow any reference in the call chain. We need to * resync to one of those tokens. Note that FOLLOW(c)='^' and if * we resync'd to that token, we'd consume until EOF. We need to * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}. * In this case, for input "[]", LA(1) is in this set so we would * not consume anything and after printing an error rule c would * return normally. It would not find the required '^' though. * At this point, it gets a mismatched token error and throws an * exception (since LA(1) is not in the viable following token * set). The rule exception handler tries to recover, but finds * the same recovery set and doesn't consume anything. Rule b * exits normally returning to rule a. Now it finds the ']' (and * with the successful match exits errorRecovery mode). * * So, you cna see that the parser walks up call chain looking * for the token that was a member of the recovery set. * * Errors are not generated in errorRecovery mode. * * ANTLR's error recovery mechanism is based upon original ideas: * * "Algorithms + Data Structures = Programs" by Niklaus Wirth * * and * * "A note on error recovery in recursive descent parsers": * http://portal.acm.org/citation.cfm?id=947902.947905 * * Later, Josef Grosch had some good ideas: * * "Efficient and Comfortable Error Recovery in Recursive Descent * Parsers": * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip * * Like Grosch I implemented local FOLLOW sets that are combined * at run-time upon error to avoid overhead during parsing. */ protected virtual BitSet ComputeErrorRecoverySet() { return CombineFollows( false ); } /** <summary> * Compute the context-sensitive FOLLOW set for current rule. * This is set of token types that can follow a specific rule * reference given a specific call chain. You get the set of * viable tokens that can possibly come next (lookahead depth 1) * given the current call chain. Contrast this with the * definition of plain FOLLOW for rule r: * </summary> * * FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)} * * where x in T* and alpha, beta in V*; T is set of terminals and * V is the set of terminals and nonterminals. In other words, * FOLLOW(r) is the set of all tokens that can possibly follow * references to r in *any* sentential form (context). At * runtime, however, we know precisely which context applies as * we have the call chain. We may compute the exact (rather * than covering superset) set of following tokens. * * For example, consider grammar: * * stat : ID '=' expr ';' // FOLLOW(stat)=={EOF} * | "return" expr '.' * ; * expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'} * atom : INT // FOLLOW(atom)=={'+',')',';','.'} * | '(' expr ')' * ; * * The FOLLOW sets are all inclusive whereas context-sensitive * FOLLOW sets are precisely what could follow a rule reference. * For input input "i=(3);", here is the derivation: * * stat => ID '=' expr ';' * => ID '=' atom ('+' atom)* ';' * => ID '=' '(' expr ')' ('+' atom)* ';' * => ID '=' '(' atom ')' ('+' atom)* ';' * => ID '=' '(' INT ')' ('+' atom)* ';' * => ID '=' '(' INT ')' ';' * * At the "3" token, you'd have a call chain of * * stat -> expr -> atom -> expr -> atom * * What can follow that specific nested ref to atom? Exactly ')' * as you can see by looking at the derivation of this specific * input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}. * * You want the exact viable token set when recovering from a * token mismatch. Upon token mismatch, if LA(1) is member of * the viable next token set, then you know there is most likely * a missing token in the input stream. "Insert" one by just not * throwing an exception. */ protected virtual BitSet ComputeContextSensitiveRuleFOLLOW() { return CombineFollows( true ); } // what is exact? it seems to only add sets from above on stack // if EOR is in set i. When it sees a set w/o EOR, it stops adding. // Why would we ever want them all? Maybe no viable alt instead of // mismatched token? protected virtual BitSet CombineFollows(bool exact) { int top = state._fsp; BitSet followSet = new BitSet(); for ( int i = top; i >= 0; i-- ) { BitSet localFollowSet = (BitSet)state.following[i]; /* System.out.println("local follow depth "+i+"="+ localFollowSet.toString(getTokenNames())+")"); */ followSet.OrInPlace( localFollowSet ); if ( exact ) { // can we see end of rule? if ( localFollowSet.Member( TokenTypes.EndOfRule ) ) { // Only leave EOR in set if at top (start rule); this lets // us know if have to include follow(start rule); i.e., EOF if ( i > 0 ) { followSet.Remove( TokenTypes.EndOfRule ); } } else { // can't see end of rule, quit break; } } } return followSet; } /** <summary>Attempt to recover from a single missing or extra token.</summary> * * EXTRA TOKEN * * LA(1) is not what we are looking for. If LA(2) has the right token, * however, then assume LA(1) is some extra spurious token. Delete it * and LA(2) as if we were doing a normal match(), which advances the * input. * * MISSING TOKEN * * If current token is consistent with what could come after * ttype then it is ok to "insert" the missing token, else throw * exception For example, Input "i=(3;" is clearly missing the * ')'. When the parser returns from the nested call to expr, it * will have call chain: * * stat -> expr -> atom * * and it will be trying to match the ')' at this point in the * derivation: * * => ID '=' '(' INT ')' ('+' atom)* ';' * ^ * match() will see that ';' doesn't match ')' and report a * mismatched token error. To recover, it sees that LA(1)==';' * is in the set of tokens that can follow the ')' token * reference in rule atom. It can assume that you forgot the ')'. */ protected virtual object RecoverFromMismatchedToken( IIntStream input, int ttype, BitSet follow ) { RecognitionException e = null; // if next token is what we are looking for then "delete" this token if ( MismatchIsUnwantedToken( input, ttype ) ) { e = new UnwantedTokenException( ttype, input, TokenNames ); /* System.err.println("recoverFromMismatchedToken deleting "+ ((TokenStream)input).LT(1)+ " since "+((TokenStream)input).LT(2)+" is what we want"); */ BeginResync(); input.Consume(); // simply delete extra token EndResync(); ReportError( e ); // report after consuming so AW sees the token in the exception // we want to return the token we're actually matching object matchedSymbol = GetCurrentInputSymbol( input ); input.Consume(); // move past ttype token as if all were ok return matchedSymbol; } // can't recover with single token deletion, try insertion if ( MismatchIsMissingToken( input, follow ) ) { object inserted = GetMissingSymbol( input, e, ttype, follow ); e = new MissingTokenException( ttype, input, inserted ); ReportError( e ); // report after inserting so AW sees the token in the exception return inserted; } // even that didn't work; must throw the exception e = new MismatchedTokenException(ttype, input, TokenNames); throw e; } /** Not currently used */ public virtual object RecoverFromMismatchedSet( IIntStream input, RecognitionException e, BitSet follow ) { if ( MismatchIsMissingToken( input, follow ) ) { // System.out.println("missing token"); ReportError( e ); // we don't know how to conjure up a token for sets yet return GetMissingSymbol( input, e, TokenTypes.Invalid, follow ); } // TODO do single token deletion like above for Token mismatch throw e; } /** <summary> * Match needs to return the current input symbol, which gets put * into the label for the associated token ref; e.g., x=ID. Token * and tree parsers need to return different objects. Rather than test * for input stream type or change the IntStream interface, I use * a simple method to ask the recognizer to tell me what the current * input symbol is. * </summary> * * <remarks>This is ignored for lexers.</remarks> */ protected virtual object GetCurrentInputSymbol( IIntStream input ) { return null; } /** <summary>Conjure up a missing token during error recovery.</summary> * * <remarks> * The recognizer attempts to recover from single missing * symbols. But, actions might refer to that missing symbol. * For example, x=ID {f($x);}. The action clearly assumes * that there has been an identifier matched previously and that * $x points at that token. If that token is missing, but * the next token in the stream is what we want we assume that * this token is missing and we keep going. Because we * have to return some token to replace the missing token, * we have to conjure one up. This method gives the user control * over the tokens returned for missing tokens. Mostly, * you will want to create something special for identifier * tokens. For literals such as '{' and ',', the default * action in the parser or tree parser works. It simply creates * a CommonToken of the appropriate type. The text will be the token. * If you change what tokens must be created by the lexer, * override this method to create the appropriate tokens. * </remarks> */ protected virtual object GetMissingSymbol( IIntStream input, RecognitionException e, int expectedTokenType, BitSet follow ) { return null; } public virtual void ConsumeUntil( IIntStream input, int tokenType ) { //System.out.println("consumeUntil "+tokenType); int ttype = input.LA( 1 ); while ( ttype != TokenTypes.EndOfFile && ttype != tokenType ) { input.Consume(); ttype = input.LA( 1 ); } } /** <summary>Consume tokens until one matches the given token set</summary> */ public virtual void ConsumeUntil( IIntStream input, BitSet set ) { //System.out.println("consumeUntil("+set.toString(getTokenNames())+")"); int ttype = input.LA( 1 ); while ( ttype != TokenTypes.EndOfFile && !set.Member( ttype ) ) { //System.out.println("consume during recover LA(1)="+getTokenNames()[input.LA(1)]); input.Consume(); ttype = input.LA( 1 ); } } /** <summary>Push a rule's follow set using our own hardcoded stack</summary> */ protected void PushFollow( BitSet fset ) { if ( ( state._fsp + 1 ) >= state.following.Length ) { Array.Resize(ref state.following, state.following.Length * 2); } state.following[++state._fsp] = fset; } protected void PopFollow() { state._fsp--; } +#if !PORTABLE /** <summary> * Return List<String> of the rules in your parser instance * leading up to a call to this method. You could override if * you want more details such as the file/line info of where * in the parser java code a rule is invoked. * </summary> * * <remarks> * This is very useful for error messages and for context-sensitive * error recovery. * </remarks> */ public virtual IList<string> GetRuleInvocationStack() { return GetRuleInvocationStack( new StackTrace(true) ); } /** <summary> * A more general version of GetRuleInvocationStack where you can * pass in the StackTrace of, for example, a RecognitionException * to get it's rule stack trace. * </summary> */ public static IList<string> GetRuleInvocationStack(StackTrace trace) { if (trace == null) throw new ArgumentNullException("trace"); List<string> rules = new List<string>(); StackFrame[] stack = trace.GetFrames() ?? new StackFrame[0]; for (int i = stack.Length - 1; i >= 0; i--) { StackFrame frame = stack[i]; MethodBase method = frame.GetMethod(); GrammarRuleAttribute[] attributes = (GrammarRuleAttribute[])method.GetCustomAttributes(typeof(GrammarRuleAttribute), true); if (attributes != null && attributes.Length > 0) rules.Add(attributes[0].Name); } return rules; } +#endif public virtual int BacktrackingLevel { get { return state.backtracking; } set { state.backtracking = value; } } /** <summary>Return whether or not a backtracking attempt failed.</summary> */ public virtual bool Failed { get { return state.failed; } } /** <summary> * Used to print out token names like ID during debugging and * error reporting. The generated parsers implement a method * that overrides this to point to their String[] tokenNames. * </summary> */ public virtual string[] TokenNames { get { return null; } } /** <summary> * For debugging and other purposes, might want the grammar name. * Have ANTLR generate an implementation for this method. * </summary> */ public virtual string GrammarFileName { get { return null; } } public abstract string SourceName { get; } /** <summary> * A convenience method for use most often with template rewrites. * Convert a List<Token> to List<String> * </summary> */ public virtual List<string> ToStrings( ICollection<IToken> tokens ) { if ( tokens == null ) return null; List<string> strings = new List<string>( tokens.Count ); foreach ( IToken token in tokens ) { strings.Add( token.Text ); } return strings; } /** <summary> * Given a rule number and a start token index number, return * MEMO_RULE_UNKNOWN if the rule has not parsed input starting from * start index. If this rule has parsed input starting from the * start index before, then return where the rule stopped parsing. * It returns the index of the last token matched by the rule. * </summary> * * <remarks> * For now we use a hashtable and just the slow Object-based one. * Later, we can make a special one for ints and also one that * tosses out data after we commit past input position i. * </remarks> */ public virtual int GetRuleMemoization( int ruleIndex, int ruleStartIndex ) { if ( state.ruleMemo[ruleIndex] == null ) { state.ruleMemo[ruleIndex] = new Dictionary<int, int>(); } int stopIndex; if ( !state.ruleMemo[ruleIndex].TryGetValue( ruleStartIndex, out stopIndex ) ) return MemoRuleUnknown; return stopIndex; } /** <summary> * Has this rule already parsed input at the current index in the * input stream? Return the stop token index or MEMO_RULE_UNKNOWN. * If we attempted but failed to parse properly before, return * MEMO_RULE_FAILED. * </summary> * * <remarks> * This method has a side-effect: if we have seen this input for * this rule and successfully parsed before, then seek ahead to * 1 past the stop token matched for this rule last time. * </remarks> */ public virtual bool AlreadyParsedRule( IIntStream input, int ruleIndex ) { int stopIndex = GetRuleMemoization( ruleIndex, input.Index ); if ( stopIndex == MemoRuleUnknown ) { return false; } if ( stopIndex == MemoRuleFailed ) { //System.out.println("rule "+ruleIndex+" will never succeed"); state.failed = true; } else { //System.out.println("seen rule "+ruleIndex+" before; skipping ahead to @"+(stopIndex+1)+" failed="+state.failed); input.Seek( stopIndex + 1 ); // jump to one past stop token } return true; } /** <summary> * Record whether or not this rule parsed the input at this position * successfully. Use a standard java hashtable for now. * </summary> */ public virtual void Memoize( IIntStream input, int ruleIndex, int ruleStartIndex ) { int stopTokenIndex = state.failed ? MemoRuleFailed : input.Index - 1; if ( state.ruleMemo == null ) { if (TraceDestination != null) TraceDestination.WriteLine( "!!!!!!!!! memo array is null for " + GrammarFileName ); } if ( ruleIndex >= state.ruleMemo.Length ) { if (TraceDestination != null) TraceDestination.WriteLine("!!!!!!!!! memo size is " + state.ruleMemo.Length + ", but rule index is " + ruleIndex); } if ( state.ruleMemo[ruleIndex] != null ) { state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex; } } /** <summary>return how many rule/input-index pairs there are in total.</summary> * TODO: this includes synpreds. :( */ public virtual int GetRuleMemoizationCacheSize() { int n = 0; for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) { var ruleMap = state.ruleMemo[i]; if ( ruleMap != null ) { n += ruleMap.Count; // how many input indexes are recorded? } } return n; } public virtual void TraceIn(string ruleName, int ruleIndex, object inputSymbol) { if (TraceDestination == null) return; TraceDestination.Write("enter " + ruleName + " " + inputSymbol); if (state.backtracking > 0) { TraceDestination.Write(" backtracking=" + state.backtracking); } TraceDestination.WriteLine(); } public virtual void TraceOut(string ruleName, int ruleIndex, object inputSymbol) { if (TraceDestination == null) return; TraceDestination.Write("exit " + ruleName + " " + inputSymbol); if (state.backtracking > 0) { TraceDestination.Write(" backtracking=" + state.backtracking); if (state.failed) TraceDestination.Write(" failed"); else TraceDestination.Write(" succeeded"); } TraceDestination.WriteLine(); } #region Debugging support public virtual IDebugEventListener DebugListener { get { return null; } } [Conditional("ANTLR_DEBUG")] protected virtual void DebugEnterRule(string grammarFileName, string ruleName) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.EnterRule(grammarFileName, ruleName); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugExitRule(string grammarFileName, string ruleName) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.ExitRule(grammarFileName, ruleName); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugEnterSubRule(int decisionNumber) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.EnterSubRule(decisionNumber); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugExitSubRule(int decisionNumber) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.ExitSubRule(decisionNumber); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugEnterAlt(int alt) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.EnterAlt(alt); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugEnterDecision(int decisionNumber, bool couldBacktrack) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.EnterDecision(decisionNumber, couldBacktrack); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugExitDecision(int decisionNumber) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.ExitDecision(decisionNumber); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugLocation(int line, int charPositionInLine) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.Location(line, charPositionInLine); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugSemanticPredicate(bool result, string predicate) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.SemanticPredicate(result, predicate); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugBeginBacktrack(int level) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.BeginBacktrack(level); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugEndBacktrack(int level, bool successful) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.EndBacktrack(level, successful); } [Conditional("ANTLR_DEBUG")] protected virtual void DebugRecognitionException(RecognitionException ex) { IDebugEventListener dbg = DebugListener; if (dbg != null) dbg.RecognitionException(ex); } #endregion } } diff --git a/Runtime/Antlr3.Runtime/DFA.cs b/Runtime/Antlr3.Runtime/DFA.cs index 76c4083..ff1e741 100644 --- a/Runtime/Antlr3.Runtime/DFA.cs +++ b/Runtime/Antlr3.Runtime/DFA.cs @@ -1,318 +1,325 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using ConditionalAttribute = System.Diagnostics.ConditionalAttribute; - using Console = System.Console; using IDebugEventListener = Antlr.Runtime.Debug.IDebugEventListener; +#if !PORTABLE + using Console = System.Console; +#endif + public delegate int SpecialStateTransitionHandler( DFA dfa, int s, IIntStream input ); /** <summary>A DFA implemented as a set of transition tables.</summary> * * <remarks> * Any state that has a semantic predicate edge is special; those states * are generated with if-then-else structures in a specialStateTransition() * which is generated by cyclicDFA template. * * There are at most 32767 states (16-bit signed short). * Could get away with byte sometimes but would have to generate different * types and the simulation code too. For a point of reference, the Java * lexer's Tokens rule DFA has 326 states roughly. * </remarks> */ public class DFA { protected short[] eot; protected short[] eof; protected char[] min; protected char[] max; protected short[] accept; protected short[] special; protected short[][] transition; protected int decisionNumber; /** <summary>Which recognizer encloses this DFA? Needed to check backtracking</summary> */ protected BaseRecognizer recognizer; public bool debug = false; public DFA() : this(SpecialStateTransitionDefault) { } public DFA( SpecialStateTransitionHandler specialStateTransition ) { this.SpecialStateTransition = specialStateTransition ?? SpecialStateTransitionDefault; } public virtual string Description { get { return "n/a"; } } /** <summary> * From the input stream, predict what alternative will succeed * using this DFA (representing the covering regular approximation * to the underlying CFL). Return an alternative number 1..n. Throw * an exception upon error. * </summary> */ public virtual int Predict( IIntStream input ) { if (input == null) throw new ArgumentNullException("input"); DfaDebugMessage("Enter DFA.Predict for decision {0}", decisionNumber); int mark = input.Mark(); // remember where decision started in input int s = 0; // we always start at s0 try { while (true) { DfaDebugMessage("DFA {0} state {1} LA(1)={2}({3}), index={4}", decisionNumber, s, (char)input.LA(1), input.LA(1), input.Index); int specialState = special[s]; if ( specialState >= 0 ) { DfaDebugMessage("DFA {0} state {1} is special state {2}", decisionNumber, s, specialState); s = SpecialStateTransition( this, specialState, input ); DfaDebugMessage("DFA {0} returns from special state {1} to {2}", decisionNumber, specialState, s); if ( s == -1 ) { NoViableAlt( s, input ); return 0; } input.Consume(); continue; } if ( accept[s] >= 1 ) { DfaDebugMessage("accept; predict {0} from state {1}", accept[s], s); return accept[s]; } // look for a normal char transition char c = (char)input.LA( 1 ); // -1 == \uFFFF, all tokens fit in 65000 space if ( c >= min[s] && c <= max[s] ) { int snext = transition[s][c - min[s]]; // move to next state if ( snext < 0 ) { // was in range but not a normal transition // must check EOT, which is like the else clause. // eot[s]>=0 indicates that an EOT edge goes to another // state. if ( eot[s] >= 0 ) { // EOT Transition to accept state? DfaDebugMessage("EOT transition"); s = eot[s]; input.Consume(); // TODO: I had this as return accept[eot[s]] // which assumed here that the EOT edge always // went to an accept...faster to do this, but // what about predicated edges coming from EOT // target? continue; } NoViableAlt( s, input ); return 0; } s = snext; input.Consume(); continue; } if ( eot[s] >= 0 ) { // EOT Transition? DfaDebugMessage("EOT transition"); s = eot[s]; input.Consume(); continue; } if ( c == unchecked( (char)TokenTypes.EndOfFile ) && eof[s] >= 0 ) { // EOF Transition to accept state? DfaDebugMessage("accept via EOF; predict {0} from {1}", accept[eof[s]], eof[s]); return accept[eof[s]]; } // not in range and not EOF/EOT, must be invalid symbol DfaDebugInvalidSymbol(s); NoViableAlt( s, input ); return 0; } } finally { input.Rewind( mark ); } } [Conditional("DEBUG_DFA")] private void DfaDebugMessage(string format, params object[] args) { +#if !PORTABLE Console.Error.WriteLine(format, args); +#endif } [Conditional("DEBUG_DFA")] private void DfaDebugInvalidSymbol(int s) { +#if !PORTABLE Console.Error.WriteLine("min[{0}]={1}", s, min[s]); Console.Error.WriteLine("max[{0}]={1}", s, max[s]); Console.Error.WriteLine("eot[{0}]={1}", s, eot[s]); Console.Error.WriteLine("eof[{0}]={1}", s, eof[s]); for (int p = 0; p < transition[s].Length; p++) Console.Error.Write(transition[s][p] + " "); Console.Error.WriteLine(); +#endif } protected virtual void NoViableAlt( int s, IIntStream input ) { if ( recognizer.state.backtracking > 0 ) { recognizer.state.failed = true; return; } NoViableAltException nvae = new NoViableAltException( Description, decisionNumber, s, input ); Error( nvae ); throw nvae; } /** <summary>A hook for debugging interface</summary> */ public virtual void Error( NoViableAltException nvae ) { } public SpecialStateTransitionHandler SpecialStateTransition { get; private set; } //public virtual int specialStateTransition( int s, IntStream input ) //{ // return -1; //} static int SpecialStateTransitionDefault( DFA dfa, int s, IIntStream input ) { return -1; } /** <summary> * Given a String that has a run-length-encoding of some unsigned shorts * like "\1\2\3\9", convert to short[] {2,9,9,9}. We do this to avoid * static short[] which generates so much init code that the class won't * compile. :( * </summary> */ public static short[] UnpackEncodedString( string encodedString ) { // walk first to find how big it is. int size = 0; for ( int i = 0; i < encodedString.Length; i += 2 ) { size += encodedString[i]; } short[] data = new short[size]; int di = 0; for ( int i = 0; i < encodedString.Length; i += 2 ) { char n = encodedString[i]; char v = encodedString[i + 1]; // add v n times to data for ( int j = 1; j <= n; j++ ) { data[di++] = (short)v; } } return data; } /** <summary>Hideous duplication of code, but I need different typed arrays out :(</summary> */ public static char[] UnpackEncodedStringToUnsignedChars( string encodedString ) { // walk first to find how big it is. int size = 0; for ( int i = 0; i < encodedString.Length; i += 2 ) { size += encodedString[i]; } char[] data = new char[size]; int di = 0; for ( int i = 0; i < encodedString.Length; i += 2 ) { char n = encodedString[i]; char v = encodedString[i + 1]; // add v n times to data for ( int j = 1; j <= n; j++ ) { data[di++] = v; } } return data; } [Conditional("ANTLR_DEBUG")] protected virtual void DebugRecognitionException(RecognitionException ex) { IDebugEventListener dbg = recognizer.DebugListener; if (dbg != null) dbg.RecognitionException(ex); } } } diff --git a/Runtime/Antlr3.Runtime/EarlyExitException.cs b/Runtime/Antlr3.Runtime/EarlyExitException.cs index f2f6e81..9e08fb4 100644 --- a/Runtime/Antlr3.Runtime/EarlyExitException.cs +++ b/Runtime/Antlr3.Runtime/EarlyExitException.cs @@ -1,104 +1,111 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>The recognizer did not match anything for a (..)+ loop.</summary> */ [System.Serializable] public class EarlyExitException : RecognitionException { private readonly int _decisionNumber; public EarlyExitException() { } public EarlyExitException(string message) : base(message) { } public EarlyExitException(string message, Exception innerException) : base(message, innerException) { } public EarlyExitException(int decisionNumber, IIntStream input) : base(input) { this._decisionNumber = decisionNumber; } public EarlyExitException(string message, int decisionNumber, IIntStream input) : base(message, input) { this._decisionNumber = decisionNumber; } public EarlyExitException(string message, int decisionNumber, IIntStream input, Exception innerException) : base(message, input, innerException) { this._decisionNumber = decisionNumber; } +#if !PORTABLE protected EarlyExitException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._decisionNumber = info.GetInt32("DecisionNumber"); } +#endif public int DecisionNumber { get { return _decisionNumber; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("DecisionNumber", DecisionNumber); } +#endif } } diff --git a/Runtime/Antlr3.Runtime/FailedPredicateException.cs b/Runtime/Antlr3.Runtime/FailedPredicateException.cs index add3f58..c7bfaaf 100644 --- a/Runtime/Antlr3.Runtime/FailedPredicateException.cs +++ b/Runtime/Antlr3.Runtime/FailedPredicateException.cs @@ -1,129 +1,136 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary> * A semantic predicate failed during validation. Validation of predicates * occurs when normally parsing the alternative just like matching a token. * Disambiguating predicate evaluation occurs when we hoist a predicate into * a prediction decision. * </summary> */ [System.Serializable] public class FailedPredicateException : RecognitionException { private readonly string _ruleName; private readonly string _predicateText; public FailedPredicateException() { } public FailedPredicateException(string message) : base(message) { } public FailedPredicateException(string message, Exception innerException) : base(message, innerException) { } public FailedPredicateException(IIntStream input, string ruleName, string predicateText) : base(input) { this._ruleName = ruleName; this._predicateText = predicateText; } public FailedPredicateException(string message, IIntStream input, string ruleName, string predicateText) : base(message, input) { this._ruleName = ruleName; this._predicateText = predicateText; } public FailedPredicateException(string message, IIntStream input, string ruleName, string predicateText, Exception innerException) : base(message, input, innerException) { this._ruleName = ruleName; this._predicateText = predicateText; } +#if !PORTABLE protected FailedPredicateException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._ruleName = info.GetString("RuleName"); this._predicateText = info.GetString("PredicateText"); } +#endif public string RuleName { get { return _ruleName; } } public string PredicateText { get { return _predicateText; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("RuleName", _ruleName); info.AddValue("PredicateText", _predicateText); } +#endif public override string ToString() { return "FailedPredicateException(" + RuleName + ",{" + PredicateText + "}?)"; } } } diff --git a/Runtime/Antlr3.Runtime/Misc/RegexOptionsHelper.cs b/Runtime/Antlr3.Runtime/Misc/RegexOptionsHelper.cs new file mode 100644 index 0000000..e357e6c --- /dev/null +++ b/Runtime/Antlr3.Runtime/Misc/RegexOptionsHelper.cs @@ -0,0 +1,23 @@ +namespace Antlr.Runtime.Misc +{ + using System.Text.RegularExpressions; + +#if PORTABLE + using System; +#endif + + internal static class RegexOptionsHelper + { + public static readonly RegexOptions Compiled; + + static RegexOptionsHelper() + { +#if !PORTABLE + Compiled = RegexOptions.Compiled; +#else + if (!Enum.TryParse("Compiled", out Compiled)) + Compiled = RegexOptions.None; +#endif + } + } +} diff --git a/Runtime/Antlr3.Runtime/MismatchedNotSetException.cs b/Runtime/Antlr3.Runtime/MismatchedNotSetException.cs index b6ebc8f..a0ec39a 100644 --- a/Runtime/Antlr3.Runtime/MismatchedNotSetException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedNotSetException.cs @@ -1,81 +1,86 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif [System.Serializable] public class MismatchedNotSetException : MismatchedSetException { public MismatchedNotSetException() { } public MismatchedNotSetException(string message) : base(message) { } public MismatchedNotSetException(string message, Exception innerException) : base(message, innerException) { } public MismatchedNotSetException(BitSet expecting, IIntStream input) : base(expecting, input) { } public MismatchedNotSetException(string message, BitSet expecting, IIntStream input) : base(message, expecting, input) { } public MismatchedNotSetException(string message, BitSet expecting, IIntStream input, Exception innerException) : base(message, expecting, input, innerException) { } +#if !PORTABLE protected MismatchedNotSetException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif public override string ToString() { return "MismatchedNotSetException(" + UnexpectedType + "!=" + Expecting + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedRangeException.cs b/Runtime/Antlr3.Runtime/MismatchedRangeException.cs index c714aef..209e586 100644 --- a/Runtime/Antlr3.Runtime/MismatchedRangeException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedRangeException.cs @@ -1,122 +1,129 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif [System.Serializable] public class MismatchedRangeException : RecognitionException { private readonly int _a; private readonly int _b; public MismatchedRangeException() { } public MismatchedRangeException(string message) : base(message) { } public MismatchedRangeException(string message, Exception innerException) : base(message, innerException) { } public MismatchedRangeException(int a, int b, IIntStream input) : base(input) { this._a = a; this._b = b; } public MismatchedRangeException(string message, int a, int b, IIntStream input) : base(message, input) { this._a = a; this._b = b; } public MismatchedRangeException(string message, int a, int b, IIntStream input, Exception innerException) : base(message, input, innerException) { this._a = a; this._b = b; } +#if !PORTABLE protected MismatchedRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._a = info.GetInt32("A"); this._b = info.GetInt32("B"); } +#endif public int A { get { return _a; } } public int B { get { return _b; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("A", _a); info.AddValue("B", _b); } +#endif public override string ToString() { return "MismatchedRangeException(" + UnexpectedType + " not in [" + A + "," + B + "])"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedSetException.cs b/Runtime/Antlr3.Runtime/MismatchedSetException.cs index 10baecf..0e4bfce 100644 --- a/Runtime/Antlr3.Runtime/MismatchedSetException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedSetException.cs @@ -1,108 +1,115 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif [System.Serializable] public class MismatchedSetException : RecognitionException { private readonly BitSet _expecting; public MismatchedSetException() { } public MismatchedSetException(string message) : base(message) { } public MismatchedSetException(string message, Exception innerException) : base(message, innerException) { } public MismatchedSetException( BitSet expecting, IIntStream input ) : base( input ) { this._expecting = expecting; } public MismatchedSetException(string message, BitSet expecting, IIntStream input) : base(message, input) { this._expecting = expecting; } public MismatchedSetException(string message, BitSet expecting, IIntStream input, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; } +#if !PORTABLE protected MismatchedSetException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = (BitSet)info.GetValue("Expecting", typeof(BitSet)); } +#endif public BitSet Expecting { get { return _expecting; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); } +#endif public override string ToString() { return "MismatchedSetException(" + UnexpectedType + "!=" + Expecting + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedTokenException.cs b/Runtime/Antlr3.Runtime/MismatchedTokenException.cs index 55c9aab..3785f0f 100644 --- a/Runtime/Antlr3.Runtime/MismatchedTokenException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedTokenException.cs @@ -1,139 +1,146 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using System.Collections.ObjectModel; using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>A mismatched char or Token or tree node</summary> */ [System.Serializable] public class MismatchedTokenException : RecognitionException { private readonly int _expecting = TokenTypes.Invalid; private readonly ReadOnlyCollection<string> _tokenNames; public MismatchedTokenException() { } public MismatchedTokenException(string message) : base(message) { } public MismatchedTokenException(string message, Exception innerException) : base(message, innerException) { } public MismatchedTokenException(int expecting, IIntStream input) : this(expecting, input, null) { } public MismatchedTokenException(int expecting, IIntStream input, IList<string> tokenNames) : base(input) { this._expecting = expecting; if (tokenNames != null) - this._tokenNames = new List<string>(tokenNames).AsReadOnly(); + this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames) : base(message, input) { this._expecting = expecting; if (tokenNames != null) - this._tokenNames = new List<string>(tokenNames).AsReadOnly(); + this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; if (tokenNames != null) - this._tokenNames = new List<string>(tokenNames).AsReadOnly(); + this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames)); } +#if !PORTABLE protected MismatchedTokenException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = info.GetInt32("Expecting"); this._tokenNames = new ReadOnlyCollection<string>((string[])info.GetValue("TokenNames", typeof(string[]))); } +#endif public int Expecting { get { return _expecting; } } public ReadOnlyCollection<string> TokenNames { get { return _tokenNames; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); info.AddValue("TokenNames", (_tokenNames != null) ? new List<string>(_tokenNames).ToArray() : default(string[])); } +#endif public override string ToString() { int unexpectedType = UnexpectedType; string unexpected = ( TokenNames != null && unexpectedType >= 0 && unexpectedType < TokenNames.Count ) ? TokenNames[unexpectedType] : unexpectedType.ToString(); string expected = ( TokenNames != null && Expecting >= 0 && Expecting < TokenNames.Count ) ? TokenNames[Expecting] : Expecting.ToString(); return "MismatchedTokenException(" + unexpected + "!=" + expected + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs b/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs index 2a33279..9d33b60 100644 --- a/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs +++ b/Runtime/Antlr3.Runtime/MismatchedTreeNodeException.cs @@ -1,109 +1,116 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; using ITreeNodeStream = Antlr.Runtime.Tree.ITreeNodeStream; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif [System.Serializable] public class MismatchedTreeNodeException : RecognitionException { private readonly int _expecting; public MismatchedTreeNodeException() { } public MismatchedTreeNodeException(string message) : base(message) { } public MismatchedTreeNodeException(string message, Exception innerException) : base(message, innerException) { } public MismatchedTreeNodeException( int expecting, ITreeNodeStream input ) : base( input ) { this._expecting = expecting; } public MismatchedTreeNodeException(string message, int expecting, ITreeNodeStream input) : base(message, input) { this._expecting = expecting; } public MismatchedTreeNodeException(string message, int expecting, ITreeNodeStream input, Exception innerException) : base(message, input, innerException) { this._expecting = expecting; } +#if !PORTABLE protected MismatchedTreeNodeException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._expecting = info.GetInt32("Expecting"); } +#endif public int Expecting { get { return _expecting; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Expecting", _expecting); } +#endif public override string ToString() { return "MismatchedTreeNodeException(" + UnexpectedType + "!=" + Expecting + ")"; } } } diff --git a/Runtime/Antlr3.Runtime/MissingTokenException.cs b/Runtime/Antlr3.Runtime/MissingTokenException.cs index 7a9cba1..8d99370 100644 --- a/Runtime/Antlr3.Runtime/MissingTokenException.cs +++ b/Runtime/Antlr3.Runtime/MissingTokenException.cs @@ -1,113 +1,118 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary> * We were expecting a token but it's not found. The current token * is actually what we wanted next. Used for tree node errors too. * </summary> */ [System.Serializable] public class MissingTokenException : MismatchedTokenException { private readonly object _inserted; public MissingTokenException() { } public MissingTokenException(string message) : base(message) { } public MissingTokenException(string message, Exception innerException) : base(message, innerException) { } public MissingTokenException(int expecting, IIntStream input, object inserted) : this(expecting, input, inserted, null) { } public MissingTokenException(int expecting, IIntStream input, object inserted, IList<string> tokenNames) : base(expecting, input, tokenNames) { this._inserted = inserted; } public MissingTokenException(string message, int expecting, IIntStream input, object inserted, IList<string> tokenNames) : base(message, expecting, input, tokenNames) { this._inserted = inserted; } public MissingTokenException(string message, int expecting, IIntStream input, object inserted, IList<string> tokenNames, Exception innerException) : base(message, expecting, input, tokenNames, innerException) { this._inserted = inserted; } +#if !PORTABLE protected MissingTokenException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif public virtual int MissingType { get { return Expecting; } } public override string ToString() { if (_inserted != null && Token != null) { return "MissingTokenException(inserted " + _inserted + " at " + Token.Text + ")"; } if (Token != null) { return "MissingTokenException(at " + Token.Text + ")"; } return "MissingTokenException"; } } } diff --git a/Runtime/Antlr3.Runtime/NoViableAltException.cs b/Runtime/Antlr3.Runtime/NoViableAltException.cs index 4f37001..897f67c 100644 --- a/Runtime/Antlr3.Runtime/NoViableAltException.cs +++ b/Runtime/Antlr3.Runtime/NoViableAltException.cs @@ -1,165 +1,172 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif [System.Serializable] public class NoViableAltException : RecognitionException { private readonly string _grammarDecisionDescription; private readonly int _decisionNumber; private readonly int _stateNumber; public NoViableAltException() { } public NoViableAltException(string grammarDecisionDescription) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string message, string grammarDecisionDescription) : base(message) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string message, string grammarDecisionDescription, Exception innerException) : base(message, innerException) { this._grammarDecisionDescription = grammarDecisionDescription; } public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input) : this(grammarDecisionDescription, decisionNumber, stateNumber, input, 1) { } public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k) : base(input, k) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input) : this(message, grammarDecisionDescription, decisionNumber, stateNumber, input, 1) { } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k) : base(message, input, k) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, Exception innerException) : this(message, grammarDecisionDescription, decisionNumber, stateNumber, input, 1, innerException) { } public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, int k, Exception innerException) : base(message, input, k, innerException) { this._grammarDecisionDescription = grammarDecisionDescription; this._decisionNumber = decisionNumber; this._stateNumber = stateNumber; } +#if !PORTABLE protected NoViableAltException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); this._grammarDecisionDescription = info.GetString("GrammarDecisionDescription"); this._decisionNumber = info.GetInt32("DecisionNumber"); this._stateNumber = info.GetInt32("StateNumber"); } +#endif public int DecisionNumber { get { return _decisionNumber; } } public string GrammarDecisionDescription { get { return _grammarDecisionDescription; } } public int StateNumber { get { return _stateNumber; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("GrammarDecisionDescription", _grammarDecisionDescription); info.AddValue("DecisionNumber", _decisionNumber); info.AddValue("StateNumber", _stateNumber); } +#endif public override string ToString() { if ( Input is ICharStream ) { return "NoViableAltException('" + (char)UnexpectedType + "'@[" + GrammarDecisionDescription + "])"; } else { return "NoViableAltException(" + UnexpectedType + "@[" + GrammarDecisionDescription + "])"; } } } } diff --git a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs index b823616..b55d54a 100644 --- a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs @@ -1,73 +1,78 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; -using System.Runtime.InteropServices; using System.Security; +#if !PORTABLE +using System.Runtime.InteropServices; +#endif + // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] [assembly: AllowPartiallyTrustedCallers] +#if !PORTABLE // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "7a0b4db7-f127-4cf5-ac2c-e294957efcd6" )] +#endif /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] [assembly: AssemblyFileVersion("3.5.0.3")] [assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Runtime/Antlr3.Runtime/RecognitionException.cs b/Runtime/Antlr3.Runtime/RecognitionException.cs index 007560d..f97d03e 100644 --- a/Runtime/Antlr3.Runtime/RecognitionException.cs +++ b/Runtime/Antlr3.Runtime/RecognitionException.cs @@ -1,474 +1,481 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using Antlr.Runtime.Tree; using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; using NotSupportedException = System.NotSupportedException; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>The root of the ANTLR exception hierarchy.</summary> * * <remarks> * To avoid English-only error messages and to generally make things * as flexible as possible, these exceptions are not created with strings, * but rather the information necessary to generate an error. Then * the various reporting methods in Parser and Lexer can be overridden * to generate a localized error message. For example, MismatchedToken * exceptions are built with the expected token type. * So, don't expect getMessage() to return anything. * * Note that as of Java 1.4, you can access the stack trace, which means * that you can compute the complete trace of rules from the start symbol. * This gives you considerable context information with which to generate * useful error messages. * * ANTLR generates code that throws exceptions upon recognition error and * also generates code to catch these exceptions in each rule. If you * want to quit upon first error, you can turn off the automatic error * handling mechanism using rulecatch action, but you still need to * override methods mismatch and recoverFromMismatchSet. * * In general, the recognition exceptions can track where in a grammar a * problem occurred and/or what was the expected input. While the parser * knows its state (such as current input symbol and line info) that * state can change before the exception is reported so current token index * is computed and stored at exception time. From this info, you can * perhaps print an entire line of input not just a single token, for example. * Better to just say the recognizer had a problem and then let the parser * figure out a fancy report. * </remarks> */ [System.Serializable] public class RecognitionException : Exception { /** <summary>What input stream did the error occur in?</summary> */ private IIntStream _input; /// <summary> /// What was the lookahead index when this exception was thrown? /// </summary> private int _k; /** <summary>What is index of token/char were we looking at when the error occurred?</summary> */ private int _index; /** <summary> * The current Token when an error occurred. Since not all streams * can retrieve the ith Token, we have to track the Token object. * For parsers. Even when it's a tree parser, token might be set. * </summary> */ private IToken _token; /** <summary> * If this is a tree parser exception, node is set to the node with * the problem. * </summary> */ private object _node; /** <summary>The current char when an error occurred. For lexers.</summary> */ private int _c; /** <summary> * Track the line (1-based) at which the error occurred in case this is * generated from a lexer. We need to track this since the * unexpected char doesn't carry the line info. * </summary> */ private int _line; /// <summary> /// The 0-based index into the line where the error occurred. /// </summary> private int _charPositionInLine; /** <summary> * If you are parsing a tree node stream, you will encounter som * imaginary nodes w/o line/col info. We now search backwards looking * for most recent token with line/col info, but notify getErrorHeader() * that info is approximate. * </summary> */ private bool _approximateLineInfo; /** <summary>Used for remote debugger deserialization</summary> */ public RecognitionException() : this("A recognition error occurred.", null, null) { } public RecognitionException(IIntStream input) : this("A recognition error occurred.", input, 1, null) { } public RecognitionException(IIntStream input, int k) : this("A recognition error occurred.", input, k, null) { } public RecognitionException(string message) : this(message, null, null) { } public RecognitionException(string message, IIntStream input) : this(message, input, 1, null) { } public RecognitionException(string message, IIntStream input, int k) : this(message, input, k, null) { } public RecognitionException(string message, Exception innerException) : this(message, null, innerException) { } public RecognitionException(string message, IIntStream input, Exception innerException) : this(message, input, 1, innerException) { } public RecognitionException(string message, IIntStream input, int k, Exception innerException) : base(message, innerException) { this._input = input; this._k = k; if (input != null) { this._index = input.Index + k - 1; if (input is ITokenStream) { this._token = ((ITokenStream)input).LT(k); this._line = _token.Line; this._charPositionInLine = _token.CharPositionInLine; } ITreeNodeStream tns = input as ITreeNodeStream; if (tns != null) { ExtractInformationFromTreeNodeStream(tns, k); } else { ICharStream charStream = input as ICharStream; if (charStream != null) { int mark = input.Mark(); try { for (int i = 0; i < k - 1; i++) input.Consume(); this._c = input.LA(1); this._line = ((ICharStream)input).Line; this._charPositionInLine = ((ICharStream)input).CharPositionInLine; } finally { input.Rewind(mark); } } else { this._c = input.LA(k); } } } } +#if !PORTABLE protected RecognitionException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); _index = info.GetInt32("Index"); _c = info.GetInt32("C"); _line = info.GetInt32("Line"); _charPositionInLine = info.GetInt32("CharPositionInLine"); _approximateLineInfo = info.GetBoolean("ApproximateLineInfo"); } +#endif /** <summary>Return the token type or char of the unexpected input element</summary> */ public virtual int UnexpectedType { get { if ( _input is ITokenStream ) { return _token.Type; } ITreeNodeStream treeNodeStream = _input as ITreeNodeStream; if ( treeNodeStream != null ) { ITreeAdaptor adaptor = treeNodeStream.TreeAdaptor; return adaptor.GetType( _node ); } return _c; } } public bool ApproximateLineInfo { get { return _approximateLineInfo; } protected set { _approximateLineInfo = value; } } public IIntStream Input { get { return _input; } protected set { _input = value; } } public int Lookahead { get { return _k; } } public IToken Token { get { return _token; } set { _token = value; } } public object Node { get { return _node; } protected set { _node = value; } } public int Character { get { return _c; } protected set { _c = value; } } public int Index { get { return _index; } protected set { _index = value; } } public int Line { get { return _line; } set { _line = value; } } public int CharPositionInLine { get { return _charPositionInLine; } set { _charPositionInLine = value; } } +#if !PORTABLE public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("Index", _index); info.AddValue("C", _c); info.AddValue("Line", _line); info.AddValue("CharPositionInLine", _charPositionInLine); info.AddValue("ApproximateLineInfo", _approximateLineInfo); } +#endif protected virtual void ExtractInformationFromTreeNodeStream(ITreeNodeStream input) { this._node = input.LT(1); object positionNode = null; IPositionTrackingStream positionTrackingStream = input as IPositionTrackingStream; if (positionTrackingStream != null) { positionNode = positionTrackingStream.GetKnownPositionElement(false); if (positionNode == null) { positionNode = positionTrackingStream.GetKnownPositionElement(true); this._approximateLineInfo = positionNode != null; } } ITokenStreamInformation streamInformation = input as ITokenStreamInformation; if (streamInformation != null) { IToken lastToken = streamInformation.LastToken; IToken lastRealToken = streamInformation.LastRealToken; if (lastRealToken != null) { this._token = lastRealToken; this._line = lastRealToken.Line; this._charPositionInLine = lastRealToken.CharPositionInLine; this._approximateLineInfo = lastRealToken.Equals(lastToken); } } else { ITreeAdaptor adaptor = input.TreeAdaptor; IToken payload = adaptor.GetToken(positionNode ?? _node); if (payload != null) { this._token = payload; if (payload.Line <= 0) { // imaginary node; no line/pos info; scan backwards int i = -1; object priorNode = input.LT(i); while (priorNode != null) { IToken priorPayload = adaptor.GetToken(priorNode); if (priorPayload != null && priorPayload.Line > 0) { // we found the most recent real line / pos info this._line = priorPayload.Line; this._charPositionInLine = priorPayload.CharPositionInLine; this._approximateLineInfo = true; break; } --i; try { priorNode = input.LT(i); } catch (NotSupportedException) { priorNode = null; } } } else { // node created from real token this._line = payload.Line; this._charPositionInLine = payload.CharPositionInLine; } } else if (this._node is Tree.ITree) { this._line = ((Tree.ITree)this._node).Line; this._charPositionInLine = ((Tree.ITree)this._node).CharPositionInLine; if (this._node is CommonTree) { this._token = ((CommonTree)this._node).Token; } } else { int type = adaptor.GetType(this._node); string text = adaptor.GetText(this._node); this._token = new CommonToken(type, text); } } } protected virtual void ExtractInformationFromTreeNodeStream(ITreeNodeStream input, int k) { int mark = input.Mark(); try { for (int i = 0; i < k - 1; i++) input.Consume(); ExtractInformationFromTreeNodeStream(input); } finally { input.Rewind(mark); } } } } diff --git a/Runtime/Antlr3.Runtime/System/ICloneable.cs b/Runtime/Antlr3.Runtime/System/ICloneable.cs new file mode 100644 index 0000000..32a5a62 --- /dev/null +++ b/Runtime/Antlr3.Runtime/System/ICloneable.cs @@ -0,0 +1,11 @@ +#if PORTABLE + +namespace System +{ + internal interface ICloneable + { + object Clone(); + } +} + +#endif diff --git a/Runtime/Antlr3.Runtime/System/NonSerializedAttribute.cs b/Runtime/Antlr3.Runtime/System/NonSerializedAttribute.cs new file mode 100644 index 0000000..87f9d71 --- /dev/null +++ b/Runtime/Antlr3.Runtime/System/NonSerializedAttribute.cs @@ -0,0 +1,11 @@ +#if PORTABLE + +namespace System +{ + [AttributeUsage(AttributeTargets.Field, Inherited=false)] + internal sealed class NonSerializedAttribute : Attribute + { + } +} + +#endif diff --git a/Runtime/Antlr3.Runtime/System/SerializableAttribute.cs b/Runtime/Antlr3.Runtime/System/SerializableAttribute.cs new file mode 100644 index 0000000..96ec30f --- /dev/null +++ b/Runtime/Antlr3.Runtime/System/SerializableAttribute.cs @@ -0,0 +1,11 @@ +#if PORTABLE + +namespace System +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)] + internal sealed class SerializableAttribute : Attribute + { + } +} + +#endif diff --git a/Runtime/Antlr3.Runtime/TokenRewriteStream.cs b/Runtime/Antlr3.Runtime/TokenRewriteStream.cs index e9ab4a9..7f1c759 100644 --- a/Runtime/Antlr3.Runtime/TokenRewriteStream.cs +++ b/Runtime/Antlr3.Runtime/TokenRewriteStream.cs @@ -1,729 +1,734 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using ArgumentException = System.ArgumentException; - using Console = System.Console; using Math = System.Math; using DebuggerDisplay = System.Diagnostics.DebuggerDisplayAttribute; using Exception = System.Exception; using StringBuilder = System.Text.StringBuilder; using Type = System.Type; +#if !PORTABLE + using Console = System.Console; +#endif + /** Useful for dumping out the input stream after doing some * augmentation or other manipulations. * * You can insert stuff, replace, and delete chunks. Note that the * operations are done lazily--only if you convert the buffer to a * String. This is very efficient because you are not moving data around * all the time. As the buffer of tokens is converted to strings, the * toString() method(s) check to see if there is an operation at the * current index. If so, the operation is done and then normal String * rendering continues on the buffer. This is like having multiple Turing * machine instruction streams (programs) operating on a single input tape. :) * * Since the operations are done lazily at toString-time, operations do not * screw up the token index values. That is, an insert operation at token * index i does not change the index values for tokens i+1..n-1. * * Because operations never actually alter the buffer, you may always get * the original token stream back without undoing anything. Since * the instructions are queued up, you can easily simulate transactions and * roll back any changes if there is an error just by removing instructions. * For example, * * CharStream input = new ANTLRFileStream("input"); * TLexer lex = new TLexer(input); * TokenRewriteStream tokens = new TokenRewriteStream(lex); * T parser = new T(tokens); * parser.startRule(); * * Then in the rules, you can execute * Token t,u; * ... * input.insertAfter(t, "text to put after t");} * input.insertAfter(u, "text after u");} * System.out.println(tokens.toString()); * * Actually, you have to cast the 'input' to a TokenRewriteStream. :( * * You can also have multiple "instruction streams" and get multiple * rewrites from a single pass over the input. Just name the instruction * streams and use that name again when printing the buffer. This could be * useful for generating a C file and also its header file--all from the * same buffer: * * tokens.insertAfter("pass1", t, "text to put after t");} * tokens.insertAfter("pass2", u, "text after u");} * System.out.println(tokens.toString("pass1")); * System.out.println(tokens.toString("pass2")); * * If you don't use named rewrite streams, a "default" stream is used as * the first example shows. */ [System.Serializable] [DebuggerDisplay( "TODO: TokenRewriteStream debugger display" )] public class TokenRewriteStream : CommonTokenStream { public const string DEFAULT_PROGRAM_NAME = "default"; public const int PROGRAM_INIT_SIZE = 100; public const int MIN_TOKEN_INDEX = 0; // Define the rewrite operation hierarchy protected class RewriteOperation { /** <summary>What index into rewrites List are we?</summary> */ public int instructionIndex; /** <summary>Token buffer index.</summary> */ public int index; public object text; // outer protected TokenRewriteStream stream; protected RewriteOperation(TokenRewriteStream stream, int index) { this.stream = stream; this.index = index; } protected RewriteOperation( TokenRewriteStream stream, int index, object text ) { this.index = index; this.text = text; this.stream = stream; } /** <summary> * Execute the rewrite operation by possibly adding to the buffer. * Return the index of the next token to operate on. * </summary> */ public virtual int Execute( StringBuilder buf ) { return index; } public override string ToString() { string opName = this.GetType().Name; int dindex = opName.IndexOf( '$' ); opName = opName.Substring( dindex + 1 ); return string.Format("<{0}@{1}:\"{2}\">", opName, stream._tokens[index], text); } } private class InsertBeforeOp : RewriteOperation { public InsertBeforeOp( TokenRewriteStream stream, int index, object text ) : base( stream, index, text ) { } public override int Execute( StringBuilder buf ) { buf.Append( text ); if (stream._tokens[index].Type != CharStreamConstants.EndOfFile) buf.Append(stream._tokens[index].Text); return index + 1; } } /** <summary> * I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp * instructions. * </summary> */ private class ReplaceOp : RewriteOperation { public int lastIndex; public ReplaceOp( TokenRewriteStream stream, int from, int to, object text ) : base( stream, from, text ) { lastIndex = to; } public override int Execute( StringBuilder buf ) { if ( text != null ) { buf.Append( text ); } return lastIndex + 1; } public override string ToString() { if (text == null) { return string.Format("<DeleteOp@{0}..{1}>", stream._tokens[index], stream._tokens[lastIndex]); } return string.Format("<ReplaceOp@{0}..{1}:\"{2}\">", stream._tokens[index], stream._tokens[lastIndex], text); } } /** <summary> * You may have multiple, named streams of rewrite operations. * I'm calling these things "programs." * Maps String (name) -> rewrite (List) * </summary> */ protected IDictionary<string, IList<RewriteOperation>> programs = null; /** <summary>Map String (program name) -> Integer index</summary> */ protected IDictionary<string, int> lastRewriteTokenIndexes = null; public TokenRewriteStream() { Init(); } protected void Init() { programs = new Dictionary<string, IList<RewriteOperation>>(); programs[DEFAULT_PROGRAM_NAME] = new List<RewriteOperation>( PROGRAM_INIT_SIZE ); lastRewriteTokenIndexes = new Dictionary<string, int>(); } public TokenRewriteStream( ITokenSource tokenSource ) : base( tokenSource ) { Init(); } public TokenRewriteStream( ITokenSource tokenSource, int channel ) : base( tokenSource, channel ) { Init(); } public virtual void Rollback( int instructionIndex ) { Rollback( DEFAULT_PROGRAM_NAME, instructionIndex ); } /** <summary> * Rollback the instruction stream for a program so that * the indicated instruction (via instructionIndex) is no * longer in the stream. UNTESTED! * </summary> */ public virtual void Rollback( string programName, int instructionIndex ) { IList<RewriteOperation> @is; if ( programs.TryGetValue( programName, out @is ) && @is != null ) { List<RewriteOperation> sublist = new List<RewriteOperation>(); for ( int i = MIN_TOKEN_INDEX; i <= instructionIndex; i++ ) sublist.Add( @is[i] ); programs[programName] = sublist; } } public virtual void DeleteProgram() { DeleteProgram( DEFAULT_PROGRAM_NAME ); } /** <summary>Reset the program so that no instructions exist</summary> */ public virtual void DeleteProgram( string programName ) { Rollback( programName, MIN_TOKEN_INDEX ); } public virtual void InsertAfter( IToken t, object text ) { InsertAfter( DEFAULT_PROGRAM_NAME, t, text ); } public virtual void InsertAfter( int index, object text ) { InsertAfter( DEFAULT_PROGRAM_NAME, index, text ); } public virtual void InsertAfter( string programName, IToken t, object text ) { InsertAfter( programName, t.TokenIndex, text ); } public virtual void InsertAfter( string programName, int index, object text ) { // to insert after, just insert before next index (even if past end) InsertBefore( programName, index + 1, text ); } public virtual void InsertBefore( IToken t, object text ) { InsertBefore( DEFAULT_PROGRAM_NAME, t, text ); } public virtual void InsertBefore( int index, object text ) { InsertBefore( DEFAULT_PROGRAM_NAME, index, text ); } public virtual void InsertBefore( string programName, IToken t, object text ) { InsertBefore( programName, t.TokenIndex, text ); } public virtual void InsertBefore( string programName, int index, object text ) { RewriteOperation op = new InsertBeforeOp( this, index, text ); IList<RewriteOperation> rewrites = GetProgram( programName ); op.instructionIndex = rewrites.Count; rewrites.Add( op ); } public virtual void Replace( int index, object text ) { Replace( DEFAULT_PROGRAM_NAME, index, index, text ); } public virtual void Replace( int from, int to, object text ) { Replace( DEFAULT_PROGRAM_NAME, from, to, text ); } public virtual void Replace( IToken indexT, object text ) { Replace( DEFAULT_PROGRAM_NAME, indexT, indexT, text ); } public virtual void Replace( IToken from, IToken to, object text ) { Replace( DEFAULT_PROGRAM_NAME, from, to, text ); } public virtual void Replace( string programName, int from, int to, object text ) { if ( from > to || from < 0 || to < 0 || to >= _tokens.Count ) { throw new ArgumentException( "replace: range invalid: " + from + ".." + to + "(size=" + _tokens.Count + ")" ); } RewriteOperation op = new ReplaceOp( this, from, to, text ); IList<RewriteOperation> rewrites = GetProgram( programName ); op.instructionIndex = rewrites.Count; rewrites.Add( op ); } public virtual void Replace( string programName, IToken from, IToken to, object text ) { Replace( programName, from.TokenIndex, to.TokenIndex, text ); } public virtual void Delete( int index ) { Delete( DEFAULT_PROGRAM_NAME, index, index ); } public virtual void Delete( int from, int to ) { Delete( DEFAULT_PROGRAM_NAME, from, to ); } public virtual void Delete( IToken indexT ) { Delete( DEFAULT_PROGRAM_NAME, indexT, indexT ); } public virtual void Delete( IToken from, IToken to ) { Delete( DEFAULT_PROGRAM_NAME, from, to ); } public virtual void Delete( string programName, int from, int to ) { Replace( programName, from, to, null ); } public virtual void Delete( string programName, IToken from, IToken to ) { Replace( programName, from, to, null ); } public virtual int GetLastRewriteTokenIndex() { return GetLastRewriteTokenIndex( DEFAULT_PROGRAM_NAME ); } protected virtual int GetLastRewriteTokenIndex( string programName ) { int value; if ( lastRewriteTokenIndexes.TryGetValue( programName, out value ) ) return value; return -1; } protected virtual void SetLastRewriteTokenIndex( string programName, int i ) { lastRewriteTokenIndexes[programName] = i; } protected virtual IList<RewriteOperation> GetProgram( string name ) { IList<RewriteOperation> @is; if ( !programs.TryGetValue( name, out @is ) || @is == null ) { @is = InitializeProgram( name ); } return @is; } private IList<RewriteOperation> InitializeProgram( string name ) { IList<RewriteOperation> @is = new List<RewriteOperation>( PROGRAM_INIT_SIZE ); programs[name] = @is; return @is; } public virtual string ToOriginalString() { Fill(); return ToOriginalString( MIN_TOKEN_INDEX, Count - 1 ); } public virtual string ToOriginalString( int start, int end ) { StringBuilder buf = new StringBuilder(); for ( int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++ ) { if (Get(i).Type != CharStreamConstants.EndOfFile) buf.Append(Get(i).Text); } return buf.ToString(); } public override string ToString() { Fill(); return ToString( MIN_TOKEN_INDEX, Count - 1 ); } public virtual string ToString( string programName ) { Fill(); return ToString(programName, MIN_TOKEN_INDEX, Count - 1); } public override string ToString( int start, int end ) { return ToString( DEFAULT_PROGRAM_NAME, start, end ); } public virtual string ToString( string programName, int start, int end ) { IList<RewriteOperation> rewrites; if ( !programs.TryGetValue( programName, out rewrites ) ) rewrites = null; // ensure start/end are in range if ( end > _tokens.Count - 1 ) end = _tokens.Count - 1; if ( start < 0 ) start = 0; if ( rewrites == null || rewrites.Count == 0 ) { return ToOriginalString( start, end ); // no instructions to execute } StringBuilder buf = new StringBuilder(); // First, optimize instruction stream IDictionary<int, RewriteOperation> indexToOp = ReduceToSingleOperationPerIndex( rewrites ); // Walk buffer, executing instructions and emitting tokens int i = start; while ( i <= end && i < _tokens.Count ) { RewriteOperation op; bool exists = indexToOp.TryGetValue( i, out op ); if ( exists ) { // remove so any left have index size-1 indexToOp.Remove( i ); } if ( !exists || op == null ) { IToken t = _tokens[i]; // no operation at that index, just dump token if (t.Type != CharStreamConstants.EndOfFile) buf.Append(t.Text); i++; // move to next token } else { i = op.Execute( buf ); // execute operation and skip } } // include stuff after end if it's last index in buffer // So, if they did an insertAfter(lastValidIndex, "foo"), include // foo if end==lastValidIndex. if ( end == _tokens.Count - 1 ) { // Scan any remaining operations after last token // should be included (they will be inserts). foreach ( RewriteOperation op in indexToOp.Values ) { if ( op.index >= _tokens.Count - 1 ) buf.Append( op.text ); } } return buf.ToString(); } /** We need to combine operations and report invalid operations (like * overlapping replaces that are not completed nested). Inserts to * same index need to be combined etc... Here are the cases: * * I.i.u I.j.v leave alone, nonoverlapping * I.i.u I.i.v combine: Iivu * * R.i-j.u R.x-y.v | i-j in x-y delete first R * R.i-j.u R.i-j.v delete first R * R.i-j.u R.x-y.v | x-y in i-j ERROR * R.i-j.u R.x-y.v | boundaries overlap ERROR * * Delete special case of replace (text==null): * D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) * * I.i.u R.x-y.v | i in (x+1)-y delete I (since insert before * we're not deleting i) * I.i.u R.x-y.v | i not in (x+1)-y leave alone, nonoverlapping * R.x-y.v I.i.u | i in x-y ERROR * R.x-y.v I.x.u R.x-y.uv (combine, delete I) * R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping * * I.i.u = insert u before op @ index i * R.x-y.u = replace x-y indexed tokens with u * * First we need to examine replaces. For any replace op: * * 1. wipe out any insertions before op within that range. * 2. Drop any replace op before that is contained completely within * that range. * 3. Throw exception upon boundary overlap with any previous replace. * * Then we can deal with inserts: * * 1. for any inserts to same index, combine even if not adjacent. * 2. for any prior replace with same left boundary, combine this * insert with replace and delete this replace. * 3. throw exception if index in same range as previous replace * * Don't actually delete; make op null in list. Easier to walk list. * Later we can throw as we add to index -> op map. * * Note that I.2 R.2-2 will wipe out I.2 even though, technically, the * inserted stuff would be before the replace range. But, if you * add tokens in front of a method body '{' and then delete the method * body, I think the stuff before the '{' you added should disappear too. * * Return a map from token index to operation. */ protected virtual IDictionary<int, RewriteOperation> ReduceToSingleOperationPerIndex( IList<RewriteOperation> rewrites ) { //System.out.println("rewrites="+rewrites); // WALK REPLACES for ( int i = 0; i < rewrites.Count; i++ ) { RewriteOperation op = rewrites[i]; if ( op == null ) continue; if ( !( op is ReplaceOp ) ) continue; ReplaceOp rop = (ReplaceOp)rewrites[i]; // Wipe prior inserts within range var inserts = GetKindOfOps( rewrites, typeof( InsertBeforeOp ), i ); for ( int j = 0; j < inserts.Count; j++ ) { InsertBeforeOp iop = (InsertBeforeOp)inserts[j]; if (iop.index == rop.index) { // E.g., insert before 2, delete 2..2; update replace // text to include insert before, kill insert rewrites[iop.instructionIndex] = null; rop.text = iop.text.ToString() + (rop.text != null ? rop.text.ToString() : string.Empty); } else if (iop.index > rop.index && iop.index <= rop.lastIndex) { // delete insert as it's a no-op. rewrites[iop.instructionIndex] = null; } } // Drop any prior replaces contained within var prevReplaces = GetKindOfOps( rewrites, typeof( ReplaceOp ), i ); for ( int j = 0; j < prevReplaces.Count; j++ ) { ReplaceOp prevRop = (ReplaceOp)prevReplaces[j]; if ( prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex ) { // delete replace as it's a no-op. rewrites[prevRop.instructionIndex] = null; continue; } // throw exception unless disjoint or identical bool disjoint = prevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex; bool same = prevRop.index == rop.index && prevRop.lastIndex == rop.lastIndex; // Delete special case of replace (text==null): // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) if (prevRop.text == null && rop.text == null && !disjoint) { //System.out.println("overlapping deletes: "+prevRop+", "+rop); rewrites[prevRop.instructionIndex] = null; // kill first delete rop.index = Math.Min(prevRop.index, rop.index); rop.lastIndex = Math.Max(prevRop.lastIndex, rop.lastIndex); +#if !PORTABLE Console.WriteLine("new rop " + rop); +#endif } else if ( !disjoint && !same ) { throw new ArgumentException( "replace op boundaries of " + rop + " overlap with previous " + prevRop ); } } } // WALK INSERTS for ( int i = 0; i < rewrites.Count; i++ ) { RewriteOperation op = (RewriteOperation)rewrites[i]; if ( op == null ) continue; if ( !( op is InsertBeforeOp ) ) continue; InsertBeforeOp iop = (InsertBeforeOp)rewrites[i]; // combine current insert with prior if any at same index var prevInserts = GetKindOfOps( rewrites, typeof( InsertBeforeOp ), i ); for ( int j = 0; j < prevInserts.Count; j++ ) { InsertBeforeOp prevIop = (InsertBeforeOp)prevInserts[j]; if ( prevIop.index == iop.index ) { // combine objects // convert to strings...we're in process of toString'ing // whole token buffer so no lazy eval issue with any templates iop.text = CatOpText( iop.text, prevIop.text ); // delete redundant prior insert rewrites[prevIop.instructionIndex] = null; } } // look for replaces where iop.index is in range; error var prevReplaces = GetKindOfOps( rewrites, typeof( ReplaceOp ), i ); for ( int j = 0; j < prevReplaces.Count; j++ ) { ReplaceOp rop = (ReplaceOp)prevReplaces[j]; if ( iop.index == rop.index ) { rop.text = CatOpText( iop.text, rop.text ); rewrites[i] = null; // delete current insert continue; } if ( iop.index >= rop.index && iop.index <= rop.lastIndex ) { throw new ArgumentException( "insert op " + iop + " within boundaries of previous " + rop ); } } } // System.out.println("rewrites after="+rewrites); IDictionary<int, RewriteOperation> m = new Dictionary<int, RewriteOperation>(); for ( int i = 0; i < rewrites.Count; i++ ) { RewriteOperation op = (RewriteOperation)rewrites[i]; if ( op == null ) continue; // ignore deleted ops RewriteOperation existing; if ( m.TryGetValue( op.index, out existing ) && existing != null ) { throw new Exception( "should only be one op per index" ); } m[op.index] = op; } //System.out.println("index to op: "+m); return m; } protected virtual string CatOpText( object a, object b ) { return string.Concat( a, b ); } protected virtual IList<RewriteOperation> GetKindOfOps( IList<RewriteOperation> rewrites, Type kind ) { return GetKindOfOps( rewrites, kind, rewrites.Count ); } /** <summary>Get all operations before an index of a particular kind</summary> */ protected virtual IList<RewriteOperation> GetKindOfOps( IList<RewriteOperation> rewrites, Type kind, int before ) { IList<RewriteOperation> ops = new List<RewriteOperation>(); for ( int i = 0; i < before && i < rewrites.Count; i++ ) { RewriteOperation op = rewrites[i]; if ( op == null ) continue; // ignore deleted if ( op.GetType() == kind ) ops.Add( op ); } return ops; } public virtual string ToDebugString() { return ToDebugString( MIN_TOKEN_INDEX, Count - 1 ); } public virtual string ToDebugString( int start, int end ) { StringBuilder buf = new StringBuilder(); for ( int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++ ) { buf.Append( Get( i ) ); } return buf.ToString(); } } } diff --git a/Runtime/Antlr3.Runtime/Tree/BufferedTreeNodeStream.cs b/Runtime/Antlr3.Runtime/Tree/BufferedTreeNodeStream.cs index 3b5a01e..8f14cb1 100644 --- a/Runtime/Antlr3.Runtime/Tree/BufferedTreeNodeStream.cs +++ b/Runtime/Antlr3.Runtime/Tree/BufferedTreeNodeStream.cs @@ -1,663 +1,671 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using System.Collections.Generic; - using Console = System.Console; using IList = System.Collections.IList; using InvalidOperationException = System.InvalidOperationException; using StringBuilder = System.Text.StringBuilder; +#if !PORTABLE + using Console = System.Console; +#endif + /** <summary>A buffered stream of tree nodes. Nodes can be from a tree of ANY kind.</summary> * * This node stream sucks all nodes out of the tree specified in * the constructor during construction and makes pointers into * the tree using an array of Object pointers. The stream necessarily * includes pointers to DOWN and UP and EOF nodes. * * This stream knows how to mark/release for backtracking. * * This stream is most suitable for tree interpreters that need to * jump around a lot or for tree parsers requiring speed (at cost of memory). * There is some duplicated functionality here with UnBufferedTreeNodeStream * but just in bookkeeping, not tree walking etc... * * TARGET DEVELOPERS: * * This is the old CommonTreeNodeStream that buffered up entire node stream. * No need to implement really as new CommonTreeNodeStream is much better * and covers what we need. * * @see CommonTreeNodeStream */ public class BufferedTreeNodeStream : ITreeNodeStream, ITokenStreamInformation { public const int DEFAULT_INITIAL_BUFFER_SIZE = 100; public const int INITIAL_CALL_STACK_SIZE = 10; protected sealed class StreamIterator : IEnumerator<object> { BufferedTreeNodeStream _outer; int _index; public StreamIterator( BufferedTreeNodeStream outer ) { _outer = outer; _index = -1; } #region IEnumerator<object> Members public object Current { get { if ( _index < _outer.nodes.Count ) return _outer.nodes[_index]; return _outer.eof; } } #endregion #region IDisposable Members public void Dispose() { } #endregion #region IEnumerator Members public bool MoveNext() { if ( _index < _outer.nodes.Count ) _index++; return _index < _outer.nodes.Count; } public void Reset() { _index = -1; } #endregion } // all these navigation nodes are shared and hence they // cannot contain any line/column info protected object down; protected object up; protected object eof; /** <summary>The complete mapping from stream index to tree node. * This buffer includes pointers to DOWN, UP, and EOF nodes. * It is built upon ctor invocation. The elements are type * Object as we don't what the trees look like.</summary> * * Load upon first need of the buffer so we can set token types * of interest for reverseIndexing. Slows us down a wee bit to * do all of the if p==-1 testing everywhere though. */ protected IList nodes; /** <summary>Pull nodes from which tree?</summary> */ protected object root; /** <summary>IF this tree (root) was created from a token stream, track it.</summary> */ protected ITokenStream tokens; /** <summary>What tree adaptor was used to build these trees</summary> */ ITreeAdaptor adaptor; /** <summary>Reuse same DOWN, UP navigation nodes unless this is true</summary> */ bool uniqueNavigationNodes = false; /** <summary>The index into the nodes list of the current node (next node * to consume). If -1, nodes array not filled yet.</summary> */ protected int p = -1; /** <summary>Track the last mark() call result value for use in rewind().</summary> */ protected int lastMarker; /** <summary>Stack of indexes used for push/pop calls</summary> */ protected Stack<int> calls; public BufferedTreeNodeStream( object tree ) : this( new CommonTreeAdaptor(), tree ) { } public BufferedTreeNodeStream( ITreeAdaptor adaptor, object tree ) : this( adaptor, tree, DEFAULT_INITIAL_BUFFER_SIZE ) { } public BufferedTreeNodeStream( ITreeAdaptor adaptor, object tree, int initialBufferSize ) { this.root = tree; this.adaptor = adaptor; nodes = new List<object>( initialBufferSize ); down = adaptor.Create( TokenTypes.Down, "DOWN" ); up = adaptor.Create( TokenTypes.Up, "UP" ); eof = adaptor.Create( TokenTypes.EndOfFile, "EOF" ); } #region Properties public virtual int Count { get { if ( p == -1 ) { throw new InvalidOperationException( "Cannot determine the Count before the buffer is filled." ); } return nodes.Count; } } public virtual object TreeSource { get { return root; } } public virtual string SourceName { get { return TokenStream.SourceName; } } public virtual ITokenStream TokenStream { get { return tokens; } set { tokens = value; } } public virtual ITreeAdaptor TreeAdaptor { get { return adaptor; } set { adaptor = value; } } public virtual bool UniqueNavigationNodes { get { return uniqueNavigationNodes; } set { uniqueNavigationNodes = value; } } public virtual IToken LastToken { get { return TreeAdaptor.GetToken(LB(1)); } } public virtual IToken LastRealToken { get { int i = 0; IToken token; do { i++; token = TreeAdaptor.GetToken(LB(i)); } while (token != null && token.Line <= 0); return token; } } public virtual int MaxLookBehind { get { return int.MaxValue; } } #endregion /** Walk tree with depth-first-search and fill nodes buffer. * Don't do DOWN, UP nodes if its a list (t is isNil). */ protected virtual void FillBuffer() { FillBuffer( root ); //Console.Out.WriteLine( "revIndex=" + tokenTypeToStreamIndexesMap ); p = 0; // buffer of nodes intialized now } public virtual void FillBuffer( object t ) { bool nil = adaptor.IsNil( t ); if ( !nil ) { nodes.Add( t ); // add this node } // add DOWN node if t has children int n = adaptor.GetChildCount( t ); if ( !nil && n > 0 ) { AddNavigationNode( TokenTypes.Down ); } // and now add all its children for ( int c = 0; c < n; c++ ) { object child = adaptor.GetChild( t, c ); FillBuffer( child ); } // add UP node if t has children if ( !nil && n > 0 ) { AddNavigationNode( TokenTypes.Up ); } } /** What is the stream index for node? 0..n-1 * Return -1 if node not found. */ protected virtual int GetNodeIndex( object node ) { if ( p == -1 ) { FillBuffer(); } for ( int i = 0; i < nodes.Count; i++ ) { object t = nodes[i]; if ( t == node ) { return i; } } return -1; } /** As we flatten the tree, we use UP, DOWN nodes to represent * the tree structure. When debugging we need unique nodes * so instantiate new ones when uniqueNavigationNodes is true. */ protected virtual void AddNavigationNode( int ttype ) { object navNode = null; if ( ttype == TokenTypes.Down ) { if ( UniqueNavigationNodes ) { navNode = adaptor.Create( TokenTypes.Down, "DOWN" ); } else { navNode = down; } } else { if ( UniqueNavigationNodes ) { navNode = adaptor.Create( TokenTypes.Up, "UP" ); } else { navNode = up; } } nodes.Add( navNode ); } public virtual object this[int i] { get { if ( p == -1 ) { throw new InvalidOperationException( "Cannot get the node at index i before the buffer is filled." ); } return nodes[i]; } } public virtual object LT( int k ) { if ( p == -1 ) { FillBuffer(); } if ( k == 0 ) { return null; } if ( k < 0 ) { return LB( -k ); } //System.out.print("LT(p="+p+","+k+")="); if ( ( p + k - 1 ) >= nodes.Count ) { return eof; } return nodes[p + k - 1]; } public virtual object GetCurrentSymbol() { return LT( 1 ); } #if false public virtual object getLastTreeNode() { int i = Index; if ( i >= size() ) { i--; // if at EOF, have to start one back } Console.Out.WriteLine( "start last node: " + i + " size==" + nodes.Count ); while ( i >= 0 && ( adaptor.getType( this[i] ) == TokenTypes.EOF || adaptor.getType( this[i] ) == TokenTypes.UP || adaptor.getType( this[i] ) == TokenTypes.DOWN ) ) { i--; } Console.Out.WriteLine( "stop at node: " + i + " " + nodes[i] ); return nodes[i]; } #endif /** <summary>Look backwards k nodes</summary> */ protected virtual object LB( int k ) { if ( k == 0 ) { return null; } if ( ( p - k ) < 0 ) { return null; } return nodes[p - k]; } public virtual void Consume() { if ( p == -1 ) { FillBuffer(); } p++; } public virtual int LA( int i ) { return adaptor.GetType( LT( i ) ); } public virtual int Mark() { if ( p == -1 ) { FillBuffer(); } lastMarker = Index; return lastMarker; } public virtual void Release( int marker ) { // no resources to release } public virtual int Index { get { return p; } } public virtual void Rewind( int marker ) { Seek( marker ); } public virtual void Rewind() { Seek( lastMarker ); } public virtual void Seek( int index ) { if ( p == -1 ) { FillBuffer(); } p = index; } /** <summary> * Make stream jump to a new location, saving old location. * Switch back with pop(). * </summary> */ public virtual void Push( int index ) { if ( calls == null ) { calls = new Stack<int>(); } calls.Push( p ); // save current index Seek( index ); } /** <summary> * Seek back to previous index saved during last push() call. * Return top of stack (return index). * </summary> */ public virtual int Pop() { int ret = calls.Pop(); Seek( ret ); return ret; } public virtual void Reset() { p = 0; lastMarker = 0; if ( calls != null ) { calls.Clear(); } } public virtual IEnumerator<object> Iterator() { if ( p == -1 ) { FillBuffer(); } return new StreamIterator( this ); } // TREE REWRITE INTERFACE public virtual void ReplaceChildren( object parent, int startChildIndex, int stopChildIndex, object t ) { if ( parent != null ) { adaptor.ReplaceChildren( parent, startChildIndex, stopChildIndex, t ); } } /** <summary>Used for testing, just return the token type stream</summary> */ public virtual string ToTokenTypeString() { if ( p == -1 ) { FillBuffer(); } StringBuilder buf = new StringBuilder(); for ( int i = 0; i < nodes.Count; i++ ) { object t = nodes[i]; buf.Append( " " ); buf.Append( adaptor.GetType( t ) ); } return buf.ToString(); } /** <summary>Debugging</summary> */ public virtual string ToTokenString( int start, int stop ) { if ( p == -1 ) { FillBuffer(); } StringBuilder buf = new StringBuilder(); for ( int i = start; i < nodes.Count && i <= stop; i++ ) { object t = nodes[i]; buf.Append( " " ); buf.Append( adaptor.GetToken( t ) ); } return buf.ToString(); } public virtual string ToString( object start, object stop ) { +#if !PORTABLE Console.Out.WriteLine( "toString" ); +#endif + if ( start == null || stop == null ) { return null; } if ( p == -1 ) { throw new InvalidOperationException( "Buffer is not yet filled." ); } +#if !PORTABLE //Console.Out.WriteLine( "stop: " + stop ); if ( start is CommonTree ) Console.Out.Write( "toString: " + ( (CommonTree)start ).Token + ", " ); else Console.Out.WriteLine( start ); if ( stop is CommonTree ) Console.Out.WriteLine( ( (CommonTree)stop ).Token ); else Console.Out.WriteLine( stop ); +#endif // if we have the token stream, use that to dump text in order if ( tokens != null ) { int beginTokenIndex = adaptor.GetTokenStartIndex( start ); int endTokenIndex = adaptor.GetTokenStopIndex( stop ); // if it's a tree, use start/stop index from start node // else use token range from start/stop nodes if ( adaptor.GetType( stop ) == TokenTypes.Up ) { endTokenIndex = adaptor.GetTokenStopIndex( start ); } else if ( adaptor.GetType( stop ) == TokenTypes.EndOfFile ) { endTokenIndex = Count - 2; // don't use EOF } return tokens.ToString( beginTokenIndex, endTokenIndex ); } // walk nodes looking for start object t = null; int i = 0; for ( ; i < nodes.Count; i++ ) { t = nodes[i]; if ( t == start ) { break; } } // now walk until we see stop, filling string buffer with text StringBuilder buf = new StringBuilder(); t = nodes[i]; while ( t != stop ) { string text = adaptor.GetText( t ); if ( text == null ) { text = " " + adaptor.GetType( t ).ToString(); } buf.Append( text ); i++; t = nodes[i]; } // include stop node too string text2 = adaptor.GetText( stop ); if ( text2 == null ) { text2 = " " + adaptor.GetType( stop ).ToString(); } buf.Append( text2 ); return buf.ToString(); } } } diff --git a/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs b/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs index 4590287..ef3a628 100644 --- a/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs +++ b/Runtime/Antlr3.Runtime/Tree/RewriteCardinalityException.cs @@ -1,96 +1,101 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using ArgumentNullException = System.ArgumentNullException; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary> * Base class for all exceptions thrown during AST rewrite construction. * This signifies a case where the cardinality of two or more elements * in a subrule are different: (ID INT)+ where |ID|!=|INT| * </summary> */ [System.Serializable] public class RewriteCardinalityException : Exception { private readonly string _elementDescription; public RewriteCardinalityException() { } public RewriteCardinalityException(string elementDescription) : this(elementDescription, elementDescription) { this._elementDescription = elementDescription; } public RewriteCardinalityException(string elementDescription, Exception innerException) : this(elementDescription, elementDescription, innerException) { } public RewriteCardinalityException(string message, string elementDescription) : base(message) { _elementDescription = elementDescription; } public RewriteCardinalityException(string message, string elementDescription, Exception innerException) : base(message, innerException) { _elementDescription = elementDescription; } +#if !PORTABLE protected RewriteCardinalityException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) throw new ArgumentNullException("info"); _elementDescription = info.GetString("ElementDescription"); } public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) throw new ArgumentNullException("info"); base.GetObjectData(info, context); info.AddValue("ElementDescription", _elementDescription); } +#endif } } diff --git a/Runtime/Antlr3.Runtime/Tree/RewriteEarlyExitException.cs b/Runtime/Antlr3.Runtime/Tree/RewriteEarlyExitException.cs index 43c51fe..8bed518 100644 --- a/Runtime/Antlr3.Runtime/Tree/RewriteEarlyExitException.cs +++ b/Runtime/Antlr3.Runtime/Tree/RewriteEarlyExitException.cs @@ -1,72 +1,77 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>No elements within a (...)+ in a rewrite rule</summary> */ [System.Serializable] public class RewriteEarlyExitException : RewriteCardinalityException { public RewriteEarlyExitException() { } public RewriteEarlyExitException(string elementDescription) : base(elementDescription) { } public RewriteEarlyExitException(string elementDescription, Exception innerException) : base(elementDescription, innerException) { } public RewriteEarlyExitException(string message, string elementDescription) : base(message, elementDescription) { } public RewriteEarlyExitException(string message, string elementDescription, Exception innerException) : base(message, elementDescription, innerException) { } +#if !PORTABLE protected RewriteEarlyExitException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif } } diff --git a/Runtime/Antlr3.Runtime/Tree/RewriteEmptyStreamException.cs b/Runtime/Antlr3.Runtime/Tree/RewriteEmptyStreamException.cs index 8390cd6..945162a 100644 --- a/Runtime/Antlr3.Runtime/Tree/RewriteEmptyStreamException.cs +++ b/Runtime/Antlr3.Runtime/Tree/RewriteEmptyStreamException.cs @@ -1,72 +1,77 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>Ref to ID or expr but no tokens in ID stream or subtrees in expr stream</summary> */ [System.Serializable] public class RewriteEmptyStreamException : RewriteCardinalityException { public RewriteEmptyStreamException() { } public RewriteEmptyStreamException(string elementDescription) : base(elementDescription) { } public RewriteEmptyStreamException(string elementDescription, Exception innerException) : base(elementDescription, innerException) { } public RewriteEmptyStreamException(string message, string elementDescription) : base(message, elementDescription) { } public RewriteEmptyStreamException(string message, string elementDescription, Exception innerException) : base(message, elementDescription, innerException) { } +#if !PORTABLE protected RewriteEmptyStreamException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif } } diff --git a/Runtime/Antlr3.Runtime/Tree/TreeParser.cs b/Runtime/Antlr3.Runtime/Tree/TreeParser.cs index f5a1508..f6d095b 100644 --- a/Runtime/Antlr3.Runtime/Tree/TreeParser.cs +++ b/Runtime/Antlr3.Runtime/Tree/TreeParser.cs @@ -1,209 +1,209 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using ConditionalAttribute = System.Diagnostics.ConditionalAttribute; using Regex = System.Text.RegularExpressions.Regex; - using RegexOptions = System.Text.RegularExpressions.RegexOptions; + using RegexOptionsHelper = Antlr.Runtime.Misc.RegexOptionsHelper; /** <summary> * A parser for a stream of tree nodes. "tree grammars" result in a subclass * of this. All the error reporting and recovery is shared with Parser via * the BaseRecognizer superclass. * </summary> */ public class TreeParser : BaseRecognizer { public const int DOWN = TokenTypes.Down; public const int UP = TokenTypes.Up; // precompiled regex used by inContext static string dotdot = ".*[^.]\\.\\.[^.].*"; static string doubleEtc = ".*\\.\\.\\.\\s+\\.\\.\\..*"; - static Regex dotdotPattern = new Regex( dotdot, RegexOptions.Compiled ); - static Regex doubleEtcPattern = new Regex( doubleEtc, RegexOptions.Compiled ); + static Regex dotdotPattern = new Regex( dotdot, RegexOptionsHelper.Compiled ); + static Regex doubleEtcPattern = new Regex( doubleEtc, RegexOptionsHelper.Compiled ); protected ITreeNodeStream input; public TreeParser( ITreeNodeStream input ) : base() // highlight that we go to super to set state object { this.input = input; } public TreeParser( ITreeNodeStream input, RecognizerSharedState state ) : base( state ) // share the state object with another parser { this.input = input; } public override void Reset() { base.Reset(); // reset all recognizer state variables if ( input != null ) { input.Seek( 0 ); // rewind the input } } /** <summary>Set the input stream</summary> */ public virtual void SetTreeNodeStream( ITreeNodeStream input ) { this.input = input; } public virtual ITreeNodeStream GetTreeNodeStream() { return input; } public override string SourceName { get { return input.SourceName; } } protected override object GetCurrentInputSymbol( IIntStream input ) { return ( (ITreeNodeStream)input ).LT( 1 ); } protected override object GetMissingSymbol( IIntStream input, RecognitionException e, int expectedTokenType, BitSet follow ) { string tokenText = "<missing " + TokenNames[expectedTokenType] + ">"; ITreeAdaptor adaptor = ((ITreeNodeStream)e.Input).TreeAdaptor; return adaptor.Create(new CommonToken(expectedTokenType, tokenText)); } /** <summary> * Match '.' in tree parser has special meaning. Skip node or * entire tree if node has children. If children, scan until * corresponding UP node. * </summary> */ public override void MatchAny( IIntStream ignore ) { state.errorRecovery = false; state.failed = false; // always consume the current node input.Consume(); // if the next node is DOWN, then the current node is a subtree: // skip to corresponding UP. must count nesting level to get right UP int look = input.LA( 1 ); if ( look == DOWN ) { input.Consume(); int level = 1; while ( level > 0 ) { switch ( input.LA( 1 ) ) { case DOWN: level++; break; case UP: level--; break; case TokenTypes.EndOfFile: return; default: break; } input.Consume(); } } } /** <summary> * We have DOWN/UP nodes in the stream that have no line info; override. * plus we want to alter the exception type. Don't try to recover * from tree parser errors inline... * </summary> */ protected override object RecoverFromMismatchedToken( IIntStream input, int ttype, BitSet follow ) { throw new MismatchedTreeNodeException( ttype, (ITreeNodeStream)input ); } /** <summary> * Prefix error message with the grammar name because message is * always intended for the programmer because the parser built * the input tree not the user. * </summary> */ public override string GetErrorHeader( RecognitionException e ) { return GrammarFileName + ": node from " + ( e.ApproximateLineInfo ? "after " : "" ) + "line " + e.Line + ":" + e.CharPositionInLine; } /** <summary> * Tree parsers parse nodes they usually have a token object as * payload. Set the exception token and do the default behavior. * </summary> */ public override string GetErrorMessage( RecognitionException e, string[] tokenNames ) { if ( this is TreeParser ) { ITreeAdaptor adaptor = ( (ITreeNodeStream)e.Input ).TreeAdaptor; e.Token = adaptor.GetToken( e.Node ); if ( e.Token == null ) { // could be an UP/DOWN node e.Token = new CommonToken( adaptor.GetType( e.Node ), adaptor.GetText( e.Node ) ); } } return base.GetErrorMessage( e, tokenNames ); } [Conditional("ANTLR_TRACE")] public virtual void TraceIn( string ruleName, int ruleIndex ) { base.TraceIn( ruleName, ruleIndex, input.LT( 1 ) ); } [Conditional("ANTLR_TRACE")] public virtual void TraceOut( string ruleName, int ruleIndex ) { base.TraceOut( ruleName, ruleIndex, input.LT( 1 ) ); } } } diff --git a/Runtime/Antlr3.Runtime/Tree/TreeRewriter.cs b/Runtime/Antlr3.Runtime/Tree/TreeRewriter.cs index 16a38a2..d4d7de8 100644 --- a/Runtime/Antlr3.Runtime/Tree/TreeRewriter.cs +++ b/Runtime/Antlr3.Runtime/Tree/TreeRewriter.cs @@ -1,144 +1,148 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime.Tree { using Antlr.Runtime.Misc; +#if !PORTABLE using Console = System.Console; +#endif public class TreeRewriter : TreeParser { protected bool showTransformations; protected ITokenStream originalTokenStream; protected ITreeAdaptor originalAdaptor; Func<IAstRuleReturnScope> topdown_func; Func<IAstRuleReturnScope> bottomup_func; public TreeRewriter( ITreeNodeStream input ) : this( input, new RecognizerSharedState() ) { } public TreeRewriter( ITreeNodeStream input, RecognizerSharedState state ) : base( input, state ) { originalAdaptor = input.TreeAdaptor; originalTokenStream = input.TokenStream; topdown_func = () => Topdown(); bottomup_func = () => Bottomup(); } public virtual object ApplyOnce( object t, Func<IAstRuleReturnScope> whichRule ) { if ( t == null ) return null; try { // share TreeParser object but not parsing-related state SetState(new RecognizerSharedState()); SetTreeNodeStream(new CommonTreeNodeStream(originalAdaptor, t)); ( (CommonTreeNodeStream)input ).TokenStream = originalTokenStream; BacktrackingLevel = 1; IAstRuleReturnScope r = whichRule(); BacktrackingLevel = 0; if ( Failed ) return t; if (showTransformations && r != null && !t.Equals(r.Tree) && r.Tree != null) ReportTransformation(t, r.Tree); if ( r != null && r.Tree != null ) return r.Tree; else return t; } catch ( RecognitionException ) { } return t; } public virtual object ApplyRepeatedly( object t, Func<IAstRuleReturnScope> whichRule ) { bool treeChanged = true; while ( treeChanged ) { object u = ApplyOnce( t, whichRule ); treeChanged = !t.Equals( u ); t = u; } return t; } public virtual object Downup( object t ) { return Downup( t, false ); } public virtual object Downup( object t, bool showTransformations ) { this.showTransformations = showTransformations; TreeVisitor v = new TreeVisitor( new CommonTreeAdaptor() ); t = v.Visit( t, ( o ) => ApplyOnce( o, topdown_func ), ( o ) => ApplyRepeatedly( o, bottomup_func ) ); return t; } // methods the downup strategy uses to do the up and down rules. // to override, just define tree grammar rule topdown and turn on // filter=true. protected virtual IAstRuleReturnScope Topdown() { return null; } protected virtual IAstRuleReturnScope Bottomup() { return null; } /** Override this if you need transformation tracing to go somewhere * other than stdout or if you're not using ITree-derived trees. */ protected virtual void ReportTransformation(object oldTree, object newTree) { ITree old = oldTree as ITree; ITree @new = newTree as ITree; string oldMessage = old != null ? old.ToStringTree() : "??"; string newMessage = @new != null ? @new.ToStringTree() : "??"; +#if !PORTABLE Console.WriteLine("{0} -> {1}", oldMessage, newMessage); +#endif } } } diff --git a/Runtime/Antlr3.Runtime/UnwantedTokenException.cs b/Runtime/Antlr3.Runtime/UnwantedTokenException.cs index 89b3481..b10ed82 100644 --- a/Runtime/Antlr3.Runtime/UnwantedTokenException.cs +++ b/Runtime/Antlr3.Runtime/UnwantedTokenException.cs @@ -1,109 +1,114 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr.Runtime { using System.Collections.Generic; using Exception = System.Exception; + +#if !PORTABLE using SerializationInfo = System.Runtime.Serialization.SerializationInfo; using StreamingContext = System.Runtime.Serialization.StreamingContext; +#endif /** <summary>An extra token while parsing a TokenStream</summary> */ [System.Serializable] public class UnwantedTokenException : MismatchedTokenException { public UnwantedTokenException() { } public UnwantedTokenException(string message) : base(message) { } public UnwantedTokenException(string message, Exception innerException) : base(message, innerException) { } public UnwantedTokenException(int expecting, IIntStream input) : base(expecting, input) { } public UnwantedTokenException(int expecting, IIntStream input, IList<string> tokenNames) : base(expecting, input, tokenNames) { } public UnwantedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames) : base(message, expecting, input, tokenNames) { } public UnwantedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames, Exception innerException) : base(message, expecting, input, tokenNames, innerException) { } +#if !PORTABLE protected UnwantedTokenException(SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif public virtual IToken UnexpectedToken { get { return Token; } } public override string ToString() { //int unexpectedType = getUnexpectedType(); //string unexpected = ( tokenNames != null && unexpectedType >= 0 && unexpectedType < tokenNames.Length ) ? tokenNames[unexpectedType] : unexpectedType.ToString(); string expected = (TokenNames != null && Expecting >= 0 && Expecting < TokenNames.Count) ? TokenNames[Expecting] : Expecting.ToString(); string exp = ", expected " + expected; if (Expecting == TokenTypes.Invalid) { exp = ""; } if (Token == null) { return "UnwantedTokenException(found=" + null + exp + ")"; } return "UnwantedTokenException(found=" + Token.Text + exp + ")"; } } }
antlr/antlrcs
367e5239a642d924b58efdcf16f86778e4b26eb8
Add ANTLR 3 Runtime net40-client project
diff --git a/Antlr3.sln b/Antlr3.sln index 3777331..00cef77 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,218 +1,224 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net40-client", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net40-client.csproj", "{075C5424-3DB3-4AEF-AB9D-A87366AF152D}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU + {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {075C5424-3DB3-4AEF-AB9D-A87366AF152D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj new file mode 100644 index 0000000..f023ea8 --- /dev/null +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net40-client.csproj @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{075C5424-3DB3-4AEF-AB9D-A87366AF152D}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Antlr.Runtime</RootNamespace> + <AssemblyName>Antlr3.Runtime</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <FileAlignment>512</FileAlignment> + <BaseIntermediateOutputPath>obj\net40-client\</BaseIntermediateOutputPath> + <SignAssembly>true</SignAssembly> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\net40-client\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\net40-client\Debug\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\net40-client\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\net40-client\Release\Antlr3.Runtime.xml</DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ANTLRFileStream.cs" /> + <Compile Include="ANTLRInputStream.cs" /> + <Compile Include="ANTLRReaderStream.cs" /> + <Compile Include="ANTLRStringStream.cs" /> + <Compile Include="AstParserRuleReturnScope`2.cs" /> + <Compile Include="BaseRecognizer.cs" /> + <Compile Include="BitSet.cs" /> + <Compile Include="BufferedTokenStream.cs" /> + <Compile Include="CharStreamConstants.cs" /> + <Compile Include="CharStreamState.cs" /> + <Compile Include="ClassicToken.cs" /> + <Compile Include="CommonToken.cs" /> + <Compile Include="CommonTokenStream.cs" /> + <Compile Include="Debug\IDebugEventListener.cs" /> + <Compile Include="DFA.cs" /> + <Compile Include="EarlyExitException.cs" /> + <Compile Include="FailedPredicateException.cs" /> + <Compile Include="GrammarRuleAttribute.cs" /> + <Compile Include="IAstRuleReturnScope.cs" /> + <Compile Include="IAstRuleReturnScope`1.cs" /> + <Compile Include="ICharStream.cs" /> + <Compile Include="IIntStream.cs" /> + <Compile Include="IRuleReturnScope.cs" /> + <Compile Include="IRuleReturnScope`1.cs" /> + <Compile Include="ITemplateRuleReturnScope.cs" /> + <Compile Include="ITemplateRuleReturnScope`1.cs" /> + <Compile Include="IToken.cs" /> + <Compile Include="ITokenSource.cs" /> + <Compile Include="ITokenStream.cs" /> + <Compile Include="ITokenStreamInformation.cs" /> + <Compile Include="LegacyCommonTokenStream.cs" /> + <Compile Include="Lexer.cs" /> + <Compile Include="Misc\FastQueue.cs" /> + <Compile Include="Misc\FunctionDelegates.cs" /> + <Compile Include="Misc\ListStack`1.cs" /> + <Compile Include="Misc\LookaheadStream.cs" /> + <Compile Include="MismatchedNotSetException.cs" /> + <Compile Include="MismatchedRangeException.cs" /> + <Compile Include="MismatchedSetException.cs" /> + <Compile Include="MismatchedTokenException.cs" /> + <Compile Include="MismatchedTreeNodeException.cs" /> + <Compile Include="MissingTokenException.cs" /> + <Compile Include="NoViableAltException.cs" /> + <Compile Include="Parser.cs" /> + <Compile Include="ParserRuleReturnScope.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RecognitionException.cs" /> + <Compile Include="RecognizerSharedState.cs" /> + <Compile Include="TemplateParserRuleReturnScope`2.cs" /> + <Compile Include="TokenChannels.cs" /> + <Compile Include="TokenRewriteStream.cs" /> + <Compile Include="Tokens.cs" /> + <Compile Include="TokenTypes.cs" /> + <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\BaseTree.cs" /> + <Compile Include="Tree\BaseTreeAdaptor.cs" /> + <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> + <Compile Include="Tree\BufferedTreeNodeStream.cs" /> + <Compile Include="Tree\CommonErrorNode.cs" /> + <Compile Include="Tree\CommonTree.cs" /> + <Compile Include="Tree\CommonTreeAdaptor.cs" /> + <Compile Include="Tree\CommonTreeNodeStream.cs" /> + <Compile Include="Tree\DotTreeGenerator.cs" /> + <Compile Include="Tree\IPositionTrackingStream.cs" /> + <Compile Include="Tree\ITree.cs" /> + <Compile Include="Tree\ITreeAdaptor.cs" /> + <Compile Include="Tree\ITreeNodeStream.cs" /> + <Compile Include="Tree\ITreeVisitorAction.cs" /> + <Compile Include="Tree\ParseTree.cs" /> + <Compile Include="Tree\RewriteCardinalityException.cs" /> + <Compile Include="Tree\RewriteEarlyExitException.cs" /> + <Compile Include="Tree\RewriteEmptyStreamException.cs" /> + <Compile Include="Tree\RewriteRuleElementStream.cs" /> + <Compile Include="Tree\RewriteRuleNodeStream.cs" /> + <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> + <Compile Include="Tree\RewriteRuleTokenStream.cs" /> + <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> + <Compile Include="Tree\TreeFilter.cs" /> + <Compile Include="Tree\TreeIterator.cs" /> + <Compile Include="Tree\TreeParser.cs" /> + <Compile Include="Tree\TreePatternLexer.cs" /> + <Compile Include="Tree\TreePatternParser.cs" /> + <Compile Include="Tree\TreeRewriter.cs" /> + <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> + <Compile Include="Tree\TreeVisitor.cs" /> + <Compile Include="Tree\TreeWizard.cs" /> + <Compile Include="UnbufferedTokenStream.cs" /> + <Compile Include="UnwantedTokenException.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> + <Link>Key.snk</Link> + </None> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/build/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec index 38236d9..b5c32ce 100644 --- a/build/prep/Antlr3.Runtime.nuspec +++ b/build/prep/Antlr3.Runtime.nuspec @@ -1,31 +1,35 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.dll" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.pdb" target="lib\net40-client"/> + <file src="..\..\Runtime\Antlr3.Runtime\bin\net40-client\$Configuration$\Antlr3.Runtime.xml" target="lib\net40-client"/> + <!-- Source Code --> <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
229ea12e8ff60879b4c99df77a3ec439f13a83b2
Rename Antlr3.Runtime.csproj to Antlr3.Runtime.net20.csproj
diff --git a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj index 047e3ab..d07f506 100644 --- a/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj +++ b/Antlr3.Runtime.Visualizer/Antlr3.Runtime.Visualizer.csproj @@ -1,127 +1,127 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2F59DA1C-A502-440C-ABE8-240BDE2D0664}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Visualizer</RootNamespace> <AssemblyName>Antlr3.Runtime.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> <Reference Include="WindowsFormsIntegration" /> </ItemGroup> <ItemGroup> <Compile Include="..\Antlr4.StringTemplate.Visualizer\Extensions\FlowDocumentExtensions.cs"> <Link>Extensions\FlowDocumentExtensions.cs</Link> </Compile> <Compile Include="Interval.cs" /> <Compile Include="RuntimeVisualizerExtensions.cs" /> <Compile Include="TreeViewModel.cs" /> <Compile Include="BaseTreeVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="BaseTreeVisualizerForm.Designer.cs"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="BaseTreeVisualizerViewControl.xaml.cs"> <DependentUpon>BaseTreeVisualizerViewControl.xaml</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TokenStreamVisualizerForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="TokenStreamVisualizerForm.Designer.cs"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </Compile> <Compile Include="TreeVisualizerViewModel.cs" /> <EmbeddedResource Include="BaseTreeVisualizerForm.resx"> <DependentUpon>BaseTreeVisualizerForm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <EmbeddedResource Include="TokenStreamVisualizerForm.resx"> <DependentUpon>TokenStreamVisualizerForm.cs</DependentUpon> </EmbeddedResource> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> </ItemGroup> <ItemGroup> <Page Include="BaseTreeVisualizerViewControl.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index aabe61a..b5be71d 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,140 +1,140 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.ST</RootNamespace> <AssemblyName>Antlr3.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="CommonGroupLoader.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="PathGroupLoader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StringTemplate.cs" /> <Compile Include="StringTemplateErrorListener.cs" /> <Compile Include="StringTemplateGroup.cs" /> <Compile Include="StringTemplateGroupInterface.cs" /> <Compile Include="StringTemplateGroupLoader.cs" /> <Compile Include="StringTemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> <Compile Include="JavaExtensions\ListExtensions.cs" /> <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Include="Language\ASTExpr.cs" /> <Compile Include="Language\Cat.cs" /> <Compile Include="Language\ChunkToken.cs" /> <Compile Include="Language\ConditionalExpr.cs" /> <Compile Include="Language\Expr.cs" /> <Compile Include="Language\FormalArgument.cs" /> <Compile Include="Language\NewlineRef.cs" /> <Compile Include="Language\RegionType.cs" /> <Compile Include="Language\StringRef.cs" /> <Compile Include="Language\StringTemplateAST.cs" /> <Compile Include="Language\StringTemplateToken.cs" /> <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> <Compile Include="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Include="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Include="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Include="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Include="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Include="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Include="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Include="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> <Compile Include="TypeRegistry`1.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj index 2e6c144..01d784c 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python/Antlr3.Targets.Python.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Python</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="PythonTarget.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> <Private>False</Private> </ProjectReference> <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> <Name>Antlr3</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj index 9998d99..bb8a9d3 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Antlr3.Targets.Python3.csproj @@ -1,71 +1,71 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Targets</RootNamespace> <AssemblyName>Antlr3.Targets.Python3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\bin\Debug\Targets\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\bin\Release\Targets\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Python3Target.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> <Private>False</Private> </ProjectReference> <ProjectReference Include="..\..\Antlr3\Antlr3.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> <Name>Antlr3</Name> <Private>False</Private> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.Test/Antlr3.Test.csproj b/Antlr3.Test/Antlr3.Test.csproj index e32db14..29a5cde 100644 --- a/Antlr3.Test/Antlr3.Test.csproj +++ b/Antlr3.Test/Antlr3.Test.csproj @@ -1,145 +1,145 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8B58597B-058E-4D7A-B83E-5269BDABBE2C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AntlrUnitTests</RootNamespace> <AssemblyName>AntlrUnitTests</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="DebugTestAutoAST.cs" /> <Compile Include="DebugTestCompositeGrammars.cs" /> <Compile Include="DebugTestRewriteAST.cs" /> <Compile Include="ErrorQueue.cs" /> <Compile Include="IRuntimeTestHarness.cs" /> <Compile Include="JavaRuntimeTestHarness.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RuntimeTestHarness.cs" /> <Compile Include="StringTemplateTests.cs" /> <Compile Include="TestASTConstruction.cs" /> <Compile Include="TestAttributes.cs" /> <Compile Include="TestAutoAST.cs" /> <Compile Include="TestBufferedTreeNodeStream.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestCharDFAConversion.cs" /> <Compile Include="TestCommonTokenStream.cs" /> <Compile Include="TestCompositeGrammars.cs" /> <Compile Include="TestDFAConversion.cs" /> <Compile Include="TestDFAMatching.cs" /> <Compile Include="TestFastQueue.cs" /> <Compile Include="TestHeteroAST.cs" /> <Compile Include="TestInterpretedLexing.cs" /> <Compile Include="TestInterpretedParsing.cs" /> <Compile Include="TestIntervalSet.cs" /> <Compile Include="TestJavaCodeGeneration.cs" /> <Compile Include="TestLeftRecursion.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLookaheadStream.cs" /> <Compile Include="TestMessages.cs" /> <Compile Include="TestNFAConstruction.cs" /> <Compile Include="TestRewriteAST.cs" /> <Compile Include="TestRewriteTemplates.cs" /> <Compile Include="TestSemanticPredicateEvaluation.cs" /> <Compile Include="TestSemanticPredicates.cs" /> <Compile Include="TestSets.cs" /> <Compile Include="TestSymbolDefinitions.cs" /> <Compile Include="TestSyntacticPredicateEvaluation.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTemplates.cs" /> <Compile Include="TestTokenRewriteStream.cs" /> <Compile Include="TestTopologicalSort.cs" /> <Compile Include="TestTreeGrammarRewriteAST.cs" /> <Compile Include="TestTreeIterator.cs" /> <Compile Include="TestTreeNodeStream.cs" /> <Compile Include="TestTreeParsing.cs" /> <Compile Include="TestTrees.cs" /> <Compile Include="TestTreeWizard.cs" /> </ItemGroup> <ItemGroup> <Content Include="AuthoringTests.txt" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="body.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="method.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="page.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="row.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <EmbeddedResource Include="users_list.st"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> <Private>True</Private> </ProjectReference> <ProjectReference Include="..\Antlr3\Antlr3.csproj"> <Project>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</Project> <Name>Antlr3</Name> <Private>True</Private> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> <PropertyGroup> <PostBuildEvent> </PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index b15fb76..3777331 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,218 +1,218 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.net20", "Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec build\prep\LICENSE.txt = build\prep\LICENSE.txt build\prep\prepare.ps1 = build\prep\prepare.ps1 build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index cbd5bf1..374f607 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,507 +1,507 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 783eeb6..511ded2 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,127 +1,127 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate.Visualizer</RootNamespace> <AssemblyName>Antlr4.StringTemplate.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> </ItemGroup> <ItemGroup> <Compile Include="AstNodeToStringConverter.cs" /> <Compile Include="AttributeViewModel.cs" /> <Compile Include="Extensions\FlowDocumentExtensions.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TemplateCallHierarchyViewModel.cs" /> <Compile Include="TemplateFrameAttributeViewModel.cs" /> <Compile Include="TemplateVisualizer.cs" /> <Compile Include="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Include="TemplateVisualizerViewModel.cs" /> <Compile Include="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> <Compile Include="TreeViewItemDisplay.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index b837da4..9499e0e 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,159 +1,159 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj index 1ab604d..b8da100 100644 --- a/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj +++ b/Antlr4.Test.StringTemplate/Antlr4.Test.StringTemplate.csproj @@ -1,109 +1,109 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.Test.StringTemplate</RootNamespace> <AssemblyName>Antlr4.Test.StringTemplate</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> <Visible>False</Visible> </CodeAnalysisDependentAssemblyPaths> </ItemGroup> <ItemGroup> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="TestAggregates.cs" /> <Compile Include="TestCategories.cs" /> <Compile Include="TestNoNewlineTemplates.cs" /> <Compile Include="TestTemplateNames.cs" /> <Compile Include="TestTemplateRawGroupDirectory.cs" /> <Compile Include="TestVisualizer.cs" /> </ItemGroup> <ItemGroup> <Compile Include="BaseTest.cs" /> <Compile Include="ErrorBufferAllErrors.cs" /> <Compile Include="TestCompiler.cs" /> <Compile Include="TestCoreBasics.cs" /> <Compile Include="TestDebugEvents.cs" /> <Compile Include="TestDictionaries.cs" /> <Compile Include="TestDollarDelimiters.cs" /> <Compile Include="TestFunctions.cs" /> <Compile Include="TestGroups.cs" /> <Compile Include="TestGroupSyntax.cs" /> <Compile Include="TestGroupSyntaxErrors.cs" /> <Compile Include="TestImports.cs" /> <Compile Include="TestIndentation.cs" /> <Compile Include="TestIndirectionAndEarlyEval.cs" /> <Compile Include="TestInterptimeErrors.cs" /> <Compile Include="TestLexer.cs" /> <Compile Include="TestLineWrap.cs" /> <Compile Include="TestLists.cs" /> <Compile Include="TestModelAdaptors.cs" /> <Compile Include="TestNullAndEmptyValues.cs" /> <Compile Include="TestOptions.cs" /> <Compile Include="TestRegions.cs" /> <Compile Include="TestRenderers.cs" /> <Compile Include="TestScopes.cs" /> <Compile Include="TestSubtemplates.cs" /> <Compile Include="TestSyntaxErrors.cs" /> <Compile Include="TestTokensForDollarDelimiters.cs" /> <Compile Include="TestWhitespace.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Runtime\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index e94ecc8..b385ab9 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,79 +1,79 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <AssemblyName>Antlr3.Runtime.Debug</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="BlankDebugEventListener.cs" /> <Compile Include="DebugEventHub.cs" /> <Compile Include="DebugEventListenerConstants.cs" /> <Compile Include="DebugEventRepeater.cs" /> <Compile Include="DebugEventSocketProxy.cs" /> <Compile Include="DebugParser.cs" /> <Compile Include="DebugTokenStream.cs" /> <Compile Include="DebugTreeAdaptor.cs" /> <Compile Include="DebugTreeNodeStream.cs" /> <Compile Include="DebugTreeParser.cs" /> <Compile Include="JavaExtensions\ExceptionExtensions.cs" /> <Compile Include="Misc\DoubleKeyMap`3.cs" /> <Compile Include="Misc\Stats.cs" /> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="ParserDebugger.cs" /> <Compile Include="ParseTreeBuilder.cs" /> <Compile Include="Profiler.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RemoteDebugEventSocketListener.cs" /> <Compile Include="TraceDebugEventListener.cs" /> <Compile Include="Tracer.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index c168b80..b7cfbec 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,91 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.JavaExtensions</RootNamespace> <AssemblyName>Antlr3.Runtime.JavaExtensions</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data.DataSetExtensions"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="DictionaryExtensions.cs" /> <Compile Include="ExceptionExtensions.cs" /> <Compile Include="IOExtensions.cs" /> <Compile Include="LexerExtensions.cs" /> <Compile Include="JSystem.cs" /> <Compile Include="ListExtensions.cs" /> <Compile Include="ObjectExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SetExtensions.cs" /> <Compile Include="StackExtensions.cs" /> <Compile Include="StringBuilderExtensions.cs" /> <Compile Include="StringExtensions.cs" /> <Compile Include="StringTokenizer.cs" /> <Compile Include="SubList.cs" /> <Compile Include="TreeExtensions.cs" /> <Compile Include="TypeExtensions.cs" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 3995cb3..e7ccf7c 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,187 +1,187 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Test</RootNamespace> <AssemblyName>Antlr3.Runtime.Test</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Numerics" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> - <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> + <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.net20.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> - <Name>Antlr3.Runtime</Name> + <Name>Antlr3.Runtime.net20</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Include="Composition\Program.cs" /> <Compile Include="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Include="PreprocessorTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Include="SlimParsing\ITokenSource`1.cs" /> <Compile Include="SlimParsing\ITokenStream`1.cs" /> <Compile Include="SlimParsing\SlimLexer.cs" /> <Compile Include="SlimParsing\SlimStringStream.cs" /> <Compile Include="SlimParsing\SlimToken.cs" /> <Compile Include="SlimParsing\SlimTokenStream.cs" /> <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> <Compile Include="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestDotTreeGenerator.cs" /> <Compile Include="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestFastLexer.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj similarity index 95% rename from Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj rename to Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj index 74492b8..13d6036 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.net20.csproj @@ -1,143 +1,144 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> + <BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>bin\net20\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Debug\Antlr3.Runtime.xml</DocumentationFile> + <DocumentationFile>bin\net20\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>bin\net20\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <DocumentationFile>bin\Release\Antlr3.Runtime.xml</DocumentationFile> + <DocumentationFile>bin\net20\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file
antlr/antlrcs
f4a9231fe4c6288ac7f4b381964e95a20850dcb8
Remove optional dependencies from Antlr3.nuspec
diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index 267509e..f086964 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,37 +1,35 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> <developmentDependency>true</developmentDependency> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> - <dependency id="Antlr3.Runtime.Debug" version="$version$" /> - <dependency id="StringTemplate3" version="$version$" /> </dependencies> </metadata> <files> <!-- Tools --> <file src="Bootstrap\**\*.*" target="tools"/> <!-- Build Configuration --> <file src="Tool\Antlr3.props" target="build"/> <file src="Tool\Antlr3.targets" target="build"/> <file src="Tool\AntlrBuildTask.dll" target="build"/> </files> </package>
antlr/antlrcs
eff1c5a7152e80f83c2bfc091ba20c954b31246c
Add the [AssemblyInformationalVersion] attribute and update [AssemblyFileVersion]
diff --git a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs index d64b2b6..82d2414 100644 --- a/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr3.Runtime.Visualizer/Properties/AssemblyInfo.cs @@ -1,87 +1,88 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr3.Runtime.Visualizer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr3.Runtime.Visualizer")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs index 3b57849..6a5cc90 100644 --- a/Antlr3.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr3.StringTemplate/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.StringTemplate" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.StringTemplate" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a4b023e1-07a4-48c5-b095-1e1beb854b3d" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs index 1651a14..b47ae25 100644 --- a/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ActionScript/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.ActionScript" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.ActionScript" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "aa95e5e0-ddff-4ced-a130-69b0cd02f755" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs index 0d91b41..c2a2962 100644 --- a/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.C/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.C" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.C" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "b8dcb19a-ffa0-4d55-8fd2-747d6c70c8ae" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs index ce620f8..a590e7d 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp2/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.CSharp2" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.CSharp2" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "c30b57a2-68f1-44ec-b14b-3436d52a6233" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs index c17122c..5b7f867 100644 --- a/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.CSharp3/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Target.CSharp3" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Target.CSharp3" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "efdd8135-be27-45be-8fd2-9070ff9df797" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs index 6203146..1f7675d 100644 --- a/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Cpp/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Cpp" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Cpp" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "8e891174-fb0e-45c6-953d-d847b757bcc9" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs index 9ae99ac..7b0a30f 100644 --- a/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Delphi/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Delphi" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Delphi" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "0987d253-96de-4d56-9387-dc6f4293a374" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs index 70afdf8..fa031f1 100644 --- a/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Java/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Java" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Java" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "2388a4ff-439f-48b3-80fd-364f7bccfb9d" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs index 3ec4309..30cb77f 100644 --- a/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.JavaScript/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.JavaScript" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.JavaScript" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "4fbc2549-85b3-43fa-8994-cb4ac111a33c" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs index 1420590..76de352 100644 --- a/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.ObjC/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.ObjC" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.ObjC" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a8b15bc5-58a3-49d3-982d-051730d2bd79" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs index 1c7d398..d64ff81 100644 --- a/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Perl5/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Perl5" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Perl5" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "3d2be877-baf6-4b83-961a-b91aed7b8258" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs index 8e43403..7ef79c9 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Python" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Python" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs index 8e43403..7ef79c9 100644 --- a/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Python3/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Python" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Python" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "e40e91d9-3120-4442-86d8-33571ee23495" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs index 6eca3e9..44b75fd 100644 --- a/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs +++ b/Antlr3.Targets/Antlr3.Targets.Ruby/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Targets.Ruby" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Targets.Ruby" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9471023a-b241-4aed-a706-c8e8fa621dbf" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3.Test/Properties/AssemblyInfo.cs b/Antlr3.Test/Properties/AssemblyInfo.cs index e293dcc..a8a2112 100644 --- a/Antlr3.Test/Properties/AssemblyInfo.cs +++ b/Antlr3.Test/Properties/AssemblyInfo.cs @@ -1,67 +1,68 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "AntlrUnitTests" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Pixel Mine, Inc." )] [assembly: AssemblyProduct( "AntlrUnitTests" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] // Setting ComVisible to false makes the types in this assembly not visible // to COM componenets. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "a0f4c939-114e-4512-8eb1-fad6056493aa" )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr3/Properties/AssemblyInfo.cs b/Antlr3/Properties/AssemblyInfo.cs index 9e79585..7a4ba34 100644 --- a/Antlr3/Properties/AssemblyInfo.cs +++ b/Antlr3/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1f192196-5fb0-4eea-91a1-e9249dd45317" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs index cea8d4a..76b3aca 100644 --- a/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate.Visualizer/Properties/AssemblyInfo.cs @@ -1,87 +1,88 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate.Visualizer")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.7.0")] +[assembly: AssemblyFileVersion("4.0.7.2")] +[assembly: AssemblyInformationalVersion("4.0.7.2-dev")] diff --git a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs index ed17092..70c0fe5 100644 --- a/Antlr4.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.StringTemplate/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Labs, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.StringTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.StringTemplate")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a4b023e1-07a4-48c5-b095-1e1beb854b3d")] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("4.0.7.0")] -[assembly: AssemblyFileVersion("4.0.7.0")] +[assembly: AssemblyFileVersion("4.0.7.2")] +[assembly: AssemblyInformationalVersion("4.0.7.2-dev")] diff --git a/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs b/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs index 3ea3fcc..81d2682 100644 --- a/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs +++ b/Antlr4.Test.StringTemplate/Properties/AssemblyInfo.cs @@ -1,68 +1,69 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Antlr4.Test.StringTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("Antlr4.Test.StringTemplate")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(false)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b9f5baf7-993e-434d-a217-1c8a4e2337a9")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("4.0.6.9004")] [assembly: AssemblyFileVersion("4.0.6.9004")] +[assembly: AssemblyInformationalVersion("4.0.6.9004-dev")] diff --git a/AntlrBuildTask/Properties/AssemblyInfo.cs b/AntlrBuildTask/Properties/AssemblyInfo.cs index 08851b1..25ade7b 100644 --- a/AntlrBuildTask/Properties/AssemblyInfo.cs +++ b/AntlrBuildTask/Properties/AssemblyInfo.cs @@ -1,70 +1,71 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("AntlrBuildTask")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Tunnel Vision Laboratories, LLC")] [assembly: AssemblyProduct("AntlrBuildTask")] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: CLSCompliant(true)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("2028affe-3dfd-4164-9faf-2959ec04f7f7")] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs index 038cddb..d287157 100644 --- a/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Debug/Properties/AssemblyInfo.cs @@ -1,70 +1,71 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.Debug" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime.Debug" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "9f8fa018-6766-404c-9e72-551407e1b173" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs index 00e66a9..5e7c594 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Properties/AssemblyInfo.cs @@ -1,69 +1,70 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2008-2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.JavaExtensions" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime.JavaExtensions" )] [assembly: AssemblyCopyright( "Copyright © Sam Harwell 2013" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "ad48c7f7-0b1d-4b1e-9602-83425cb5699f" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs index 1e0fc38..ccf55ac 100644 --- a/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime.Test/Properties/AssemblyInfo.cs @@ -1,70 +1,71 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime.Test" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Pixel Mine, Inc." )] [assembly: AssemblyProduct( "Antlr3.Runtime.Test" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "1352b15b-eded-4380-9122-acde32f7ff38" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs index cc3425f..b823616 100644 --- a/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs +++ b/Runtime/Antlr3.Runtime/Properties/AssemblyInfo.cs @@ -1,72 +1,73 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using System.Security; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Antlr3.Runtime" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Tunnel Vision Laboratories, LLC" )] [assembly: AssemblyProduct( "Antlr3.Runtime" )] [assembly: AssemblyCopyright("Copyright © Sam Harwell 2013")] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] [assembly: CLSCompliant( true )] [assembly: AllowPartiallyTrustedCallers] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid( "7a0b4db7-f127-4cf5-ac2c-e294957efcd6" )] /* Version information for an assembly consists of four values in the following order: * * Major.Minor.Build.Revision * * These values are updated according to the following: * 1. Major.Minor follows the ANTLR release schedule * 2. Build is incremented each time the C# port is packaged for release (regardless * of whether it's an incremental or nightly). The value resets to zero whenever * the Major or Minor version is incremented. * 3. Revision is the Perforce changelist number associated with the release. */ [assembly: AssemblyVersion("3.5.0.2")] -[assembly: AssemblyFileVersion("3.5.0.2")] +[assembly: AssemblyFileVersion("3.5.0.3")] +[assembly: AssemblyInformationalVersion("3.5.0.3-dev")] diff --git a/build/prep/prepare.ps1 b/build/prep/prepare.ps1 index 8146cc1..46eaca0 100644 --- a/build/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,220 +1,220 @@ # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { echo "The script was run from an invalid working directory." exit 1 } $BuildConfig = "Release" $DebugBuild = false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" #if (!(Test-Path $msbuild)) { # [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') # $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest") #} &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } } if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages -$AntlrVersion = "3.5.0.3-alpha001" -$STVersion = "4.0.7.2-alpha001" +$AntlrVersion = "3.5.0.3-dev" +$STVersion = "4.0.7.2-dev" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols
antlr/antlrcs
84b9b3468cffc9f77f6544d3c737c83c03a8aed5
Mark the Antlr3 package as a development dependency
diff --git a/build/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec index c84239f..267509e 100644 --- a/build/prep/Antlr3.nuspec +++ b/build/prep/Antlr3.nuspec @@ -1,36 +1,37 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata minClientVersion="2.5"> <id>Antlr3</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/antlr/antlrcs</projectUrl> <licenseUrl>https://raw.githubusercontent.com/antlr/antlrcs/master/build/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/antlr/antlrcs/releases/$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3</title> <summary>The C# target of the ANTLR 3 parser generator.</summary> + <developmentDependency>true</developmentDependency> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> <dependency id="Antlr3.Runtime.Debug" version="$version$" /> <dependency id="StringTemplate3" version="$version$" /> </dependencies> </metadata> <files> <!-- Tools --> <file src="Bootstrap\**\*.*" target="tools"/> <!-- Build Configuration --> <file src="Tool\Antlr3.props" target="build"/> <file src="Tool\Antlr3.targets" target="build"/> <file src="Tool\AntlrBuildTask.dll" target="build"/> </files> </package>
antlr/antlrcs
c5620186211a957f5f855867bfe38ca1d82abdba
Add initial .gitattributes
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..14c7e3f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,36 @@ +# Source code files +*.cs text +*.vsixmanifest text +*.config text +*.resx text +*.vstemplate text +*.nuspec text +*.md text +*.txt text +*.ps1 text +*.stg text +*.xml text +LICENSE text + +# SHFB Content Files +*.aml text +*.content text +*.tokens text + +# Projects and solutions +*.sln text +*.csproj text +*.shfbproj text +*.targets text +*.props text + +# Certainly binary files +*.exe binary +*.dll binary +*.pdb binary + +*.docx binary + +*.png binary +*.ico binary +*.snk binary
antlr/antlrcs
88f495fd2ea83426b480880dd43a276b36b072d2
Rename bin/ to build/
diff --git a/.gitignore b/.gitignore index 7ee679b..2e1990c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,35 @@ # ignore thumbnails created by windows Thumbs.db # Ignore files build by Visual Studio *.user *.aps *.pch *.vspscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.cache *.ilk *.log *.sbr *.sln.ide/ -obj/ -[Dd]ebug*/ -[Rr]elease*/ _ReSharper*/ [Tt]est[Rr]esult* +# Ignore build output +bin/ +obj/ + # Ignore prepared output folders -bin/prep/Backup/ -bin/prep/Bootstrap/ -bin/prep/dist/ -bin/prep/nuget/ -bin/prep/Runtime/ -bin/prep/ST3/ -bin/prep/ST4/ -bin/prep/Tool/ +build/prep/Backup/ +build/prep/Bootstrap/ +build/prep/dist/ +build/prep/nuget/ +build/prep/Runtime/ +build/prep/ST3/ +build/prep/ST4/ +build/prep/Tool/ diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index f067d7e..aabe61a 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,140 +1,140 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.ST</RootNamespace> <AssemblyName>Antlr3.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="CommonGroupLoader.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="PathGroupLoader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StringTemplate.cs" /> <Compile Include="StringTemplateErrorListener.cs" /> <Compile Include="StringTemplateGroup.cs" /> <Compile Include="StringTemplateGroupInterface.cs" /> <Compile Include="StringTemplateGroupLoader.cs" /> <Compile Include="StringTemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> <Compile Include="JavaExtensions\ListExtensions.cs" /> <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Include="Language\ASTExpr.cs" /> <Compile Include="Language\Cat.cs" /> <Compile Include="Language\ChunkToken.cs" /> <Compile Include="Language\ConditionalExpr.cs" /> <Compile Include="Language\Expr.cs" /> <Compile Include="Language\FormalArgument.cs" /> <Compile Include="Language\NewlineRef.cs" /> <Compile Include="Language\RegionType.cs" /> <Compile Include="Language\StringRef.cs" /> <Compile Include="Language\StringTemplateAST.cs" /> <Compile Include="Language\StringTemplateToken.cs" /> <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> <Compile Include="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Include="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Include="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Include="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Include="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Include="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Include="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Include="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> <Compile Include="TypeRegistry`1.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> + <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3.sln b/Antlr3.sln index 9cc0ba6..b15fb76 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,218 +1,218 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" ProjectSection(SolutionItems) = preProject - bin\prep\Antlr3.nuspec = bin\prep\Antlr3.nuspec - bin\prep\Antlr3.Runtime.Debug.nuspec = bin\prep\Antlr3.Runtime.Debug.nuspec - bin\prep\Antlr3.Runtime.nuspec = bin\prep\Antlr3.Runtime.nuspec - bin\prep\LICENSE.txt = bin\prep\LICENSE.txt - bin\prep\prepare.ps1 = bin\prep\prepare.ps1 - bin\prep\StringTemplate3.nuspec = bin\prep\StringTemplate3.nuspec - bin\prep\StringTemplate4.nuspec = bin\prep\StringTemplate4.nuspec - bin\prep\StringTemplate4.Visualizer.nuspec = bin\prep\StringTemplate4.Visualizer.nuspec + build\prep\Antlr3.nuspec = build\prep\Antlr3.nuspec + build\prep\Antlr3.Runtime.Debug.nuspec = build\prep\Antlr3.Runtime.Debug.nuspec + build\prep\Antlr3.Runtime.nuspec = build\prep\Antlr3.Runtime.nuspec + build\prep\LICENSE.txt = build\prep\LICENSE.txt + build\prep\prepare.ps1 = build\prep\prepare.ps1 + build\prep\StringTemplate3.nuspec = build\prep\StringTemplate3.nuspec + build\prep\StringTemplate4.nuspec = build\prep\StringTemplate4.nuspec + build\prep\StringTemplate4.Visualizer.nuspec = build\prep\StringTemplate4.Visualizer.nuspec EndProjectSection EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index bf106f8..cbd5bf1 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,507 +1,507 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> + <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index e8d69de..b837da4 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,159 +1,159 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(ProjectDir)..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(ProjectDir)..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> + <Import Project="$(ProjectDir)..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index d00d11e..3995cb3 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,187 +1,187 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Test</RootNamespace> <AssemblyName>Antlr3.Runtime.Test</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Numerics" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Include="Composition\Program.cs" /> <Compile Include="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Include="PreprocessorTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Include="SlimParsing\ITokenSource`1.cs" /> <Compile Include="SlimParsing\ITokenStream`1.cs" /> <Compile Include="SlimParsing\SlimLexer.cs" /> <Compile Include="SlimParsing\SlimStringStream.cs" /> <Compile Include="SlimParsing\SlimToken.cs" /> <Compile Include="SlimParsing\SlimTokenStream.cs" /> <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> <Compile Include="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestDotTreeGenerator.cs" /> <Compile Include="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestFastLexer.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\..\bin\Bootstrap</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(ProjectDir)..\..\build\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(ProjectDir)..\..\build\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\..\bin\Bootstrap\Antlr3.targets" /> + <Import Project="$(ProjectDir)..\..\build\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/bin/Bootstrap/Antlr3.Runtime.Debug.dll b/build/Bootstrap/Antlr3.Runtime.Debug.dll similarity index 100% rename from bin/Bootstrap/Antlr3.Runtime.Debug.dll rename to build/Bootstrap/Antlr3.Runtime.Debug.dll diff --git a/bin/Bootstrap/Antlr3.Runtime.dll b/build/Bootstrap/Antlr3.Runtime.dll similarity index 100% rename from bin/Bootstrap/Antlr3.Runtime.dll rename to build/Bootstrap/Antlr3.Runtime.dll diff --git a/bin/Bootstrap/Antlr3.exe b/build/Bootstrap/Antlr3.exe old mode 100755 new mode 100644 similarity index 100% rename from bin/Bootstrap/Antlr3.exe rename to build/Bootstrap/Antlr3.exe diff --git a/bin/Bootstrap/Antlr3.exe.config b/build/Bootstrap/Antlr3.exe.config similarity index 100% rename from bin/Bootstrap/Antlr3.exe.config rename to build/Bootstrap/Antlr3.exe.config diff --git a/bin/Bootstrap/Antlr3.targets b/build/Bootstrap/Antlr3.targets similarity index 100% rename from bin/Bootstrap/Antlr3.targets rename to build/Bootstrap/Antlr3.targets diff --git a/bin/Bootstrap/Antlr4.StringTemplate.Visualizer.dll b/build/Bootstrap/Antlr4.StringTemplate.Visualizer.dll similarity index 100% rename from bin/Bootstrap/Antlr4.StringTemplate.Visualizer.dll rename to build/Bootstrap/Antlr4.StringTemplate.Visualizer.dll diff --git a/bin/Bootstrap/Antlr4.StringTemplate.dll b/build/Bootstrap/Antlr4.StringTemplate.dll similarity index 100% rename from bin/Bootstrap/Antlr4.StringTemplate.dll rename to build/Bootstrap/Antlr4.StringTemplate.dll diff --git a/bin/Bootstrap/AntlrBuildTask.dll b/build/Bootstrap/AntlrBuildTask.dll similarity index 100% rename from bin/Bootstrap/AntlrBuildTask.dll rename to build/Bootstrap/AntlrBuildTask.dll diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/AST.stg b/build/Bootstrap/Codegen/Templates/CSharp2/AST.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/AST.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/AST.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/ASTDbg.stg b/build/Bootstrap/Codegen/Templates/CSharp2/ASTDbg.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/ASTDbg.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/ASTDbg.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/ASTParser.stg b/build/Bootstrap/Codegen/Templates/CSharp2/ASTParser.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/ASTParser.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/ASTParser.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/ASTTreeParser.stg b/build/Bootstrap/Codegen/Templates/CSharp2/ASTTreeParser.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/ASTTreeParser.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/ASTTreeParser.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/CSharp2.stg b/build/Bootstrap/Codegen/Templates/CSharp2/CSharp2.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/CSharp2.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/CSharp2.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/Dbg.stg b/build/Bootstrap/Codegen/Templates/CSharp2/Dbg.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/Dbg.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/Dbg.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp2/ST.stg b/build/Bootstrap/Codegen/Templates/CSharp2/ST.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp2/ST.stg rename to build/Bootstrap/Codegen/Templates/CSharp2/ST.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/AST.stg b/build/Bootstrap/Codegen/Templates/CSharp3/AST.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/AST.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/AST.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/ASTDbg.stg b/build/Bootstrap/Codegen/Templates/CSharp3/ASTDbg.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/ASTDbg.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/ASTDbg.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/ASTParser.stg b/build/Bootstrap/Codegen/Templates/CSharp3/ASTParser.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/ASTParser.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/ASTParser.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/ASTTreeParser.stg b/build/Bootstrap/Codegen/Templates/CSharp3/ASTTreeParser.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/ASTTreeParser.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/ASTTreeParser.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/CSharp3.stg b/build/Bootstrap/Codegen/Templates/CSharp3/CSharp3.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/CSharp3.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/CSharp3.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/Dbg.stg b/build/Bootstrap/Codegen/Templates/CSharp3/Dbg.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/Dbg.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/Dbg.stg diff --git a/bin/Bootstrap/Codegen/Templates/CSharp3/ST.stg b/build/Bootstrap/Codegen/Templates/CSharp3/ST.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/CSharp3/ST.stg rename to build/Bootstrap/Codegen/Templates/CSharp3/ST.stg diff --git a/bin/Bootstrap/Codegen/Templates/LeftRecursiveRules.stg b/build/Bootstrap/Codegen/Templates/LeftRecursiveRules.stg similarity index 100% rename from bin/Bootstrap/Codegen/Templates/LeftRecursiveRules.stg rename to build/Bootstrap/Codegen/Templates/LeftRecursiveRules.stg diff --git a/bin/Bootstrap/Targets/Antlr3.Targets.CSharp2.dll b/build/Bootstrap/Targets/Antlr3.Targets.CSharp2.dll similarity index 100% rename from bin/Bootstrap/Targets/Antlr3.Targets.CSharp2.dll rename to build/Bootstrap/Targets/Antlr3.Targets.CSharp2.dll diff --git a/bin/Bootstrap/Targets/Antlr3.Targets.CSharp3.dll b/build/Bootstrap/Targets/Antlr3.Targets.CSharp3.dll similarity index 100% rename from bin/Bootstrap/Targets/Antlr3.Targets.CSharp3.dll rename to build/Bootstrap/Targets/Antlr3.Targets.CSharp3.dll diff --git a/bin/Bootstrap/Tool/Templates/depend.stg b/build/Bootstrap/Tool/Templates/depend.stg similarity index 100% rename from bin/Bootstrap/Tool/Templates/depend.stg rename to build/Bootstrap/Tool/Templates/depend.stg diff --git a/bin/Bootstrap/Tool/Templates/dot/dot.stg b/build/Bootstrap/Tool/Templates/dot/dot.stg similarity index 100% rename from bin/Bootstrap/Tool/Templates/dot/dot.stg rename to build/Bootstrap/Tool/Templates/dot/dot.stg diff --git a/bin/Bootstrap/Tool/Templates/messages/formats/antlr.stg b/build/Bootstrap/Tool/Templates/messages/formats/antlr.stg similarity index 100% rename from bin/Bootstrap/Tool/Templates/messages/formats/antlr.stg rename to build/Bootstrap/Tool/Templates/messages/formats/antlr.stg diff --git a/bin/Bootstrap/Tool/Templates/messages/formats/vs2005.stg b/build/Bootstrap/Tool/Templates/messages/formats/vs2005.stg similarity index 100% rename from bin/Bootstrap/Tool/Templates/messages/formats/vs2005.stg rename to build/Bootstrap/Tool/Templates/messages/formats/vs2005.stg diff --git a/bin/Bootstrap/Tool/Templates/messages/languages/en.stg b/build/Bootstrap/Tool/Templates/messages/languages/en.stg similarity index 100% rename from bin/Bootstrap/Tool/Templates/messages/languages/en.stg rename to build/Bootstrap/Tool/Templates/messages/languages/en.stg diff --git a/bin/prep/7z.dll b/build/prep/7z.dll similarity index 100% rename from bin/prep/7z.dll rename to build/prep/7z.dll diff --git a/bin/prep/7z.exe b/build/prep/7z.exe old mode 100755 new mode 100644 similarity index 100% rename from bin/prep/7z.exe rename to build/prep/7z.exe diff --git a/bin/prep/Antlr3.Runtime.Debug.nuspec b/build/prep/Antlr3.Runtime.Debug.nuspec similarity index 100% rename from bin/prep/Antlr3.Runtime.Debug.nuspec rename to build/prep/Antlr3.Runtime.Debug.nuspec diff --git a/bin/prep/Antlr3.Runtime.nuspec b/build/prep/Antlr3.Runtime.nuspec similarity index 100% rename from bin/prep/Antlr3.Runtime.nuspec rename to build/prep/Antlr3.Runtime.nuspec diff --git a/bin/prep/Antlr3.nuspec b/build/prep/Antlr3.nuspec similarity index 100% rename from bin/prep/Antlr3.nuspec rename to build/prep/Antlr3.nuspec diff --git a/bin/prep/LICENSE.txt b/build/prep/LICENSE.txt similarity index 100% rename from bin/prep/LICENSE.txt rename to build/prep/LICENSE.txt diff --git a/bin/prep/NuGet.exe b/build/prep/NuGet.exe similarity index 100% rename from bin/prep/NuGet.exe rename to build/prep/NuGet.exe diff --git a/bin/prep/StringTemplate3.nuspec b/build/prep/StringTemplate3.nuspec similarity index 100% rename from bin/prep/StringTemplate3.nuspec rename to build/prep/StringTemplate3.nuspec diff --git a/bin/prep/StringTemplate4.Visualizer.nuspec b/build/prep/StringTemplate4.Visualizer.nuspec similarity index 100% rename from bin/prep/StringTemplate4.Visualizer.nuspec rename to build/prep/StringTemplate4.Visualizer.nuspec diff --git a/bin/prep/StringTemplate4.nuspec b/build/prep/StringTemplate4.nuspec similarity index 100% rename from bin/prep/StringTemplate4.nuspec rename to build/prep/StringTemplate4.nuspec diff --git a/bin/prep/prepare.ps1 b/build/prep/prepare.ps1 similarity index 62% rename from bin/prep/prepare.ps1 rename to build/prep/prepare.ps1 index 8de575a..8146cc1 100644 --- a/bin/prep/prepare.ps1 +++ b/build/prep/prepare.ps1 @@ -1,220 +1,220 @@ # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { echo "The script was run from an invalid working directory." exit 1 } $BuildConfig = "Release" $DebugBuild = false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" #if (!(Test-Path $msbuild)) { # [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') # $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest") #} &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files if ($DebugBuild) { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } else { $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" } $BootstrapBinaries | ForEach-Object { - copy -force "..\$BuildConfig\$_" "..\Bootstrap" + copy -force "..\..\bin\$BuildConfig\$_" "..\Bootstrap" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } } if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } -copy -force "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" +copy -force "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } -copy -force "..\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" +copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } -copy -force "..\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" +copy -force "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } -copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" +copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } -copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" +copy -force "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } -copy -r -force "..\$BuildConfig\Tool\*" "..\Bootstrap\Tool" +copy -r -force "..\..\bin\$BuildConfig\Tool\*" "..\Bootstrap\Tool" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 -copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" -copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" -copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" -copy "..\$BuildConfig\Antlr3.exe" ".\Tool" -copy "..\$BuildConfig\Antlr3.exe.config" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.exe" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.exe.config" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" if ($DebugBuild) { - copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" + copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" } -copy "..\$BuildConfig\Antlr3.props" ".\Tool" -copy "..\$BuildConfig\Antlr3.targets" ".\Tool" -copy "..\$BuildConfig\AntlrBuildTask.dll" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.props" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.targets" ".\Tool" +copy "..\..\bin\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder -copy "..\$BuildConfig\Antlr3.pdb" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" if ($DebugBuild) { - copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" + copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" } -copy "..\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" -copy "..\$BuildConfig\Antlr3.xml" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" -copy "..\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" if ($DebugBuild) { - copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" + copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" } -copy "..\$BuildConfig\AntlrBuildTask.xml" ".\Tool" +copy "..\..\bin\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" -copy -r "..\$BuildConfig\Codegen\*" ".\Tool\Codegen" -copy -r "..\$BuildConfig\Targets\*.dll" ".\Tool\Targets" -copy -r "..\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" -copy -r "..\$BuildConfig\Targets\*.xml" ".\Tool\Targets" -copy -r "..\$BuildConfig\Tool\*" ".\Tool\Tool" +copy -r "..\..\bin\$BuildConfig\Codegen\*" ".\Tool\Codegen" +copy -r "..\..\bin\$BuildConfig\Targets\*.dll" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\Targets\*.xml" ".\Tool\Targets" +copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" -copy "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" -copy "..\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" -copy "..\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" -copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" -copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" -copy -r "..\$BuildConfig\Tool\*" ".\Bootstrap\Tool" +copy "..\..\bin\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" +copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" +copy "..\..\bin\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" +copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" +copy "..\..\bin\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" +copy -r "..\..\bin\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist -copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" -copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" -copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" +copy "..\..\bin\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-alpha001" $STVersion = "4.0.7.2-alpha001" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols
antlr/antlrcs
a33ffff58bf0ebbceafe6f7d316d69d32c318973
Fix .gitignore ignoring important files and folders
diff --git a/.gitignore b/.gitignore index 28e479b..7ee679b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,34 @@ -#ignore thumbnails created by windows +# ignore thumbnails created by windows Thumbs.db -#Ignore files build by Visual Studio -*.obj -*.exe -*.pdb + +# Ignore files build by Visual Studio *.user *.aps *.pch *.vspscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh -*.bak *.cache *.ilk *.log -[Bb]in -[Dd]ebug*/ -*.lib *.sbr +*.sln.ide/ obj/ +[Dd]ebug*/ [Rr]elease*/ _ReSharper*/ [Tt]est[Rr]esult* + +# Ignore prepared output folders +bin/prep/Backup/ +bin/prep/Bootstrap/ +bin/prep/dist/ +bin/prep/nuget/ +bin/prep/Runtime/ +bin/prep/ST3/ +bin/prep/ST4/ +bin/prep/Tool/
antlr/antlrcs
fab69887ef565739ddbaea7775abb1f65025f6c2
Add build scripts to solution
diff --git a/Antlr3.sln b/Antlr3.sln index 5dbb1b0..9cc0ba6 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,205 +1,218 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{D2D979DC-1305-4C44-B21A-9EB3EEE95F7B}" + ProjectSection(SolutionItems) = preProject + bin\prep\Antlr3.nuspec = bin\prep\Antlr3.nuspec + bin\prep\Antlr3.Runtime.Debug.nuspec = bin\prep\Antlr3.Runtime.Debug.nuspec + bin\prep\Antlr3.Runtime.nuspec = bin\prep\Antlr3.Runtime.nuspec + bin\prep\LICENSE.txt = bin\prep\LICENSE.txt + bin\prep\prepare.ps1 = bin\prep\prepare.ps1 + bin\prep\StringTemplate3.nuspec = bin\prep\StringTemplate3.nuspec + bin\prep\StringTemplate4.nuspec = bin\prep\StringTemplate4.nuspec + bin\prep\StringTemplate4.Visualizer.nuspec = bin\prep\StringTemplate4.Visualizer.nuspec + EndProjectSection +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} + {D2D979DC-1305-4C44-B21A-9EB3EEE95F7B} = {C0B451C4-EAFC-4942-B18E-49EC73DABABD} EndGlobalSection EndGlobal
antlr/antlrcs
cb190a0a9fc11421b2864ce5eb6d383c66835315
Fix several paths following relocation of projects
diff --git a/Antlr3.sln b/Antlr3.sln index 1f4e5e6..5dbb1b0 100644 --- a/Antlr3.sln +++ b/Antlr3.sln @@ -1,205 +1,205 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{3A92893D-7810-4D8B-80D8-E1E8D151FA73}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C0B451C4-EAFC-4942-B18E-49EC73DABABD}" ProjectSection(SolutionItems) = preProject Antlr3.vsmdi = Antlr3.vsmdi AntlrTestConfig.testrunconfig = AntlrTestConfig.testrunconfig PublishingProcess.txt = PublishingProcess.txt EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3", "Antlr3\Antlr3.csproj", "{2AB8CAED-C046-4F05-8B18-6948100D2FE7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.StringTemplate", "Antlr3.StringTemplate\Antlr3.StringTemplate.csproj", "{B5910BE2-DE21-4AA9-95C1-486F42B9E794}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Test", "Antlr3.Test\Antlr3.Test.csproj", "{8B58597B-058E-4D7A-B83E-5269BDABBE2C}" ProjectSection(ProjectDependencies) = postProject {696F611F-003B-477D-AFA0-4F15478C9D32} = {696F611F-003B-477D-AFA0-4F15478C9D32} {67012F41-94F9-48E6-9677-E3C56E42917F} = {67012F41-94F9-48E6-9677-E3C56E42917F} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {8EFEA650-B9F6-498B-8865-A78103CCB590} {46171154-755A-4595-99AA-537D684BCA28} = {46171154-755A-4595-99AA-537D684BCA28} {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {6689F268-CE30-4CEC-AAD5-2DF72C43623C} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} {1551D1E7-D515-4488-A889-5DEBB4950880} = {1551D1E7-D515-4488-A889-5DEBB4950880} {9444ACEF-784D-47B0-B317-F374782FA511} = {9444ACEF-784D-47B0-B317-F374782FA511} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ActionScript", "Antlr3.Targets\Antlr3.Targets.ActionScript\Antlr3.Targets.ActionScript.csproj", "{2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.C", "Antlr3.Targets\Antlr3.Targets.C\Antlr3.Targets.C.csproj", "{ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Cpp", "Antlr3.Targets\Antlr3.Targets.Cpp\Antlr3.Targets.Cpp.csproj", "{46171154-755A-4595-99AA-537D684BCA28}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp2", "Antlr3.Targets\Antlr3.Targets.CSharp2\Antlr3.Targets.CSharp2.csproj", "{5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.CSharp3", "Antlr3.Targets\Antlr3.Targets.CSharp3\Antlr3.Targets.CSharp3.csproj", "{67012F41-94F9-48E6-9677-E3C56E42917F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Delphi", "Antlr3.Targets\Antlr3.Targets.Delphi\Antlr3.Targets.Delphi.csproj", "{6689F268-CE30-4CEC-AAD5-2DF72C43623C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Java", "Antlr3.Targets\Antlr3.Targets.Java\Antlr3.Targets.Java.csproj", "{696F611F-003B-477D-AFA0-4F15478C9D32}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.JavaScript", "Antlr3.Targets\Antlr3.Targets.JavaScript\Antlr3.Targets.JavaScript.csproj", "{1551D1E7-D515-4488-A889-5DEBB4950880}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.ObjC", "Antlr3.Targets\Antlr3.Targets.ObjC\Antlr3.Targets.ObjC.csproj", "{8EFEA650-B9F6-498B-8865-A78103CCB590}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Perl5", "Antlr3.Targets\Antlr3.Targets.Perl5\Antlr3.Targets.Perl5.csproj", "{9444ACEF-784D-47B0-B317-F374782FA511}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python", "Antlr3.Targets\Antlr3.Targets.Python\Antlr3.Targets.Python.csproj", "{1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Ruby", "Antlr3.Targets\Antlr3.Targets.Ruby\Antlr3.Targets.Ruby.csproj", "{64418260-E75A-4556-BB7E-8BDAAFC2EFB9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime", "Runtime\Antlr3.Runtime\Antlr3.Runtime.csproj", "{8FDC0A87-9005-4D5A-AB75-E55CEB575559}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Debug", "Runtime\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj", "{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.JavaExtensions", "Runtime\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj", "{A7EEC557-EB14-451C-9616-B7A61F4ECE69}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Test", "Runtime\Antlr3.Runtime.Test\Antlr3.Runtime.Test.csproj", "{19B965DE-5100-4064-A580-159644F6980E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntlrBuildTask", "AntlrBuildTask\AntlrBuildTask.csproj", "{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate", "Antlr4.StringTemplate\Antlr4.StringTemplate.csproj", "{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.Test.StringTemplate", "Antlr4.Test.StringTemplate\Antlr4.Test.StringTemplate.csproj", "{1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr4.StringTemplate.Visualizer", "Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj", "{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Runtime.Visualizer", "Antlr3.Runtime.Visualizer\Antlr3.Runtime.Visualizer.csproj", "{2F59DA1C-A502-440C-ABE8-240BDE2D0664}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Antlr3.Targets.Python3", "Antlr3.Targets\Antlr3.Targets.Python3\Antlr3.Targets.Python3.csproj", "{5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}" EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = Antlr3.vsmdi EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2AB8CAED-C046-4F05-8B18-6948100D2FE7}.Release|Any CPU.Build.0 = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Debug|Any CPU.Build.0 = Debug|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.ActiveCfg = Release|Any CPU {B5910BE2-DE21-4AA9-95C1-486F42B9E794}.Release|Any CPU.Build.0 = Release|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.ActiveCfg = Debug|Any CPU {8B58597B-058E-4D7A-B83E-5269BDABBE2C}.Release|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4}.Release|Any CPU.Build.0 = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6}.Release|Any CPU.Build.0 = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Debug|Any CPU.Build.0 = Debug|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.ActiveCfg = Release|Any CPU {46171154-755A-4595-99AA-537D684BCA28}.Release|Any CPU.Build.0 = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9}.Release|Any CPU.Build.0 = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Debug|Any CPU.Build.0 = Debug|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.ActiveCfg = Release|Any CPU {67012F41-94F9-48E6-9677-E3C56E42917F}.Release|Any CPU.Build.0 = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.ActiveCfg = Release|Any CPU {6689F268-CE30-4CEC-AAD5-2DF72C43623C}.Release|Any CPU.Build.0 = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Debug|Any CPU.Build.0 = Debug|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.ActiveCfg = Release|Any CPU {696F611F-003B-477D-AFA0-4F15478C9D32}.Release|Any CPU.Build.0 = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Debug|Any CPU.Build.0 = Debug|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.ActiveCfg = Release|Any CPU {1551D1E7-D515-4488-A889-5DEBB4950880}.Release|Any CPU.Build.0 = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Debug|Any CPU.Build.0 = Debug|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EFEA650-B9F6-498B-8865-A78103CCB590}.Release|Any CPU.Build.0 = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Debug|Any CPU.Build.0 = Debug|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.ActiveCfg = Release|Any CPU {9444ACEF-784D-47B0-B317-F374782FA511}.Release|Any CPU.Build.0 = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB}.Release|Any CPU.Build.0 = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Debug|Any CPU.Build.0 = Debug|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {64418260-E75A-4556-BB7E-8BDAAFC2EFB9}.Release|Any CPU.Build.0 = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.ActiveCfg = Release|Any CPU {8FDC0A87-9005-4D5A-AB75-E55CEB575559}.Release|Any CPU.Build.0 = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EE27A90-B023-42C9-AAF1-52B0424C5D0B}.Release|Any CPU.Build.0 = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7EEC557-EB14-451C-9616-B7A61F4ECE69}.Release|Any CPU.Build.0 = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Debug|Any CPU.Build.0 = Debug|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.ActiveCfg = Release|Any CPU {19B965DE-5100-4064-A580-159644F6980E}.Release|Any CPU.Build.0 = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Debug|Any CPU.Build.0 = Debug|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.ActiveCfg = Release|Any CPU {60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}.Release|Any CPU.Build.0 = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Debug|Any CPU.Build.0 = Debug|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE9B7DA2-35DD-46CC-B768-DAEE3C298660}.Release|Any CPU.Build.0 = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B70CBF4-B592-4A9C-B7B3-AD1A087F4B9C}.Release|Any CPU.Build.0 = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}.Release|Any CPU.Build.0 = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F59DA1C-A502-440C-ABE8-240BDE2D0664}.Release|Any CPU.Build.0 = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {2A03CB56-C3E2-4B65-92C0-004C9D78E2A4} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {ABFF04E1-91CE-4F31-AAA0-0C70E3DBB4A6} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {46171154-755A-4595-99AA-537D684BCA28} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5CBAC55A-A209-45CA-9F57-D0BFFFE2B7F9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {67012F41-94F9-48E6-9677-E3C56E42917F} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {6689F268-CE30-4CEC-AAD5-2DF72C43623C} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {696F611F-003B-477D-AFA0-4F15478C9D32} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1551D1E7-D515-4488-A889-5DEBB4950880} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {8EFEA650-B9F6-498B-8865-A78103CCB590} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {9444ACEF-784D-47B0-B317-F374782FA511} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {1DEA6EB4-2288-4B6C-B5F4-1D102B8745BB} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {64418260-E75A-4556-BB7E-8BDAAFC2EFB9} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} {5B7F1199-FB67-4AC1-A482-6BF1DA6CCDC5} = {3A92893D-7810-4D8B-80D8-E1E8D151FA73} EndGlobalSection EndGlobal diff --git a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj index 9c52017..e94ecc8 100644 --- a/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj +++ b/Runtime/Antlr3.Runtime.Debug/Antlr3.Runtime.Debug.csproj @@ -1,79 +1,79 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime.Debug</RootNamespace> <AssemblyName>Antlr3.Runtime.Debug</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.Runtime.Debug.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="BlankDebugEventListener.cs" /> <Compile Include="DebugEventHub.cs" /> <Compile Include="DebugEventListenerConstants.cs" /> <Compile Include="DebugEventRepeater.cs" /> <Compile Include="DebugEventSocketProxy.cs" /> <Compile Include="DebugParser.cs" /> <Compile Include="DebugTokenStream.cs" /> <Compile Include="DebugTreeAdaptor.cs" /> <Compile Include="DebugTreeNodeStream.cs" /> <Compile Include="DebugTreeParser.cs" /> <Compile Include="JavaExtensions\ExceptionExtensions.cs" /> <Compile Include="Misc\DoubleKeyMap`3.cs" /> <Compile Include="Misc\Stats.cs" /> - <None Include="..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk"> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="ParserDebugger.cs" /> <Compile Include="ParseTreeBuilder.cs" /> <Compile Include="Profiler.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RemoteDebugEventSocketListener.cs" /> <Compile Include="TraceDebugEventListener.cs" /> <Compile Include="Tracer.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj index 2c90504..c168b80 100644 --- a/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj +++ b/Runtime/Antlr3.Runtime.JavaExtensions/Antlr3.Runtime.JavaExtensions.csproj @@ -1,91 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.JavaExtensions</RootNamespace> <AssemblyName>Antlr3.Runtime.JavaExtensions</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> - <AssemblyOriginatorKeyFile>..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data.DataSetExtensions"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="DictionaryExtensions.cs" /> <Compile Include="ExceptionExtensions.cs" /> <Compile Include="IOExtensions.cs" /> <Compile Include="LexerExtensions.cs" /> <Compile Include="JSystem.cs" /> <Compile Include="ListExtensions.cs" /> <Compile Include="ObjectExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SetExtensions.cs" /> <Compile Include="StackExtensions.cs" /> <Compile Include="StringBuilderExtensions.cs" /> <Compile Include="StringExtensions.cs" /> <Compile Include="StringTokenizer.cs" /> <Compile Include="SubList.cs" /> <Compile Include="TreeExtensions.cs" /> <Compile Include="TypeExtensions.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup> - <None Include="..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk"> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj index 75c4cac..d00d11e 100644 --- a/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj +++ b/Runtime/Antlr3.Runtime.Test/Antlr3.Runtime.Test.csproj @@ -1,187 +1,187 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{19B965DE-5100-4064-A580-159644F6980E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3.Runtime.Test</RootNamespace> <AssemblyName>Antlr3.Runtime.Test</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.Numerics" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\..\..\..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> + <ProjectReference Include="..\..\Antlr3.StringTemplate\Antlr3.StringTemplate.csproj"> <Project>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</Project> <Name>Antlr3.StringTemplate</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime.JavaExtensions\Antlr3.Runtime.JavaExtensions.csproj"> <Project>{A7EEC557-EB14-451C-9616-B7A61F4ECE69}</Project> <Name>Antlr3.Runtime.JavaExtensions</Name> </ProjectReference> <ProjectReference Include="..\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Antlr3 Include="SimpleExpression.g3" /> <Antlr3 Include="FastSimpleExpression.g3" /> <None Include="JavaCompat\Expr.g3" /> <Antlr3 Include="BuildOptions\DebugGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="BuildOptions\DebugTreeGrammar.g3"> <!--<GrammarOptions>-debug</GrammarOptions>--> </Antlr3> <Antlr3 Include="StringTemplateOutput.g3" /> <Antlr3 Include="TestActionFeatures.g3" /> <Antlr3 Include="SemanticPredicateReduction.g3" /> <Antlr3 Include="Composition\Reduce.g3" /> <Antlr3 Include="Composition\Simplify.g3" /> <Antlr3 Include="Composition\VecMath.g3" /> <AntlrAbstractGrammar Include="Composition\VecMath_Lexer.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <AntlrAbstractGrammar Include="Composition\VecMath_Parser.g3"> <Generator>MSBuild:Compile</Generator> </AntlrAbstractGrammar> <Antlr3 Include="PreprocessorLexer.g3" /> <Antlr3 Include="SynpredTreeParser.g3" /> </ItemGroup> <ItemGroup> <Compile Include="Composition\Program.cs" /> <Compile Include="PreprocessorLexer.g3.cs"> <DependentUpon>PreprocessorLexer.g3</DependentUpon> </Compile> <Compile Include="PreprocessorTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SemanticPredicateReduction.g3.lexer.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SemanticPredicateReduction.g3.parser.cs"> <DependentUpon>SemanticPredicateReduction.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionLexerHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="SimpleExpressionParserHelper.cs"> <DependentUpon>SimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionLexerHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="FastSimpleExpressionParserHelper.cs"> <DependentUpon>FastSimpleExpression.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarLexerHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugGrammarParserHelper.cs"> <DependentUpon>DebugGrammar.g3</DependentUpon> </Compile> <Compile Include="BuildOptions\DebugTreeGrammarHelper.cs"> <DependentUpon>DebugTreeGrammar.g3</DependentUpon> </Compile> <Compile Include="SlimParsing\ITokenSource`1.cs" /> <Compile Include="SlimParsing\ITokenStream`1.cs" /> <Compile Include="SlimParsing\SlimLexer.cs" /> <Compile Include="SlimParsing\SlimStringStream.cs" /> <Compile Include="SlimParsing\SlimToken.cs" /> <Compile Include="SlimParsing\SlimTokenStream.cs" /> <Compile Include="SlimParsing\Tree\ITreeAdaptor`1.cs" /> <Compile Include="SlimParsing\Tree\ITreeFactory.cs" /> <Compile Include="SlimParsing\Tree\ITreeNodeStream`1.cs" /> <Compile Include="StringTemplateOutput.g3.lexer.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="StringTemplateOutput.g3.parser.cs"> <DependentUpon>StringTemplateOutput.g3</DependentUpon> </Compile> <Compile Include="SynpredTreeParser.g3.cs"> <DependentUpon>SynpredTreeParser.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.lexer.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestActionFeatures.g3.parser.cs"> <DependentUpon>TestActionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestDotTreeGenerator.cs" /> <Compile Include="TestExpressionFeatures.g3.lexer.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestExpressionFeatures.g3.parser.cs"> <DependentUpon>TestExpressionFeatures.g3</DependentUpon> </Compile> <Compile Include="TestFastLexer.cs" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileGrammarLexerHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="BuildOptions\ProfileGrammarParserHelper.cs"> <DependentUpon>ProfileGrammar.g3</DependentUpon> </None> <None Include="TestExpressionFeatures.g3" /> </ItemGroup> <ItemGroup> <None Include="BuildOptions\ProfileTreeGrammar.g3"> <!--<GrammarOptions>-profile</GrammarOptions>--> </None> <None Include="BuildOptions\ProfileTreeGrammarHelper.cs"> <DependentUpon>ProfileTreeGrammar.g3</DependentUpon> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> - <AntlrBuildTaskPath>$(ProjectDir)..\..\..\..\..\..\bin\Bootstrap</AntlrBuildTaskPath> + <AntlrBuildTaskPath>$(ProjectDir)..\..\bin\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> - <AntlrToolPath>$(ProjectDir)..\..\..\..\..\..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> + <AntlrToolPath>$(ProjectDir)..\..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> - <Import Project="$(ProjectDir)..\..\..\..\..\..\bin\Bootstrap\Antlr3.targets" /> + <Import Project="$(ProjectDir)..\..\bin\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj index 5da739f..74492b8 100644 --- a/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj +++ b/Runtime/Antlr3.Runtime/Antlr3.Runtime.csproj @@ -1,143 +1,143 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.Runtime</RootNamespace> <AssemblyName>Antlr3.Runtime</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> - <AssemblyOriginatorKeyFile>..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> + <AssemblyOriginatorKeyFile>..\..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Release\Antlr3.Runtime.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> </ItemGroup> <ItemGroup> <Compile Include="ANTLRFileStream.cs" /> <Compile Include="ANTLRInputStream.cs" /> <Compile Include="ANTLRReaderStream.cs" /> <Compile Include="ANTLRStringStream.cs" /> <Compile Include="AstParserRuleReturnScope`2.cs" /> <Compile Include="BaseRecognizer.cs" /> <Compile Include="BitSet.cs" /> <Compile Include="BufferedTokenStream.cs" /> <Compile Include="CharStreamConstants.cs" /> <Compile Include="CharStreamState.cs" /> <Compile Include="ClassicToken.cs" /> <Compile Include="CommonToken.cs" /> <Compile Include="CommonTokenStream.cs" /> <Compile Include="Debug\IDebugEventListener.cs" /> <Compile Include="DFA.cs" /> <Compile Include="EarlyExitException.cs" /> <Compile Include="FailedPredicateException.cs" /> <Compile Include="GrammarRuleAttribute.cs" /> <Compile Include="IAstRuleReturnScope.cs" /> <Compile Include="IAstRuleReturnScope`1.cs" /> <Compile Include="ICharStream.cs" /> <Compile Include="IIntStream.cs" /> <Compile Include="IRuleReturnScope.cs" /> <Compile Include="IRuleReturnScope`1.cs" /> <Compile Include="ITemplateRuleReturnScope.cs" /> <Compile Include="ITemplateRuleReturnScope`1.cs" /> <Compile Include="IToken.cs" /> <Compile Include="ITokenSource.cs" /> <Compile Include="ITokenStream.cs" /> <Compile Include="ITokenStreamInformation.cs" /> <Compile Include="LegacyCommonTokenStream.cs" /> <Compile Include="Lexer.cs" /> <Compile Include="Misc\FastQueue.cs" /> <Compile Include="Misc\FunctionDelegates.cs" /> <Compile Include="Misc\ListStack`1.cs" /> <Compile Include="Misc\LookaheadStream.cs" /> <Compile Include="MismatchedNotSetException.cs" /> <Compile Include="MismatchedRangeException.cs" /> <Compile Include="MismatchedSetException.cs" /> <Compile Include="MismatchedTokenException.cs" /> <Compile Include="MismatchedTreeNodeException.cs" /> <Compile Include="MissingTokenException.cs" /> <Compile Include="NoViableAltException.cs" /> <Compile Include="Parser.cs" /> <Compile Include="ParserRuleReturnScope.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="RecognitionException.cs" /> <Compile Include="RecognizerSharedState.cs" /> <Compile Include="TemplateParserRuleReturnScope`2.cs" /> <Compile Include="TokenChannels.cs" /> <Compile Include="TokenRewriteStream.cs" /> <Compile Include="Tokens.cs" /> <Compile Include="TokenTypes.cs" /> <Compile Include="Tree\AstTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\BaseTree.cs" /> <Compile Include="Tree\BaseTreeAdaptor.cs" /> <Compile Include="Tree\AntlrRuntime_BaseTreeDebugView.cs" /> <Compile Include="Tree\BufferedTreeNodeStream.cs" /> <Compile Include="Tree\CommonErrorNode.cs" /> <Compile Include="Tree\CommonTree.cs" /> <Compile Include="Tree\CommonTreeAdaptor.cs" /> <Compile Include="Tree\CommonTreeNodeStream.cs" /> <Compile Include="Tree\DotTreeGenerator.cs" /> <Compile Include="Tree\IPositionTrackingStream.cs" /> <Compile Include="Tree\ITree.cs" /> <Compile Include="Tree\ITreeAdaptor.cs" /> <Compile Include="Tree\ITreeNodeStream.cs" /> <Compile Include="Tree\ITreeVisitorAction.cs" /> <Compile Include="Tree\ParseTree.cs" /> <Compile Include="Tree\RewriteCardinalityException.cs" /> <Compile Include="Tree\RewriteEarlyExitException.cs" /> <Compile Include="Tree\RewriteEmptyStreamException.cs" /> <Compile Include="Tree\RewriteRuleElementStream.cs" /> <Compile Include="Tree\RewriteRuleNodeStream.cs" /> <Compile Include="Tree\RewriteRuleSubtreeStream.cs" /> <Compile Include="Tree\RewriteRuleTokenStream.cs" /> <Compile Include="Tree\TemplateTreeRuleReturnScope`2.cs" /> <Compile Include="Tree\TreeFilter.cs" /> <Compile Include="Tree\TreeIterator.cs" /> <Compile Include="Tree\TreeParser.cs" /> <Compile Include="Tree\TreePatternLexer.cs" /> <Compile Include="Tree\TreePatternParser.cs" /> <Compile Include="Tree\TreeRewriter.cs" /> <Compile Include="Tree\TreeRuleReturnScope`1.cs" /> <Compile Include="Tree\TreeVisitor.cs" /> <Compile Include="Tree\TreeWizard.cs" /> <Compile Include="UnbufferedTokenStream.cs" /> <Compile Include="UnwantedTokenException.cs" /> </ItemGroup> <ItemGroup> - <None Include="..\..\..\..\..\..\..\..\..\keys\antlr\Key.snk"> + <None Include="..\..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/bin/prep/Antlr3.Runtime.Debug.nuspec b/bin/prep/Antlr3.Runtime.Debug.nuspec index 40d9764..48ada48 100644 --- a/bin/prep/Antlr3.Runtime.Debug.nuspec +++ b/bin/prep/Antlr3.Runtime.Debug.nuspec @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime.Debug</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> <dependencies> <dependency id="Antlr3.Runtime" version="$version$" /> </dependencies> </metadata> <files> <!-- Runtime Libraries --> <file src="Tool\Antlr3.Runtime.Debug.dll" target="lib\net20"/> <file src="Tool\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> <file src="Tool\Antlr3.Runtime.Debug.xml" target="lib\net20"/> <!-- Source Code --> - <file exclude="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\**\*.cs" target="src"/> + <file exclude="..\..\Runtime\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime.Debug\**\*.cs" target="src"/> </files> </package> diff --git a/bin/prep/Antlr3.Runtime.nuspec b/bin/prep/Antlr3.Runtime.nuspec index 8a26b16..4ebbba2 100644 --- a/bin/prep/Antlr3.Runtime.nuspec +++ b/bin/prep/Antlr3.Runtime.nuspec @@ -1,31 +1,31 @@ <?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>Antlr3.Runtime</id> <version>0.0.0</version> <authors>Sam Harwell, Terence Parr</authors> <owners>Sam Harwell</owners> <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> <language>en-us</language> <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> <copyright>Copyright © Sam Harwell 2013</copyright> <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$version$</releaseNotes> <requireLicenseAcceptance>true</requireLicenseAcceptance> <tags>antlr antlr3 parsing</tags> <title>ANTLR 3 Runtime</title> <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> </metadata> <files> <!-- Runtime Libraries --> <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> <!-- Source Code --> - <file exclude="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\obj\**\*.cs" src="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\**\*.cs" target="src"/> + <file exclude="..\..\Runtime\Antlr3.Runtime\obj\**\*.cs" src="..\..\Runtime\Antlr3.Runtime\**\*.cs" target="src"/> </files> </package>
antlr/antlrcs
2c444ce0c15af2d76e3531b96b2a6babc9426051
Remove the -XdbgST feature from the Release build configuration, which removes the Antlr3.exe dependency on WPF and allows its use on Mono (fixes #17)
diff --git a/Antlr3/AntlrTool.cs b/Antlr3/AntlrTool.cs index a96f036..f9d88f7 100644 --- a/Antlr3/AntlrTool.cs +++ b/Antlr3/AntlrTool.cs @@ -1,1486 +1,1490 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3 { using System; using System.Collections.Generic; using System.Linq; using Antlr3.Analysis; using Antlr3.Codegen; using Antlr3.Misc; using Antlr3.Tool; using File = System.IO.File; using FileInfo = System.IO.FileInfo; using IOException = System.IO.IOException; using Path = System.IO.Path; using Stats = Antlr.Runtime.Misc.Stats; using Stopwatch = System.Diagnostics.Stopwatch; using StringReader = System.IO.StringReader; using StringWriter = System.IO.StringWriter; using TextWriter = System.IO.TextWriter; public class AntlrTool { public const string UninitializedDir = "<unset-dir>"; private IList<string> grammarFileNames = new List<string>(); private List<string> generatedFiles = new List<string>(); private bool generate_NFA_dot = false; private bool generate_DFA_dot = false; private bool _generateDgmlGraphs = false; private string outputDirectory = "."; private bool haveOutputDir = false; private string inputDirectory; private string parentGrammarDirectory; private string grammarOutputDirectory; private bool haveInputDir = false; private string libDirectory = "."; private bool debug = false; private bool trace = false; private bool profile = false; private bool report = false; private bool printGrammar = false; private bool depend = false; private bool forceAllFilesToOutputDir = false; private bool forceRelativeOutput = false; private bool deleteTempLexer = true; private bool verbose = false; /** Don't process grammar file if generated files are newer than grammar */ private bool make = false; private bool showBanner = true; // true when we are in a unit test private bool testMode = false; private bool _showTimer = false; private static bool exitNow = false; internal static bool EnableTemplateCache = false; // The internal options are for my use on the command line during dev // public static bool internalOption_PrintGrammarTree = false; public static bool internalOption_PrintDFA = false; public static bool internalOption_ShowNFAConfigsInDFA = false; public static bool internalOption_watchNFAConversion = false; readonly string[] GrammarExtensions = { ".g", ".g3" }; [STAThread] public static void Main( string[] args ) { if (args.Contains("-Xcachetemplates")) EnableTemplateCache = true; bool repeat = false; if (args.Contains("-Xrepeat")) repeat = true; for (int i = 0; i < (repeat ? 2 : 1); i++) { if (i == 1) Console.In.ReadLine(); AntlrTool antlr = new AntlrTool(args); if (!exitNow) { antlr.Process(); Environment.ExitCode = (ErrorManager.GetNumErrors() > 0) ? 1 : 0; } } } static AntlrTool() { ToolPathRoot = Path.GetDirectoryName(typeof(CodeGenerator).Assembly.Location); } public AntlrTool() : this((string)null) { } public AntlrTool(string toolPathRoot) { if (!string.IsNullOrEmpty(toolPathRoot)) ToolPathRoot = toolPathRoot; TargetsDirectory = Path.Combine(ToolPathRoot, @"Targets"); TemplatesDirectory = Path.Combine(Path.Combine(ToolPathRoot, @"Codegen"), "Templates"); ErrorManager.Initialize(); } public AntlrTool( string[] args ) : this() { ProcessArgs( args ); } public static Version AssemblyVersion { get { var assembly = typeof(AntlrTool).Assembly; return assembly.GetName().Version; } } public static string ToolPathRoot { get; set; } public string TargetsDirectory { get; set; } public string TemplatesDirectory { get; set; } public string ForcedLanguageOption { get; set; } public virtual void ProcessArgs(string[] args) { if (verbose) { ErrorManager.Info("ANTLR Parser Generator Version " + AssemblyVersion.ToString(4)); showBanner = false; } if (args == null || args.Length == 0) { Help(); return; } for (int i = 0; i < args.Length; i++) { switch (args[i]) { case "-o": case "-fo": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing output directory with -fo/-o option; ignoring"); } else { if (args[i] == "-fo") ForceAllFilesToOutputDir = true; i++; outputDirectory = args[i]; if (outputDirectory.LastIndexOfAny(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }) == outputDirectory.Length - 1) outputDirectory = outputDirectory.Substring(0, OutputDirectory.Length - 1); haveOutputDir = true; if (System.IO.File.Exists(outputDirectory)) { ErrorManager.Error(ErrorManager.MSG_OUTPUT_DIR_IS_FILE, outputDirectory); LibraryDirectory = "."; } } break; case "-lib": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing library directory with -lib option; ignoring"); } else { i++; LibraryDirectory = args[i]; if (LibraryDirectory.LastIndexOfAny(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }) == LibraryDirectory.Length - 1) { LibraryDirectory = LibraryDirectory.Substring(0, LibraryDirectory.Length - 1); } if (!System.IO.Directory.Exists(libDirectory)) { ErrorManager.Error(ErrorManager.MSG_DIR_NOT_FOUND, LibraryDirectory); LibraryDirectory = "."; } } break; case "-language": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing language name; ignoring"); } else { i++; ForcedLanguageOption = args[i]; } break; case "-nfa": Generate_NFA_dot = true; break; case "-dfa": Generate_DFA_dot = true; break; case "-dgml": GenerateDgmlGraphs = true; break; case "-debug": Debug = true; break; case "-trace": Trace = true; break; case "-report": Report = true; break; case "-profile": Profile = true; break; case "-print": PrintGrammar = true; break; case "-depend": Depend = true; break; case "-testmode": TestMode = true; break; case "-verbose": Verbose = true; break; case "-version": Version(); exitNow = true; break; case "-make": Make = true; break; case "-message-format": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing output format with -message-format option; using default"); } else { i++; ErrorManager.SetFormat(args[i]); } break; case "-Xgrtree": internalOption_PrintGrammarTree = true; break; case "-Xdfa": internalOption_PrintDFA = true; break; case "-Xnoprune": DFAOptimizer.PRUNE_EBNF_EXIT_BRANCHES = false; break; case "-Xnocollapse": DFAOptimizer.COLLAPSE_ALL_PARALLEL_EDGES = false; break; case "-Xdbgconversion": NFAToDFAConverter.debug = true; break; case "-Xmultithreaded": //NFAToDFAConverter.SINGLE_THREADED_NFA_CONVERSION = false; Console.Error.WriteLine("Multithreaded NFA conversion is not currently supported."); break; case "-Xnomergestopstates": DFAOptimizer.MergeStopStates = false; break; case "-Xdfaverbose": internalOption_ShowNFAConfigsInDFA = true; break; case "-Xwatchconversion": internalOption_watchNFAConversion = true; break; +#if DEBUG case "-XdbgST": CodeGenerator.LaunchTemplateInspector = true; break; +#endif case "-Xmaxinlinedfastates": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max inline dfa states -Xmaxinlinedfastates option; ignoring"); } else { i++; CodeGenerator.MaxAcyclicDfaStatesInline = int.Parse(args[i]); } break; case "-Xmaxswitchcaselabels": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max switch case labels -Xmaxswitchcaselabels option; ignoring"); } else { i++; int value; if (int.TryParse(args[i], out value)) CodeGenerator.MaxSwitchCaseLabels = value; else Console.Error.WriteLine(string.Format("invalid value '{0}' for max switch case labels -Xmaxswitchcaselabels option; ignoring", args[i])); } break; case "-Xminswitchalts": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing min switch alternatives -Xminswitchalts option; ignoring"); } else { i++; int value; if (int.TryParse(args[i], out value)) CodeGenerator.MinSwitchAlts = value; else Console.Error.WriteLine(string.Format("invalid value '{0}' for min switch alternatives -Xminswitchalts option; ignoring", args[i])); } break; case "-Xm": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max recursion with -Xm option; ignoring"); } else { i++; NFAContext.MAX_SAME_RULE_INVOCATIONS_PER_NFA_CONFIG_STACK = int.Parse(args[i]); } break; case "-Xmaxdfaedges": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max number of edges with -Xmaxdfaedges option; ignoring"); } else { i++; DFA.MAX_STATE_TRANSITIONS_FOR_TABLE = int.Parse(args[i]); } break; case "-Xconversiontimeout": if (i + 1 >= args.Length) { Console.Error.WriteLine("missing max time in ms -Xconversiontimeout option; ignoring"); } else { i++; DFA.MAX_TIME_PER_DFA_CREATION = TimeSpan.FromMilliseconds(int.Parse(args[i])); } break; case "-Xnfastates": DecisionProbe.verbose = true; break; case "-Xsavelexer": deleteTempLexer = false; break; case "-Xtimer": _showTimer = true; break; case "-Xcachetemplates": EnableTemplateCache = true; break; case "-Xrepeat": break; case "-X": ExtendedHelp(); break; default: if (args[i][0] != '-') { // Must be the grammar file AddGrammarFile(args[i]); } break; } } } #if false protected virtual void CheckForInvalidArguments( string[] args, Antlr.Runtime.BitSet cmdLineArgValid ) { // check for invalid command line args for ( int a = 0; a < args.Length; a++ ) { if ( !cmdLineArgValid.Member( a ) ) { Console.Error.WriteLine( "invalid command-line argument: " + args[a] + "; ignored" ); } } } #endif /** * Checks to see if the list of outputFiles all exist, and have * last-modified timestamps which are later than the last-modified * timestamp of all the grammar files involved in build the output * (imports must be checked). If these conditions hold, the method * returns false, otherwise, it returns true. * * @param grammarFileName The grammar file we are checking * @param outputFiles * @return */ public virtual bool BuildRequired( string grammarFileName ) { BuildDependencyGenerator bd = new BuildDependencyGenerator( this, grammarFileName ); IList<string> outputFiles = bd.GetGeneratedFileList(); IList<string> inputFiles = bd.GetDependenciesFileList(); DateTime grammarLastModified = File.GetLastWriteTime( grammarFileName ); foreach ( string outputFile in outputFiles ) { if ( !File.Exists( outputFile ) || grammarLastModified > File.GetLastWriteTime( outputFile ) ) { // One of the output files does not exist or is out of date, so we must build it if (Verbose) { if (!File.Exists(outputFile)) Console.Out.WriteLine("Output file " + outputFile + " does not exist: must build " + grammarFileName); else Console.Out.WriteLine("Output file " + outputFile + " is not up-to-date: must build " + grammarFileName); } return true; } // Check all of the imported grammars and see if any of these are younger // than any of the output files. if ( inputFiles != null ) { foreach ( string inputFile in inputFiles ) { if ( File.GetLastWriteTime( inputFile ) > File.GetLastWriteTime( outputFile ) ) { // One of the imported grammar files has been updated so we must build if (Verbose) Console.Out.WriteLine("Input file " + inputFile + " is newer than output: must rebuild " + grammarFileName); return true; } } } } if ( Verbose ) { Console.Out.WriteLine( "Grammar " + grammarFileName + " is up to date - build skipped" ); } return false; } public virtual void Process() { bool exceptionWhenWritingLexerFile = false; string lexerGrammarFileName = null; // necessary at this scope to have access in the catch below Stopwatch timer = Stopwatch.StartNew(); // Have to be tricky here when Maven or build tools call in and must new Tool() // before setting options. The banner won't display that way! if ( Verbose && showBanner ) { ErrorManager.Info( "ANTLR Parser Generator Version " + AssemblyVersion.ToString(4) ); showBanner = false; } try { SortGrammarFiles(); // update grammarFileNames } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, e ); } foreach ( string grammarFileName in GrammarFileNames ) { // If we are in make mode (to support build tools like Maven) and the // file is already up to date, then we do not build it (and in verbose mode // we will say so). if ( Make ) { try { if ( !BuildRequired( grammarFileName ) ) continue; } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, e ); } } if ( Verbose && !Depend ) { Console.Out.WriteLine( grammarFileName ); } try { if ( Depend ) { BuildDependencyGenerator dep = new BuildDependencyGenerator( this, grammarFileName ); #if false IList<string> outputFiles = dep.getGeneratedFileList(); IList<string> dependents = dep.getDependenciesFileList(); Console.Out.WriteLine( "output: " + outputFiles ); Console.Out.WriteLine( "dependents: " + dependents ); #endif Console.Out.WriteLine( dep.GetDependencies().Render() ); continue; } Grammar rootGrammar = GetRootGrammar( grammarFileName ); // we now have all grammars read in as ASTs // (i.e., root and all delegates) rootGrammar.composite.AssignTokenTypes(); //rootGrammar.composite.TranslateLeftRecursiveRules(); rootGrammar.AddRulesForSyntacticPredicates(); rootGrammar.composite.DefineGrammarSymbols(); rootGrammar.composite.CreateNFAs(); GenerateRecognizer( rootGrammar ); if ( PrintGrammar ) { rootGrammar.PrintGrammar( Console.Out ); } if (Report) { GrammarReport2 greport = new GrammarReport2(rootGrammar); Console.WriteLine(greport.ToString()); } if ( Profile ) { GrammarReport report = new GrammarReport(rootGrammar); Stats.WriteReport( GrammarReport.GRAMMAR_STATS_FILENAME, report.ToNotifyString() ); } // now handle the lexer if one was created for a merged spec string lexerGrammarStr = rootGrammar.GetLexerGrammar(); //JSystem.@out.println("lexer grammar:\n"+lexerGrammarStr); if ( rootGrammar.type == GrammarType.Combined && lexerGrammarStr != null ) { lexerGrammarFileName = rootGrammar.ImplicitlyGeneratedLexerFileName; try { TextWriter w = GetOutputFile( rootGrammar, lexerGrammarFileName ); w.Write( lexerGrammarStr ); w.Close(); } catch (IOException) { // emit different error message when creating the implicit lexer fails // due to write permission error exceptionWhenWritingLexerFile = true; throw; } try { StringReader sr = new StringReader( lexerGrammarStr ); Grammar lexerGrammar = new Grammar(this); lexerGrammar.composite.WatchNFAConversion = internalOption_watchNFAConversion; lexerGrammar.implicitLexer = true; if ( TestMode ) lexerGrammar.DefaultRuleModifier = "public"; FileInfo lexerGrammarFullFile = new FileInfo( System.IO.Path.Combine( GetFileDirectory( lexerGrammarFileName ), lexerGrammarFileName ) ); lexerGrammar.FileName = lexerGrammarFullFile.ToString(); lexerGrammar.ImportTokenVocabulary( rootGrammar ); lexerGrammar.ParseAndBuildAST( sr ); sr.Close(); lexerGrammar.composite.AssignTokenTypes(); lexerGrammar.AddRulesForSyntacticPredicates(); lexerGrammar.composite.DefineGrammarSymbols(); lexerGrammar.composite.CreateNFAs(); GenerateRecognizer( lexerGrammar ); } finally { // make sure we clean up if ( deleteTempLexer ) { System.IO.DirectoryInfo outputDir = GetOutputDirectory( lexerGrammarFileName ); FileInfo outputFile = new FileInfo( System.IO.Path.Combine( outputDir.FullName, lexerGrammarFileName ) ); outputFile.Delete(); } } } } catch ( IOException e ) { if ( exceptionWhenWritingLexerFile ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, e ); } else { ErrorManager.Error( ErrorManager.MSG_CANNOT_OPEN_FILE, grammarFileName, e ); } } catch ( Exception e ) { ErrorManager.Error( ErrorManager.MSG_INTERNAL_ERROR, grammarFileName, e ); } #if false finally { Console.Out.WriteLine( "creates=" + Interval.creates ); Console.Out.WriteLine( "hits=" + Interval.hits ); Console.Out.WriteLine( "misses=" + Interval.misses ); Console.Out.WriteLine( "outOfRange=" + Interval.outOfRange ); } #endif } if (_showTimer) { Console.WriteLine("Total parse time: {0}ms", timer.ElapsedMilliseconds); } } public virtual void SortGrammarFiles() { //Console.Out.WriteLine( "Grammar names " + GrammarFileNames ); Graph<string> g = new Graph<string>(); foreach ( string gfile in GrammarFileNames ) { GrammarSpelunker grammar = new GrammarSpelunker( inputDirectory, gfile ); grammar.Parse(); string vocabName = grammar.TokenVocab; string grammarName = grammar.GrammarName; // Make all grammars depend on any tokenVocab options if ( vocabName != null ) g.AddEdge( gfile, vocabName + CodeGenerator.VocabFileExtension ); // Make all generated tokens files depend on their grammars g.AddEdge( grammarName + CodeGenerator.VocabFileExtension, gfile ); } List<string> sorted = g.Sort(); //Console.Out.WriteLine( "sorted=" + sorted ); GrammarFileNames.Clear(); // wipe so we can give new ordered list for ( int i = 0; i < sorted.Count; i++ ) { string f = (string)sorted[i]; if ( GrammarExtensions.Any( ext => f.EndsWith( ext, StringComparison.OrdinalIgnoreCase ) ) ) AddGrammarFile( f ); } //Console.Out.WriteLine( "new grammars=" + grammarFileNames ); } /** Get a grammar mentioned on the command-line and any delegates */ public virtual Grammar GetRootGrammar( string grammarFileName ) { //StringTemplate.setLintMode(true); // grammars mentioned on command line are either roots or single grammars. // create the necessary composite in case it's got delegates; even // single grammar needs it to get token types. CompositeGrammar composite = new CompositeGrammar(); Grammar grammar = new Grammar( this, grammarFileName, composite ); if ( TestMode ) grammar.DefaultRuleModifier = "public"; composite.SetDelegationRoot( grammar ); string f = null; if ( haveInputDir ) { f = Path.Combine( inputDirectory, grammarFileName ); } else { f = grammarFileName; } // Store the location of this grammar as if we import files, we can then // search for imports in the same location as the original grammar as well as in // the lib directory. // parentGrammarDirectory = Path.GetDirectoryName( f ); if ( grammarFileName.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) == -1 ) { grammarOutputDirectory = "."; } else { grammarOutputDirectory = grammarFileName.Substring( 0, grammarFileName.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) ); } StringReader reader = new StringReader( System.IO.File.ReadAllText( f ) ); grammar.ParseAndBuildAST( reader ); composite.WatchNFAConversion = internalOption_watchNFAConversion; return grammar; } /** Create NFA, DFA and generate code for grammar. * Create NFA for any delegates first. Once all NFA are created, * it's ok to create DFA, which must check for left-recursion. That check * is done by walking the full NFA, which therefore must be complete. * After all NFA, comes DFA conversion for root grammar then code gen for * root grammar. DFA and code gen for delegates comes next. */ protected virtual void GenerateRecognizer( Grammar grammar ) { string language = (string)grammar.GetOption( "language" ); if ( language != null ) { CodeGenerator generator = new CodeGenerator( this, grammar, language ); grammar.CodeGenerator = generator; generator.Debug = Debug; generator.Profile = Profile; generator.Trace = Trace; // generate NFA early in case of crash later (for debugging) if ( Generate_NFA_dot ) { GenerateNFAs( grammar ); } // GENERATE CODE generator.GenRecognizer(); if ( Generate_DFA_dot ) { GenerateDFAs( grammar ); } IList<Grammar> delegates = grammar.GetDirectDelegates(); for ( int i = 0; delegates != null && i < delegates.Count; i++ ) { Grammar @delegate = (Grammar)delegates[i]; if ( @delegate != grammar ) { // already processing this one GenerateRecognizer( @delegate ); } } } } public virtual void GenerateDFAs( Grammar g ) { for ( int d = 1; d <= g.NumberOfDecisions; d++ ) { DFA dfa = g.GetLookaheadDFA( d ); if ( dfa == null ) { continue; // not there for some reason, ignore } IGraphGenerator generator; if (GenerateDgmlGraphs) { generator = new DgmlGenerator(g); } else { generator = new DOTGenerator(g); } string graph = generator.GenerateGraph( dfa.StartState ); string graphFileName = g.name + "." + "dec-" + d; if ( g.implicitLexer ) { graphFileName = g.name + Grammar.grammarTypeToFileNameSuffix[(int)g.type] + "." + "dec-" + d; } try { WriteGraphFile( g, graphFileName, graph, generator.FileExtension ); } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_GEN_DOT_FILE, graphFileName, ioe ); } } } protected virtual void GenerateNFAs( Grammar g ) { IGraphGenerator generator = GenerateDgmlGraphs ? (IGraphGenerator)new DgmlGenerator(g) : new DOTGenerator(g); HashSet<Rule> rules = g.GetAllImportedRules(); rules.UnionWith( g.Rules ); foreach ( Rule r in rules ) { try { string dot = generator.GenerateGraph( r.StartState ); if ( dot != null ) { WriteGraphFile( g, r, dot, generator.FileExtension ); } } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe ); } } } protected virtual void WriteGraphFile( Grammar g, Rule r, string graph, string formatExtension ) { WriteGraphFile( g, r.Grammar.name + "." + r.Name, graph, formatExtension ); } protected virtual void WriteGraphFile( Grammar g, string name, string graph, string formatExtension ) { TextWriter fw = GetOutputFile( g, name + formatExtension ); fw.Write( graph ); fw.Close(); } private static void Version() { ErrorManager.Info( "ANTLR Parser Generator Version " + AntlrTool.AssemblyVersion.ToString(4) ); } private static void Help() { Version(); Console.Error.WriteLine( "usage: java org.antlr.Tool [args] file.g [file2.g file3.g ...]" ); Console.Error.WriteLine( " -o outputDir specify output directory where all output is generated" ); Console.Error.WriteLine( " -fo outputDir same as -o but force even files with relative paths to dir" ); Console.Error.WriteLine( " -lib dir specify location of token files" ); Console.Error.WriteLine( " -depend generate file dependencies" ); Console.Error.WriteLine( " -verbose generate ANTLR version and other information" ); Console.Error.WriteLine( " -report print out a report about the grammar(s) processed" ); Console.Error.WriteLine( " -print print out the grammar without actions" ); Console.Error.WriteLine( " -debug generate a parser that emits debugging events" ); Console.Error.WriteLine( " -trace generate a recognizer that traces rule entry/exit" ); Console.Error.WriteLine( " -profile generate a parser that computes profiling information" ); Console.Error.WriteLine( " -nfa generate an NFA for each rule" ); Console.Error.WriteLine( " -dfa generate a DFA for each decision point" ); Console.Error.WriteLine( " -dgml generate graphs in DGML format." ); Console.Error.WriteLine( " -message-format name specify output style for messages" ); Console.Error.WriteLine( " -verbose generate ANTLR version and other information" ); Console.Error.WriteLine( " -make only build if generated files older than grammar" ); Console.Error.WriteLine( " -version print the version of ANTLR and exit." ); Console.Error.WriteLine( " -language L override language grammar option; generate L" ); Console.Error.WriteLine( " -X display extended argument list" ); } private static void ExtendedHelp() { Version(); Console.Error.WriteLine(" -Xgrtree print the grammar AST"); Console.Error.WriteLine(" -Xdfa print DFA as text "); Console.Error.WriteLine(" -Xnoprune test lookahead against EBNF block exit branches"); Console.Error.WriteLine(" -Xnocollapse collapse incident edges into DFA states"); Console.Error.WriteLine(" -Xdbgconversion dump lots of info during NFA conversion"); Console.Error.WriteLine(" -Xmultithreaded run the analysis in 2 threads"); Console.Error.WriteLine(" -Xnomergestopstates do not merge stop states"); Console.Error.WriteLine(" -Xdfaverbose generate DFA states in DOT with NFA configs"); Console.Error.WriteLine(" -Xwatchconversion print a message for each NFA before converting"); +#if DEBUG Console.Error.WriteLine(" -XdbgST put tags at start/stop of all templates in output"); +#endif Console.Error.WriteLine(" -Xnfastates for nondeterminisms, list NFA states for each path"); Console.Error.WriteLine(" -Xm m max number of rule invocations during conversion [" + NFAContext.MAX_SAME_RULE_INVOCATIONS_PER_NFA_CONFIG_STACK + "]"); Console.Error.WriteLine(" -Xmaxdfaedges m max \"comfortable\" number of edges for single DFA state [" + DFA.MAX_STATE_TRANSITIONS_FOR_TABLE + "]"); Console.Error.WriteLine(" -Xmaxinlinedfastates m max DFA states before table used rather than inlining [" + CodeGenerator.DefaultMaxSwitchCaseLabels + "]"); Console.Error.WriteLine(" -Xmaxswitchcaselabels m don't generate switch() statements for dfas bigger than m [" + CodeGenerator.DefaultMaxSwitchCaseLabels + "]"); Console.Error.WriteLine(" -Xminswitchalts m don't generate switch() statements for dfas smaller than m [" + CodeGenerator.DefaultMinSwitchAlts + "]"); Console.Error.WriteLine(" -Xsavelexer don't delete temporary lexers generated from combined grammars"); } /// <summary> /// Set the location (base directory) where output files should be produced by the ANTLR tool. /// </summary> /// <param name="outputDirectory"></param> public virtual void SetOutputDirectory( string outputDirectory ) { haveOutputDir = true; this.outputDirectory = outputDirectory; } /** * Used by build tools to force the output files to always be * relative to the base output directory, even though the tool * had to set the output directory to an absolute path as it * cannot rely on the workign directory like command line invocation * can. * * @param forceRelativeOutput true if output files hould always be relative to base output directory */ public virtual void SetForceRelativeOutput( bool forceRelativeOutput ) { this.forceRelativeOutput = forceRelativeOutput; } /** * Set the base location of input files. Normally (when the tool is * invoked from the command line), the inputDirectory is not set, but * for build tools such as Maven, we need to be able to locate the input * files relative to the base, as the working directory could be anywhere and * changing workig directories is not a valid concept for JVMs because of threading and * so on. Setting the directory just means that the getFileDirectory() method will * try to open files relative to this input directory. * * @param inputDirectory Input source base directory */ public virtual void SetInputDirectory( string inputDirectory ) { this.inputDirectory = inputDirectory; haveInputDir = true; } public virtual TextWriter GetOutputFile( Grammar g, string fileName ) { if ( OutputDirectory == null ) return new StringWriter(); // output directory is a function of where the grammar file lives // for subdir/T.g, you get subdir here. Well, depends on -o etc... // But, if this is a .tokens file, then we force the output to // be the base output directory (or current directory if there is not a -o) // #if false System.IO.DirectoryInfo outputDir; if ( fileName.EndsWith( CodeGenerator.VOCAB_FILE_EXTENSION ) ) { if ( haveOutputDir ) { outputDir = new System.IO.DirectoryInfo( OutputDirectory ); } else { outputDir = new System.IO.DirectoryInfo( "." ); } } else { outputDir = getOutputDirectory( g.FileName ); } #else System.IO.DirectoryInfo outputDir = GetOutputDirectory( g.FileName ); #endif FileInfo outputFile = new FileInfo( System.IO.Path.Combine( outputDir.FullName, fileName ) ); if ( !outputDir.Exists ) outputDir.Create(); if ( outputFile.Exists ) outputFile.Delete(); GeneratedFiles.Add(outputFile.FullName); return new System.IO.StreamWriter( new System.IO.BufferedStream( outputFile.OpenWrite() ) ); } /** * Return the location where ANTLR will generate output files for a given file. This is a * base directory and output files will be relative to here in some cases * such as when -o option is used and input files are given relative * to the input directory. * * @param fileNameWithPath path to input source * @return */ public virtual System.IO.DirectoryInfo GetOutputDirectory( string fileNameWithPath ) { string outputDir = OutputDirectory; if ( fileNameWithPath.IndexOfAny( System.IO.Path.GetInvalidPathChars() ) >= 0 ) return new System.IO.DirectoryInfo( outputDir ); if ( !System.IO.Path.IsPathRooted( fileNameWithPath ) ) fileNameWithPath = System.IO.Path.GetFullPath( fileNameWithPath ); string fileDirectory; // Some files are given to us without a PATH but should should // still be written to the output directory in the relative path of // the output directory. The file directory is either the set of sub directories // or just or the relative path recorded for the parent grammar. This means // that when we write the tokens files, or the .java files for imported grammars // taht we will write them in the correct place. // if ( fileNameWithPath.IndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) == -1 ) { // No path is included in the file name, so make the file // directory the same as the parent grammar (which might sitll be just "" // but when it is not, we will write the file in the correct place. // fileDirectory = grammarOutputDirectory; } else { fileDirectory = fileNameWithPath.Substring( 0, fileNameWithPath.LastIndexOfAny( new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar } ) ); } if ( haveOutputDir ) { // -o /tmp /var/lib/t.g => /tmp/T.java // -o subdir/output /usr/lib/t.g => subdir/output/T.java // -o . /usr/lib/t.g => ./T.java if ( ( fileDirectory != null && !forceRelativeOutput ) && ( System.IO.Path.IsPathRooted( fileDirectory ) || fileDirectory.StartsWith( "~" ) ) || // isAbsolute doesn't count this :( ForceAllFilesToOutputDir ) { // somebody set the dir, it takes precendence; write new file there outputDir = OutputDirectory; } else { // -o /tmp subdir/t.g => /tmp/subdir/t.g if ( fileDirectory != null ) { outputDir = System.IO.Path.Combine( OutputDirectory, fileDirectory ); } else { outputDir = OutputDirectory; } } } else { // they didn't specify a -o dir so just write to location // where grammar is, absolute or relative, this will only happen // with command line invocation as build tools will always // supply an output directory. // outputDir = fileDirectory; } return new System.IO.DirectoryInfo( outputDir ); } /** * Name a file from the -lib dir. Imported grammars and .tokens files * * If we do not locate the file in the library directory, then we try * the location of the originating grammar. * * @param fileName input name we are looking for * @return Path to file that we think shuold be the import file * * @throws java.io.IOException */ public virtual string GetLibraryFile( string fileName ) { // First, see if we can find the file in the library directory // string f = Path.Combine( LibraryDirectory, fileName ); if ( File.Exists( f ) ) { // Found in the library directory // return Path.GetFullPath( f ); } // Need to assume it is in the same location as the input file. Note that // this is only relevant for external build tools and when the input grammar // was specified relative to the source directory (working directory if using // the command line. // return Path.Combine( parentGrammarDirectory, fileName ); } /** Return the directory containing the grammar file for this grammar. * normally this is a relative path from current directory. People will * often do "java org.antlr.Tool grammars/*.g3" So the file will be * "grammars/foo.g3" etc... This method returns "grammars". * * If we have been given a specific input directory as a base, then * we must find the directory relative to this directory, unless the * file name is given to us in absolute terms. */ public virtual string GetFileDirectory( string fileName ) { string f; if ( haveInputDir && !( fileName.StartsWith( Path.DirectorySeparatorChar.ToString() ) || fileName.StartsWith( Path.AltDirectorySeparatorChar.ToString() ) ) ) { f = Path.Combine( inputDirectory, fileName ); } else { f = fileName; } // And ask .NET what the base directory of this location is // return Path.GetDirectoryName( f ); } /** Return a File descriptor for vocab file. Look in library or * in -o output path. antlr -o foo T.g U.g where U needs T.tokens * won't work unless we look in foo too. If we do not find the * file in the lib directory then must assume that the .tokens file * is going to be generated as part of this build and we have defined * .tokens files so that they ALWAYS are generated in the base output * directory, which means the current directory for the command line tool if there * was no output directory specified. */ public virtual string GetImportedVocabFile( string vocabName ) { // first look at files we're generating string path = (from file in GeneratedFiles where Path.GetFileName(file).Equals(vocabName + CodeGenerator.VocabFileExtension) && File.Exists(file) select file) .FirstOrDefault(); if (path != null) return path; path = Path.Combine( LibraryDirectory, vocabName + CodeGenerator.VocabFileExtension ); if ( File.Exists( path ) ) return path; // We did not find the vocab file in the lib directory, so we need // to look for it in the output directory which is where .tokens // files are generated (in the base, not relative to the input // location.) // if ( haveOutputDir ) { path = Path.Combine( OutputDirectory, vocabName + CodeGenerator.VocabFileExtension ); } else { path = vocabName + CodeGenerator.VocabFileExtension; } return path; } /** If the tool needs to panic/exit, how do we do that? */ public virtual void Panic() { throw new Exception( "ANTLR panic" ); } /// <summary> /// Return a time stamp string accurate to sec: yyyy-mm-dd hh:mm:ss /// </summary> public static string GetCurrentTimeStamp() { return DateTime.Now.ToString( "yyyy\\-MM\\-dd HH\\:mm\\:ss" ); } /** * Provide the List of all grammar file names that the ANTLR tool will * process or has processed. * * @return the grammarFileNames */ public virtual IList<string> GrammarFileNames { get { return grammarFileNames; } } public IList<string> GeneratedFiles { get { return generatedFiles; } } /** * Indicates whether ANTLR has gnerated or will generate a description of * all the NFAs in <a href="http://www.graphviz.org">Dot format</a> * * @return the generate_NFA_dot */ public virtual bool Generate_NFA_dot { get { return generate_NFA_dot; } set { this.generate_NFA_dot = value; } } /** * Indicates whether ANTLR has generated or will generate a description of * all the NFAs in <a href="http://www.graphviz.org">Dot format</a> * * @return the generate_DFA_dot */ public virtual bool Generate_DFA_dot { get { return generate_DFA_dot; } set { this.generate_DFA_dot = value; } } public virtual bool GenerateDgmlGraphs { get { return _generateDgmlGraphs; } set { _generateDgmlGraphs = value; } } /** * Return the Path to the base output directory, where ANTLR * will generate all the output files for the current language target as * well as any ancillary files such as .tokens vocab files. * * @return the output Directory */ public virtual string OutputDirectory { get { return outputDirectory; } } /** * Return the Path to the directory in which ANTLR will search for ancillary * files such as .tokens vocab files and imported grammar files. * * @return the lib Directory */ public virtual string LibraryDirectory { get { return libDirectory; } set { this.libDirectory = value; } } /** * Indicate if ANTLR has generated, or will generate a debug version of the * recognizer. Debug versions of a parser communicate with a debugger such * as that contained in ANTLRWorks and at start up will 'hang' waiting for * a connection on an IP port (49100 by default). * * @return the debug flag */ public virtual bool Debug { get { return debug; } set { debug = value; } } /** * Indicate whether ANTLR has generated, or will generate a version of the * recognizer that prints trace messages on entry and exit of each rule. * * @return the trace flag */ public virtual bool Trace { get { return trace; } set { trace = value; } } /** * Indicates whether ANTLR has generated or will generate a version of the * recognizer that gathers statistics about its execution, which it prints when * it terminates. * * @return the profile */ public virtual bool Profile { get { return profile; } set { profile = value; } } /** * Indicates whether ANTLR has generated or will generate a report of various * elements of the grammar analysis, once it it has finished analyzing a grammar * file. * * @return the report flag */ public virtual bool Report { get { return report; } set { report = value; } } /** * Indicates whether ANTLR has printed, or will print, a version of the input grammar * file(s) that is stripped of any action code embedded within. * * @return the printGrammar flag */ public virtual bool PrintGrammar { get { return printGrammar; } set { printGrammar = value; } } /** * Indicates whether ANTLR has supplied, or will supply, a list of all the things * that the input grammar depends upon and all the things that will be generated * when that grammar is successfully analyzed. * * @return the depend flag */ public virtual bool Depend { get { return depend; } set { depend = value; } } public virtual bool TestMode { get { return testMode; } set { testMode = value; } } diff --git a/Antlr3/Codegen/CodeGenerator.cs b/Antlr3/Codegen/CodeGenerator.cs index c3b9f68..c45163c 100644 --- a/Antlr3/Codegen/CodeGenerator.cs +++ b/Antlr3/Codegen/CodeGenerator.cs @@ -1,1355 +1,1365 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Codegen { using System.Collections.Generic; using System.Linq; using Antlr3.Analysis; using Antlr3.Extensions; using Antlr3.Grammars; +#if DEBUG using Antlr4.StringTemplate.Visualizer.Extensions; +#endif using Activator = System.Activator; using ANTLRLexer = Antlr3.Grammars.ANTLRLexer; using ANTLRParser = Antlr3.Grammars.ANTLRParser; using AntlrTool = Antlr3.AntlrTool; using ArgumentException = System.ArgumentException; using ArgumentNullException = System.ArgumentNullException; using ArgumentOutOfRangeException = System.ArgumentOutOfRangeException; using AttributeScope = Antlr3.Tool.AttributeScope; using BitSet = Antlr3.Misc.BitSet; using CLSCompliant = System.CLSCompliantAttribute; using CommonToken = Antlr.Runtime.CommonToken; using DFA = Antlr3.Analysis.DFA; using DFAOptimizer = Antlr3.Analysis.DFAOptimizer; using DFAState = Antlr3.Analysis.DFAState; using ErrorManager = Antlr3.Tool.ErrorManager; using Exception = System.Exception; using File = System.IO.File; using FileNotFoundException = System.IO.FileNotFoundException; using Grammar = Antlr3.Tool.Grammar; using GrammarAST = Antlr3.Tool.GrammarAST; using GrammarType = Antlr3.Tool.GrammarType; using IIntSet = Antlr3.Misc.IIntSet; using Interval = Antlr3.Misc.Interval; using IntervalSet = Antlr3.Misc.IntervalSet; using IOException = System.IO.IOException; using ITemplateWriter = Antlr4.StringTemplate.ITemplateWriter; using IToken = Antlr.Runtime.IToken; using Label = Antlr3.Analysis.Label; using LookaheadSet = Antlr3.Analysis.LookaheadSet; using NFAState = Antlr3.Analysis.NFAState; using Path = System.IO.Path; using RecognitionException = Antlr.Runtime.RecognitionException; using Regex = System.Text.RegularExpressions.Regex; using Rule = Antlr3.Tool.Rule; using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers; using Stopwatch = System.Diagnostics.Stopwatch; using StringTemplate = Antlr4.StringTemplate.Template; using TemplateGroup = Antlr4.StringTemplate.TemplateGroup; using ToolTemplateGroupFile = Antlr3.Tool.ToolTemplateGroupFile; using TextWriter = System.IO.TextWriter; using TimeSpan = System.TimeSpan; using Antlr3.Misc; /** ANTLR's code generator. * * Generate recognizers derived from grammars. Language independence * achieved through the use of TemplateGroup objects. All output * strings are completely encapsulated in the group files such as Java.stg. * Some computations are done that are unused by a particular language. * This generator just computes and sets the values into the templates; * the templates are free to use or not use the information. * * To make a new code generation target, define X.stg for language X * by copying from existing Y.stg most closely releated to your language; * e.g., to do CSharp.stg copy Java.stg. The template group file has a * bunch of templates that are needed by the code generator. You can add * a new target w/o even recompiling ANTLR itself. The language=X option * in a grammar file dictates which templates get loaded/used. * * Some language like C need both parser files and header files. Java needs * to have a separate file for the cyclic DFA as ANTLR generates bytecodes * directly (which cannot be in the generated parser Java file). To facilitate * this, * * cyclic can be in same file, but header, output must be searpate. recognizer * is in outptufile. */ public class CodeGenerator { /** When generating SWITCH statements, some targets might need to limit * the size (based upon the number of case labels). Generally, this * limit will be hit only for lexers where wildcard in a UNICODE * vocabulary environment would generate a SWITCH with 65000 labels. */ public static readonly int DefaultMaxSwitchCaseLabels = 300; public static readonly int DefaultMinSwitchAlts = 3; public static readonly int DefaultMaxAcyclicDfaStatesInline = 60; public static int MaxSwitchCaseLabels = DefaultMaxSwitchCaseLabels; public static int MinSwitchAlts = DefaultMinSwitchAlts; public static int MaxAcyclicDfaStatesInline = DefaultMaxAcyclicDfaStatesInline; +#if DEBUG public static bool LaunchTemplateInspector = false; +#endif public bool GenerateSwitchesWhenPossible = true; /** Which grammar are we generating code for? Each generator * is attached to a specific grammar. */ private readonly Grammar _grammar; /** What language are we generating? */ private readonly string _language; /** The target specifies how to write out files and do other language * specific actions. */ private readonly Target _target; private static readonly Dictionary<string, Target> _targets = new Dictionary<string, Target>(); /** Where are the templates this generator should use to generate code? */ private TemplateGroup _templates; /** The basic output templates without AST or templates stuff; this will be * the templates loaded for the language such as Java.stg *and* the Dbg * stuff if turned on. This is used for generating syntactic predicates. */ private TemplateGroup baseTemplates; private StringTemplate recognizerST; private StringTemplate outputFileST; private StringTemplate headerFileST; /** Used to create unique labels */ private int uniqueLabelNumber = 1; /** A reference to the ANTLR tool so we can learn about output directories * and such. */ private readonly AntlrTool tool; /** Generate debugging event method calls */ private bool debug; /** Create a Tracer object and make the recognizer invoke this. */ private bool trace; /** Track runtime parsing information about decisions etc... * This requires the debugging event mechanism to work. */ private bool profile; private int lineWidth = 72; /** I have factored out the generation of acyclic DFAs to separate class */ private readonly ACyclicDFACodeGenerator _acyclicDFAGenerator; /** I have factored out the generation of cyclic DFAs to separate class */ /* public CyclicDFACodeGenerator cyclicDFAGenerator = new CyclicDFACodeGenerator(this); */ public static readonly string VocabFileExtension = ".tokens"; private const string vocabFilePattern = "<tokens:{it|<it.name>=<it.type>\n}>" + "<literals:{it|<it.name>=<it.type>\n}>"; public CodeGenerator( AntlrTool tool, Grammar grammar, string language ) { if (tool == null) throw new ArgumentNullException("tool"); if (grammar == null) throw new ArgumentNullException("grammar"); this.tool = tool; this._grammar = grammar; this._language = language; _acyclicDFAGenerator = new ACyclicDFACodeGenerator( this ); _target = LoadLanguageTarget( language, tool.TargetsDirectory ); } #region Properties public Grammar Grammar { get { return _grammar; } } public string Language { get { return _language; } } public Target Target { get { return _target; } } [CLSCompliant(false)] public TemplateGroup BaseTemplates { get { return baseTemplates; } } [CLSCompliant(false)] public StringTemplate RecognizerST { get { return outputFileST; } } [CLSCompliant(false)] public TemplateGroup Templates { get { return _templates; } } public string VocabFileName { get { return GetVocabFileName(); } } [CLSCompliant(false)] public bool Debug { get { return debug; } set { debug = value; } } [CLSCompliant(false)] public bool Profile { get { return profile; } set { profile = value; if ( profile ) { // requires debug events Debug = true; } } } [CLSCompliant(false)] public bool Trace { get { return trace; } set { trace = value; } } #endregion public static Target LoadLanguageTarget( string language, string targetsDirectory ) { lock (_targets) { Target target; if (!_targets.TryGetValue(language, out target)) { // first try to load the target via a satellite DLL string assembly = "Antlr3.Targets." + language + ".dll"; string[] paths = { targetsDirectory }; System.Reflection.Assembly targetAssembly = null; System.Type targetType = null; string targetName = "Antlr3.Targets." + language + "Target"; foreach (string path in paths) { string filename = System.IO.Path.Combine(path, assembly); if (System.IO.File.Exists(filename)) { try { targetAssembly = System.Reflection.Assembly.LoadFrom(filename); targetType = targetAssembly.GetType(targetName, false); } catch { } } } // then try to load from the current file if (targetType == null) { targetType = System.Type.GetType(targetName); if (targetType == null) { ErrorManager.Error(ErrorManager.MSG_CANNOT_CREATE_TARGET_GENERATOR, targetName); return null; } } target = (Target)Activator.CreateInstance(targetType); _targets[language] = target; } return target; } } /** load the main language.stg template group file */ public virtual void LoadTemplates( string language ) { string outputOption = (string)this._grammar.GetOption("output") ?? string.Empty; LoadTemplates(tool, language, _grammar.type, outputOption, debug, out baseTemplates, out _templates); } private static readonly Dictionary<string, TemplateGroup> _coreTemplates = new Dictionary<string, TemplateGroup>(); #if AGGREGATE_TEMPLATE_GROUPS private static readonly Dictionary<string, Dictionary<string, TemplateGroup>> _languageBaseTemplates = new Dictionary<string, Dictionary<string, TemplateGroup>>(); #endif private static readonly Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>> _languageTemplates = new Dictionary<TemplateGroup, Dictionary<string, TemplateGroup>>(ObjectReferenceEqualityComparer<TemplateGroup>.Default); private sealed class ObjectReferenceEqualityComparer<T> : EqualityComparer<T> where T : class { private static readonly ObjectReferenceEqualityComparer<T> _default = new ObjectReferenceEqualityComparer<T>(); private ObjectReferenceEqualityComparer() { } public static new ObjectReferenceEqualityComparer<T> Default { get { return _default; } } public override bool Equals(T x, T y) { return object.ReferenceEquals(x, y); } public override int GetHashCode(T obj) { return RuntimeHelpers.GetHashCode(obj); } } private static void LoadTemplates(AntlrTool tool, string language, GrammarType grammarType, string outputOption, bool debug, out TemplateGroup baseTemplates, out TemplateGroup templates) { // first load main language template TemplateGroup coreTemplates = GetOrCacheTemplateGroup(tool, language, null, null); baseTemplates = coreTemplates; outputOption = outputOption ?? string.Empty; // dynamically add subgroups that act like filters to apply to // their supergroup. E.g., Java:Dbg:AST:ASTParser::ASTDbg. if (outputOption.Equals("AST")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", dbgTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } TemplateGroup astDbgTemplates = GetOrCacheTemplateGroup(tool, language, "ASTDbg", astParserTemplates); templates = astDbgTemplates; } else { TemplateGroup astTemplates = GetOrCacheTemplateGroup(tool, language, "AST", coreTemplates); TemplateGroup astParserTemplates = astTemplates; if (grammarType == GrammarType.TreeParser) { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTTreeParser", astTemplates); } else { astParserTemplates = GetOrCacheTemplateGroup(tool, language, "ASTParser", astTemplates); } templates = astParserTemplates; } } else if (outputOption.Equals("template")) { if (debug && grammarType != GrammarType.Lexer) { TemplateGroup dbgTemplates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = dbgTemplates; TemplateGroup stTemplates = GetOrCacheTemplateGroup(tool, language, "ST", dbgTemplates); templates = stTemplates; } else { templates = GetOrCacheTemplateGroup(tool, language, "ST", coreTemplates); } } else if (debug && grammarType != GrammarType.Lexer) { templates = GetOrCacheTemplateGroup(tool, language, "Dbg", coreTemplates); baseTemplates = templates; } else { templates = coreTemplates; } } private static TemplateGroup GetOrCacheTemplateGroup(AntlrTool tool, string language, string name, TemplateGroup superGroup) { if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group; if (_coreTemplates.TryGetValue(language, out group)) return group; } else { Dictionary<string, TemplateGroup> languageTemplates; if (_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { TemplateGroup group; if (languageTemplates.TryGetValue(name, out group)) return group; } } string[] templateDirectories = { tool.TemplatesDirectory, Path.Combine(tool.TemplatesDirectory, language) }; return CacheTemplateGroup(templateDirectories, language, name, superGroup); } #if AGGREGATE_TEMPLATE_GROUPS private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { TemplateGroup baseTemplateGroup; if (string.IsNullOrEmpty(name)) { _coreTemplates.TryGetValue(language, out baseTemplateGroup); } else { Dictionary<string, TemplateGroup> baseTemplates; if (!_languageBaseTemplates.TryGetValue(language, out baseTemplates)) { baseTemplates = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = baseTemplates; } baseTemplates.TryGetValue(name, out baseTemplateGroup); } if (baseTemplateGroup == null) { baseTemplateGroup = CacheBaseTemplateGroup(templateDirectories, language, name); } if (superGroup == null) return baseTemplateGroup; TemplateGroup group = new TemplateGroup(); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; group.ImportTemplates(baseTemplateGroup); group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> languageTemplates; if (!_languageTemplates.TryGetValue(superGroup, out languageTemplates)) { languageTemplates = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = languageTemplates; } languageTemplates[name] = group; return group; } private static TemplateGroup CacheBaseTemplateGroup(string[] templateDirectories, string language, string name) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name)) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; group.IterateAcrossValues = true; Dictionary<string, TemplateGroup> groups; if (!_languageBaseTemplates.TryGetValue(language, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageBaseTemplates[language] = groups; } groups[name] = group; return group; } } #else private static TemplateGroup CacheTemplateGroup(string[] templateDirectories, string language, string name, TemplateGroup superGroup) { string groupFileName; if (string.IsNullOrEmpty(name)) groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", language)); else groupFileName = FindTemplateFile(templateDirectories, string.Format("{0}.stg", name)); if (string.IsNullOrEmpty(name) && superGroup == null) { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); +#if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; +#endif group.IterateAcrossValues = true; _coreTemplates[language] = group; return group; } else { TemplateGroup group = new ToolTemplateGroupFile(groupFileName); +#if DEBUG group.TrackCreationEvents = CodeGenerator.LaunchTemplateInspector; +#endif group.IterateAcrossValues = true; group.ImportTemplates(superGroup); Dictionary<string, TemplateGroup> groups; if (!_languageTemplates.TryGetValue(superGroup, out groups)) { groups = new Dictionary<string, TemplateGroup>(); _languageTemplates[superGroup] = groups; } groups[name] = group; return group; } } #endif internal static string FindTemplateFile(string[] templateDirectories, string fileName) { foreach (var directory in templateDirectories) { string templateFileName = Path.Combine(directory, fileName); if (File.Exists(templateFileName)) return templateFileName; } throw new FileNotFoundException(); } /** Given the grammar to which we are attached, walk the AST associated * with that grammar to create NFAs. Then create the DFAs for all * decision points in the grammar by converting the NFAs to DFAs. * Finally, walk the AST again to generate code. * * Either 1 or 2 files are written: * * recognizer: the main parser/lexer/treewalker item * header file: language like C/C++ need extern definitions * * The target, such as JavaTarget, dictates which files get written. */ public virtual StringTemplate GenRecognizer() { //JSystem.@out.println("### generate "+grammar.name+" recognizer"); // LOAD OUTPUT TEMPLATES LoadTemplates( _language ); if ( _templates == null ) { return null; } // CREATE NFA FROM GRAMMAR, CREATE DFA FROM NFA if ( ErrorManager.DoNotAttemptAnalysis() ) { return null; } _target.PerformGrammarAnalysis( this, _grammar ); // some grammar analysis errors will not yield reliable DFA if ( ErrorManager.DoNotAttemptCodeGen() ) { return null; } // OPTIMIZE DFA DFAOptimizer optimizer = new DFAOptimizer( _grammar ); optimizer.Optimize(); // OUTPUT FILE (contains recognizerST) outputFileST = _templates.GetInstanceOf( "outputFile" ); // HEADER FILE if ( _templates.IsDefined( "headerFile" ) ) { headerFileST = _templates.GetInstanceOf( "headerFile" ); } else { // create a dummy to avoid null-checks all over code generator headerFileST = new StringTemplate( _templates, string.Empty ); // it normally sees this from outputFile headerFileST.Add("cyclicDFAs", null); headerFileST.impl.Name = "dummy-header-file"; } bool filterMode = _grammar.GetOption( "filter" ) != null && _grammar.GetOption( "filter" ).Equals( "true" ); bool canBacktrack = _grammar.composite.RootGrammar.atLeastOneBacktrackOption || _grammar.SyntacticPredicates != null || filterMode; // TODO: move this down further because generating the recognizer // alters the model with info on who uses predefined properties etc... // The actions here might refer to something. // The only two possible output files are available at this point. // Verify action scopes are ok for target and dump actions into output // Templates can say <actions.parser.header> for example. var actions = _grammar.Actions; VerifyActionScopesOkForTarget( actions ); // translate $x::y references TranslateActionAttributeReferences( actions ); StringTemplate gateST = _templates.GetInstanceOf( "actionGate" ); if ( filterMode ) { // if filtering, we need to set actions to execute at backtracking // level 1 not 0. gateST = _templates.GetInstanceOf( "filteringActionGate" ); } _grammar.SetSynPredGateIfNotAlready( gateST ); headerFileST.SetAttribute( "actions", actions ); outputFileST.SetAttribute( "actions", actions ); headerFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); outputFileST.SetAttribute( "buildTemplate", _grammar.BuildTemplate ); headerFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "buildAST", _grammar.BuildAST ); outputFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); headerFileST.SetAttribute( "rewriteMode", _grammar.RewriteMode ); outputFileST.SetAttribute( "backtracking", canBacktrack ); headerFileST.SetAttribute( "backtracking", canBacktrack ); // turn on memoize attribute at grammar level so we can create ruleMemo. // each rule has memoize attr that hides this one, indicating whether // it needs to save results string memoize = (string)_grammar.GetOption( "memoize" ); outputFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); headerFileST.SetAttribute( "memoize", ( _grammar.atLeastOneRuleMemoizes || ( memoize != null && memoize.Equals( "true" ) ) && canBacktrack ) ); outputFileST.SetAttribute( "trace", trace ); headerFileST.SetAttribute( "trace", trace ); outputFileST.SetAttribute( "profile", profile ); headerFileST.SetAttribute( "profile", profile ); // RECOGNIZER if ( _grammar.type == GrammarType.Lexer ) { recognizerST = _templates.GetInstanceOf( "lexer" ); outputFileST.SetAttribute( "LEXER", true ); headerFileST.SetAttribute( "LEXER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } else if ( _grammar.type == GrammarType.Parser || _grammar.type == GrammarType.Combined ) { recognizerST = _templates.GetInstanceOf( "parser" ); outputFileST.SetAttribute( "PARSER", true ); headerFileST.SetAttribute( "PARSER", true ); } else { recognizerST = _templates.GetInstanceOf( "treeParser" ); outputFileST.SetAttribute( "TREE_PARSER", true ); headerFileST.SetAttribute( "TREE_PARSER", true ); recognizerST.SetAttribute( "filterMode", filterMode ); } outputFileST.SetAttribute( "recognizer", recognizerST ); headerFileST.SetAttribute( "recognizer", recognizerST ); outputFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); headerFileST.SetAttribute( "actionScope", _grammar.GetDefaultActionScope( _grammar.type ) ); string targetAppropriateFileNameString = _target.GetTargetStringLiteralFromString( _grammar.FileName ); outputFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); headerFileST.SetAttribute( "fileName", targetAppropriateFileNameString ); outputFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyVersion.ToString(4) ); headerFileST.SetAttribute( "ANTLRVersion", AntlrTool.AssemblyVersion.ToString(4) ); outputFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); headerFileST.SetAttribute( "generatedTimestamp", AntlrTool.GetCurrentTimeStamp() ); { // GENERATE RECOGNIZER // Walk the AST holding the input grammar, this time generating code // Decisions are generated by using the precomputed DFAs // Fill in the various templates with data CodeGenTreeWalker gen = new CodeGenTreeWalker( new Antlr.Runtime.Tree.CommonTreeNodeStream( _grammar.Tree ) ); try { gen.grammar_( _grammar, recognizerST, outputFileST, headerFileST ); } catch ( RecognitionException re ) { ErrorManager.Error( ErrorManager.MSG_BAD_AST_STRUCTURE, re ); } } GenTokenTypeConstants( recognizerST ); GenTokenTypeConstants( outputFileST ); GenTokenTypeConstants( headerFileST ); if ( _grammar.type != GrammarType.Lexer ) { GenTokenTypeNames( recognizerST ); GenTokenTypeNames( outputFileST ); GenTokenTypeNames( headerFileST ); } // Now that we know what synpreds are used, we can set into template HashSet<string> synpredNames = null; if ( _grammar.synPredNamesUsedInDFA.Count > 0 ) { synpredNames = _grammar.synPredNamesUsedInDFA; } outputFileST.SetAttribute( "synpreds", synpredNames ); headerFileST.SetAttribute( "synpreds", synpredNames ); // all recognizers can see Grammar object recognizerST.SetAttribute( "grammar", _grammar ); // do not render templates to disk if errors occurred if (ErrorManager.GetErrorState().errors > 0) return null; +#if DEBUG if (CodeGenerator.LaunchTemplateInspector) { outputFileST.Visualize(); if (_templates.IsDefined("headerFile")) headerFileST.Visualize(); } +#endif // WRITE FILES try { _target.GenRecognizerFile( tool, this, _grammar, outputFileST ); if ( _templates.IsDefined( "headerFile" ) ) { StringTemplate extST = _templates.GetInstanceOf( "headerFileExtension" ); _target.GenRecognizerHeaderFile( tool, this, _grammar, headerFileST, extST.Render() ); } // write out the vocab interchange file; used by antlr, // does not change per target StringTemplate tokenVocabSerialization = GenTokenVocabOutput(); string vocabFileName = VocabFileName; if ( vocabFileName != null ) { Write( tokenVocabSerialization, vocabFileName ); } //JSystem.@out.println(outputFileST.getDOTForDependencyGraph(false)); } catch ( IOException ioe ) { ErrorManager.Error( ErrorManager.MSG_CANNOT_WRITE_FILE, ioe ); } /* JSystem.@out.println("num obj.prop refs: "+ ASTExpr.totalObjPropRefs); JSystem.@out.println("num reflection lookups: "+ ASTExpr.totalReflectionLookups); */ return outputFileST; } /** Some targets will have some extra scopes like C++ may have * '@headerfile:name {action}' or something. Make sure the * target likes the scopes in action table. */ protected virtual void VerifyActionScopesOkForTarget( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; if ( !_target.IsValidActionScope( _grammar.type, scope ) ) { // get any action from the scope to get error location var scopeActions = action.Value; GrammarAST actionAST = scopeActions.Values.Cast<GrammarAST>().First(); ErrorManager.GrammarError( ErrorManager.MSG_INVALID_ACTION_SCOPE, _grammar, actionAST.Token, scope, _grammar.GrammarTypeString ); } } } /** Actions may reference $x::y attributes, call translateAction on * each action and replace that action in the Map. */ protected virtual void TranslateActionAttributeReferences( IDictionary<string, IDictionary<string, object>> actions ) { foreach ( var action in actions ) { string scope = action.Key; var scopeActions = action.Value; TranslateActionAttributeReferencesForSingleScope( null, scopeActions ); } } /** Use for translating rule @init{...} actions that have no scope */ protected internal virtual void TranslateActionAttributeReferencesForSingleScope( Rule r, IDictionary<string,object> scopeActions ) { string ruleName = null; if ( r != null ) { ruleName = r.Name; } foreach ( var scopeAction in scopeActions.ToArray() ) { string name = scopeAction.Key; object action = scopeAction.Value; GrammarAST actionAST = action as GrammarAST; IList<object> chunks = TranslateAction( ruleName, actionAST ); scopeActions[name] = chunks; // replace with translation } } /** Error recovery in ANTLR recognizers. * * Based upon original ideas: * * Algorithms + Data Structures = Programs by Niklaus Wirth * * and * * A note on error recovery in recursive descent parsers: * http://portal.acm.org/citation.cfm?id=947902.947905 * * Later, Josef Grosch had some good ideas: * Efficient and Comfortable Error Recovery in Recursive Descent Parsers: * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip * * Like Grosch I implemented local FOLLOW sets that are combined at run-time * upon error to avoid parsing overhead. */ public virtual void GenerateLocalFollow( GrammarAST referencedElementNode, string referencedElementName, string enclosingRuleName, int elementIndex ) { if (elementIndex < 0) { throw new ArgumentOutOfRangeException("elementIndex", "elementIndex cannot be less than zero."); } /* JSystem.@out.println("compute FOLLOW "+grammar.name+"."+referencedElementNode.toString()+ " for "+referencedElementName+"#"+elementIndex +" in "+ enclosingRuleName+ " line="+referencedElementNode.getLine()); */ NFAState followingNFAState = referencedElementNode.followingNFAState; LookaheadSet follow = null; if ( followingNFAState != null ) { // compute follow for this element and, as side-effect, track // the rule LOOK sensitivity. follow = _grammar.First( followingNFAState ); } if ( follow == null ) { ErrorManager.InternalError( "no follow state or cannot compute follow" ); follow = new LookaheadSet(); } if ( follow.Member( Label.EOF ) ) { // TODO: can we just remove? Seems needed here: // compilation_unit : global_statement* EOF // Actually i guess we resync to EOF regardless follow.Remove( Label.EOF ); } //JSystem.@out.println(" "+follow); IList<int> tokenTypeList = null; ulong[] words = null; if ( follow.TokenTypeSet == null ) { words = new ulong[1]; tokenTypeList = new List<int>(); } else { BitSet bits = BitSet.Of( follow.TokenTypeSet ); words = bits.ToPackedArray(); tokenTypeList = follow.TokenTypeSet.ToList(); } // use the target to convert to hex strings (typically) string[] wordStrings = new string[words.Length]; for ( int j = 0; j < words.Length; j++ ) { ulong w = words[j]; wordStrings[j] = _target.GetTarget64BitStringFromValue( w ); } recognizerST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); outputFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); headerFileST.SetAttribute( "bitsets.{name,inName,bits,tokenTypes,tokenIndex}", referencedElementName, enclosingRuleName, wordStrings, tokenTypeList, elementIndex ); } // L O O K A H E A D D E C I S I O N G E N E R A T I O N /** Generate code that computes the predicted alt given a DFA. The * recognizerST can be either the main generated recognizerTemplate * for storage in the main parser file or a separate file. It's up to * the code that ultimately invokes the codegen.g grammar rule. * * Regardless, the output file and header file get a copy of the DFAs. */ public virtual StringTemplate GenLookaheadDecision( StringTemplate recognizerST, DFA dfa ) { StringTemplate decisionST; // If we are doing inline DFA and this one is acyclic and LL(*) // I have to check for is-non-LL(*) because if non-LL(*) the cyclic // check is not done by DFA.verify(); that is, verify() avoids // doesStateReachAcceptState() if non-LL(*) if ( dfa.CanInlineDecision ) { decisionST = _acyclicDFAGenerator.GenFixedLookaheadDecision( Templates, dfa ); } else { // generate any kind of DFA here (cyclic or acyclic) dfa.CreateStateTables( this ); outputFileST.SetAttribute( "cyclicDFAs", dfa ); headerFileST.SetAttribute( "cyclicDFAs", dfa ); decisionST = _templates.GetInstanceOf( "dfaDecision" ); string description = dfa.NFADecisionStartState.Description; description = _target.GetTargetStringLiteralFromString( description ); if ( description != null ) { decisionST.SetAttribute( "description", description ); } decisionST.SetAttribute( "decisionNumber", dfa.NfaStartStateDecisionNumber ); } return decisionST; } /** A special state is huge (too big for state tables) or has a predicated * edge. Generate a simple if-then-else. Cannot be an accept state as * they have no emanating edges. Don't worry about switch vs if-then-else * because if you get here, the state is super complicated and needs an * if-then-else. This is used by the new DFA scheme created June 2006. */ public virtual StringTemplate GenerateSpecialState( DFAState s ) { StringTemplate stateST; stateST = _templates.GetInstanceOf( "cyclicDFAState" ); stateST.SetAttribute( "needErrorClause", true ); stateST.SetAttribute( "semPredState", s.IsResolvedWithPredicates ); stateST.SetAttribute( "stateNumber", s.StateNumber ); stateST.SetAttribute( "decisionNumber", s.Dfa.DecisionNumber ); bool foundGatedPred = false; StringTemplate eotST = null; for ( int i = 0; i < s.NumberOfTransitions; i++ ) { Transition edge = (Transition)s.GetTransition( i ); StringTemplate edgeST; if ( edge.Label.Atom == Label.EOT ) { // this is the default clause; has to held until last edgeST = _templates.GetInstanceOf( "eotDFAEdge" ); stateST.RemoveAttribute( "needErrorClause" ); eotST = edgeST; } else { edgeST = _templates.GetInstanceOf( "cyclicDFAEdge" ); StringTemplate exprST = GenLabelExpr( _templates, edge, 1 ); edgeST.SetAttribute( "labelExpr", exprST ); } edgeST.SetAttribute( "edgeNumber", i + 1 ); edgeST.SetAttribute( "targetStateNumber", edge.Target.StateNumber ); // stick in any gated predicates for any edge if not already a pred if ( !edge.Label.IsSemanticPredicate ) { DFAState t = (DFAState)edge.Target; SemanticContext preds = t.GetGatedPredicatesInNFAConfigurations(); if ( preds != null ) { foundGatedPred = true; StringTemplate predST = preds.GenExpr( this, Templates, t.Dfa ); edgeST.SetAttribute( "predicates", predST.Render() ); } } if ( edge.Label.Atom != Label.EOT ) { stateST.SetAttribute( "edges", edgeST ); } } if ( foundGatedPred ) { // state has >= 1 edge with a gated pred (syn or sem) // must rewind input first, set flag. stateST.SetAttribute( "semPredState", foundGatedPred ); } if ( eotST != null ) { stateST.SetAttribute( "edges", eotST ); } return stateST; } /** Generate an expression for traversing an edge. */ protected internal virtual StringTemplate GenLabelExpr( TemplateGroup templates, Transition edge, int k ) { Label label = edge.Label; if ( label.IsSemanticPredicate ) { return GenSemanticPredicateExpr( templates, edge ); } if ( label.IsSet ) { return GenSetExpr( templates, label.Set, k, true ); } // must be simple label StringTemplate eST = templates.GetInstanceOf( "lookaheadTest" ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( label.Atom ) ); eST.SetAttribute( "atomAsInt", label.Atom ); eST.SetAttribute( "k", k ); return eST; } protected internal virtual StringTemplate GenSemanticPredicateExpr( TemplateGroup templates, Transition edge ) { DFA dfa = ( (DFAState)edge.Target ).Dfa; // which DFA are we in Label label = edge.Label; SemanticContext semCtx = label.SemanticContext; return semCtx.GenExpr( this, templates, dfa ); } /** For intervals such as [3..3, 30..35], generate an expression that * tests the lookahead similar to LA(1)==3 || (LA(1)>=30&&LA(1)<=35) */ public virtual StringTemplate GenSetExpr( TemplateGroup templates, IIntSet set, int k, bool partOfDFA ) { if ( !( set is IntervalSet ) ) { throw new ArgumentException( "unable to generate expressions for non IntervalSet objects" ); } IntervalSet iset = (IntervalSet)set; if ( iset.Intervals == null || iset.Intervals.Count == 0 ) { StringTemplate emptyST = new StringTemplate( templates, "" ); emptyST.impl.Name = "empty-set-expr"; return emptyST; } string testSTName = "lookaheadTest"; string testRangeSTName = "lookaheadRangeTest"; string testSetSTName = "lookaheadSetTest"; string varSTName = "lookaheadVarName"; if (!partOfDFA) { testSTName = "isolatedLookaheadTest"; testRangeSTName = "isolatedLookaheadRangeTest"; testSetSTName = "isolatedLookaheadSetTest"; varSTName = "isolatedLookaheadVarName"; } StringTemplate setST = templates.GetInstanceOf( "setTest" ); // If the SetTest template exists, separate the ranges: // flatten the small ones into one list and make that a range, // and leave the others as they are. if (templates.IsDefined(testSetSTName)) { // Flatten the IntervalSet into a list of integers. StringTemplate sST = templates.GetInstanceOf(testSetSTName); int rangeNumber2 = 1; foreach (Interval I in iset.Intervals) { int a = I.a; int b = I.b; // Not flattening the large ranges helps us avoid making a // set that contains 90% of Unicode when we could just use // a simple range like (LA(1)>=123 && LA(1)<=65535). // This flattens all ranges of length 4 or less. if (b - a < 4) { for (int i = a; i <= b; i++) { sST.Add("values", GetTokenTypeAsTargetLabel(i)); sST.Add("valuesAsInt", i); } } else { StringTemplate eST = templates.GetInstanceOf(testRangeSTName); eST.Add("lower", GetTokenTypeAsTargetLabel(a)); eST.Add("lowerAsInt", a); eST.Add("upper", GetTokenTypeAsTargetLabel(b)); eST.Add("upperAsInt", b); eST.Add("rangeNumber", rangeNumber2); eST.Add("k", k); setST.Add("ranges", eST); rangeNumber2++; } } sST.Add("k", k); setST.Add("ranges", sST); return setST; } int rangeNumber = 1; foreach ( Interval I in iset.Intervals ) { int a = I.a; int b = I.b; StringTemplate eST; if ( a == b ) { eST = templates.GetInstanceOf( testSTName ); eST.SetAttribute( "atom", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "atomAsInt", a ); //eST.setAttribute("k",Utils.integer(k)); } else { eST = templates.GetInstanceOf( testRangeSTName ); eST.SetAttribute( "lower", GetTokenTypeAsTargetLabel( a ) ); eST.SetAttribute( "lowerAsInt", a ); eST.SetAttribute( "upper", GetTokenTypeAsTargetLabel( b ) ); eST.SetAttribute( "upperAsInt", b ); eST.SetAttribute( "rangeNumber", rangeNumber ); } eST.SetAttribute( "k", k ); setST.SetAttribute( "ranges", eST ); rangeNumber++; } return setST; } // T O K E N D E F I N I T I O N G E N E R A T I O N /** Set attributes tokens and literals attributes in the incoming * code template. This is not the token vocab interchange file, but * rather a list of token type ID needed by the recognizer. */ protected virtual void GenTokenTypeConstants( StringTemplate code ) { // make constants for the token types foreach (var token in _grammar.composite.TokenIDToTypeMap.OrderBy(i => i.Value)) { if (token.Value == Label.EOF || token.Value >= Label.MIN_TOKEN_TYPE) code.SetAttribute("tokens.{name,type}", token.Key, token.Value); } } /** Generate a token names table that maps token type to a printable * name: either the label like INT or the literal like "begin". */ protected virtual void GenTokenTypeNames( StringTemplate code ) { for ( int t = Label.MIN_TOKEN_TYPE; t <= _grammar.MaxTokenType; t++ ) { string tokenName = _grammar.GetTokenDisplayName( t ); if ( tokenName != null ) { tokenName = _target.GetTargetStringLiteralFromString( tokenName, true ); code.SetAttribute( "tokenNames", tokenName ); } } } /** Get a meaningful name for a token type useful during code generation. * Literals without associated names are converted to the string equivalent * of their integer values. Used to generate x==ID and x==34 type comparisons * etc... Essentially we are looking for the most obvious way to refer * to a token type in the generated code. If in the lexer, return the * char literal translated to the target language. For example, ttype=10 * will yield '\n' from the getTokenDisplayName method. That must * be converted to the target languages literals. For most C-derived * languages no translation is needed. */ public virtual string GetTokenTypeAsTargetLabel( int ttype ) { if ( _grammar.type == GrammarType.Lexer ) { string name = _grammar.GetTokenDisplayName( ttype ); return _target.GetTargetCharLiteralFromANTLRCharLiteral( this, name ); } return _target.GetTokenTypeAsTargetLabel( this, ttype ); } /** Generate a token vocab file with all the token names/types. For example: * ID=7 * FOR=8 * 'for'=8 * * This is independent of the target language; used by antlr internally */ protected virtual StringTemplate GenTokenVocabOutput() { StringTemplate vocabFileST = new StringTemplate( vocabFilePattern ); // "define" literals arg vocabFileST.Add("literals", null); vocabFileST.Add("tokens", null); vocabFileST.impl.Name = "vocab-file"; // make constants for the token names foreach ( string tokenID in _grammar.TokenIDs ) { int tokenType = _grammar.GetTokenType( tokenID ); if ( tokenType >= Label.MIN_TOKEN_TYPE ) { vocabFileST.SetAttribute( "tokens.{name,type}", tokenID, tokenType ); } } // now dump the strings foreach ( string literal in _grammar.StringLiterals ) { int tokenType = _grammar.GetTokenType( literal ); if ( tokenType >= Label.MIN_TOKEN_TYPE ) diff --git a/bin/prep/prepare.ps1 b/bin/prep/prepare.ps1 index 4f06fa2..8de575a 100644 --- a/bin/prep/prepare.ps1 +++ b/bin/prep/prepare.ps1 @@ -1,207 +1,220 @@ # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { echo "The script was run from an invalid working directory." exit 1 } $BuildConfig = "Release" +$DebugBuild = false # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" #if (!(Test-Path $msbuild)) { # [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') # $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest") #} &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files -$BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" +if ($DebugBuild) { + $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" +} +else { + $BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" +} + $BootstrapBinaries | ForEach-Object { copy -force "..\$BuildConfig\$_" "..\Bootstrap" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } } if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -r -force "..\$BuildConfig\Tool\*" "..\Bootstrap\Tool" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" +if ($DebugBuild) { + copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" +} copy "..\$BuildConfig\Antlr3.props" ".\Tool" copy "..\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" +if ($DebugBuild) { + copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" +} copy "..\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" copy "..\$BuildConfig\Antlr3.xml" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" -copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" +if ($DebugBuild) { + copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" +} copy "..\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" copy -r "..\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages $AntlrVersion = "3.5.0.3-alpha001" $STVersion = "4.0.7.2-alpha001" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" # Build the NuGet packages if (-not (Test-Path nuget)) { mkdir "nuget" } .\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols .\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols
antlr/antlrcs
e4194f42c4497edf33f692f2bcc4cabf2838b5bb
Fix support for static methods, properties, and fields (fixes #13)
diff --git a/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs b/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs index f55c509..b00d906 100644 --- a/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs +++ b/Antlr4.StringTemplate/Misc/ObjectModelAdaptor.cs @@ -1,220 +1,216 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Misc { using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using ArgumentNullException = System.ArgumentNullException; using FieldInfo = System.Reflection.FieldInfo; using MethodInfo = System.Reflection.MethodInfo; using PropertyInfo = System.Reflection.PropertyInfo; using Type = System.Type; public class ObjectModelAdaptor : IModelAdaptor { private static readonly Dictionary<Type, Dictionary<string, System.Func<object, object>>> _memberAccessors = new Dictionary<Type, Dictionary<string, System.Func<object, object>>>(); public virtual object GetProperty(Interpreter interpreter, TemplateFrame frame, object o, object property, string propertyName) { if (o == null) throw new ArgumentNullException("o"); Type c = o.GetType(); if (property == null) throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName ?? "null")); object value = null; var accessor = FindMember(c, propertyName); if (accessor != null) { value = accessor(o); } else { throw new TemplateNoSuchPropertyException(o, string.Format("{0}.{1}", c.FullName, propertyName)); } return value; } private static System.Func<object, object> FindMember(Type type, string name) { if (type == null) throw new ArgumentNullException("type"); if (name == null) throw new ArgumentNullException("name"); lock (_memberAccessors) { Dictionary<string, System.Func<object, object>> members; System.Func<object, object> accessor = null; if (_memberAccessors.TryGetValue(type, out members)) { if (members.TryGetValue(name, out accessor)) return accessor; } else { members = new Dictionary<string, System.Func<object, object>>(); _memberAccessors[type] = members; } // must look up using reflection string methodSuffix = char.ToUpperInvariant(name[0]) + name.Substring(1); bool checkOriginalName = !string.Equals(methodSuffix, name); MethodInfo method = null; if (method == null) { PropertyInfo p = type.GetProperty(methodSuffix); if (p == null && checkOriginalName) p = type.GetProperty(name); if (p != null) method = p.GetGetMethod(); } if (method == null) { method = type.GetMethod("Get" + methodSuffix, Type.EmptyTypes); if (method == null && checkOriginalName) method = type.GetMethod("Get" + name, Type.EmptyTypes); } if (method == null) { method = type.GetMethod("get_" + methodSuffix, Type.EmptyTypes); if (method == null && checkOriginalName) method = type.GetMethod("get_" + name, Type.EmptyTypes); } if (method != null) { accessor = BuildAccessor(method); } else { // try for an indexer method = type.GetMethod("get_Item", new Type[] { typeof(string) }); if (method == null) { var property = type.GetProperties().FirstOrDefault(IsIndexer); if (property != null) method = property.GetGetMethod(); } if (method != null) { accessor = BuildAccessor(method, name); } else { // try for a visible field FieldInfo field = type.GetField(name); // also check .NET naming convention for fields if (field == null) field = type.GetField("_" + name); if (field != null) accessor = BuildAccessor(field); } } members[name] = accessor; return accessor; } } private static bool IsIndexer(PropertyInfo propertyInfo) { if (propertyInfo == null) throw new ArgumentNullException("propertyInfo"); var indexParameters = propertyInfo.GetIndexParameters(); return indexParameters != null && indexParameters.Length > 0 && indexParameters[0].ParameterType == typeof(string); } private static System.Func<object, object> BuildAccessor(MethodInfo method) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); + UnaryExpression instance = !method.IsStatic ? Expression.Convert(obj, method.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( - Expression.Call( - Expression.Convert(obj, method.DeclaringType), - method), + Expression.Call(instance, method), typeof(object)), obj); return expr.Compile(); } /// <summary> /// Builds an accessor for an indexer property that returns a takes a string argument. /// </summary> private static System.Func<object, object> BuildAccessor(MethodInfo method, string argument) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); + UnaryExpression instance = !method.IsStatic ? Expression.Convert(obj, method.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( - Expression.Call( - Expression.Convert(obj, method.DeclaringType), - method, - Expression.Constant(argument)), + Expression.Call(instance, method, Expression.Constant(argument)), typeof(object)), obj); return expr.Compile(); } private static System.Func<object, object> BuildAccessor(FieldInfo field) { ParameterExpression obj = Expression.Parameter(typeof(object), "obj"); + UnaryExpression instance = !field.IsStatic ? Expression.Convert(obj, field.DeclaringType) : null; Expression<System.Func<object, object>> expr = Expression.Lambda<System.Func<object, object>>( Expression.Convert( - Expression.Field( - Expression.Convert(obj, field.DeclaringType), - field), + Expression.Field(instance, field), typeof(object)), obj); return expr.Compile(); } } } diff --git a/Antlr4.Test.StringTemplate/BaseTest.cs b/Antlr4.Test.StringTemplate/BaseTest.cs index b16f1f1..af35420 100644 --- a/Antlr4.Test.StringTemplate/BaseTest.cs +++ b/Antlr4.Test.StringTemplate/BaseTest.cs @@ -1,208 +1,222 @@ /* * [The "BSD licence"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using Antlr.Runtime; using Antlr4.StringTemplate; using Antlr4.StringTemplate.Compiler; using Microsoft.VisualStudio.TestTools.UnitTesting; using ArgumentException = System.ArgumentException; using CultureInfo = System.Globalization.CultureInfo; using DateTime = System.DateTime; using Directory = System.IO.Directory; using Environment = System.Environment; using File = System.IO.File; using Path = System.IO.Path; using StringBuilder = System.Text.StringBuilder; using Thread = System.Threading.Thread; [TestClass] public abstract class BaseTest { public static string tmpdir; public static readonly string newline = Environment.NewLine; public TestContext TestContext { get; set; } [TestInitialize] public void setUp() { setUpImpl(); } protected virtual void setUpImpl() { Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-us"); TemplateGroup.DefaultGroup = new TemplateGroup(); TemplateCompiler.subtemplateCount = 0; // new output dir for each test tmpdir = Path.GetFullPath(Path.Combine(Path.GetTempPath(), "st4-" + currentTimeMillis())); } [TestCleanup] public void tearDown() { // Remove tmpdir if no error. how? if (TestContext != null && TestContext.CurrentTestOutcome == UnitTestOutcome.Passed) eraseTempDir(); } protected virtual void eraseTempDir() { if (Directory.Exists(tmpdir)) Directory.Delete(tmpdir, true); } public static long currentTimeMillis() { return DateTime.Now.ToFileTime() / 10000; } public static void writeFile(string dir, string fileName, string content) { if (Path.IsPathRooted(fileName)) throw new ArgumentException(); string fullPath = Path.GetFullPath(Path.Combine(dir, fileName)); dir = Path.GetDirectoryName(fullPath); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); File.WriteAllText(fullPath, content); } public void checkTokens(string template, string expected) { checkTokens(template, expected, '<', '>'); } public void checkTokens(string template, string expected, char delimiterStartChar, char delimiterStopChar) { TemplateLexer lexer = new TemplateLexer(TemplateGroup.DefaultErrorManager, new ANTLRStringStream(template), null, delimiterStartChar, delimiterStopChar); CommonTokenStream tokens = new CommonTokenStream(lexer); StringBuilder buf = new StringBuilder(); buf.Append("["); int i = 1; IToken t = tokens.LT(i); while (t.Type != CharStreamConstants.EndOfFile) { if (i > 1) buf.Append(", "); buf.Append(t); i++; t = tokens.LT(i); } buf.Append("]"); string result = buf.ToString(); Assert.AreEqual(expected, result); } public class User { public int id; public string name; + public static string StaticField = "field_value"; public User(int id, string name) { this.id = id; this.name = name; } public virtual bool IsManager { get { return true; } } public virtual bool HasParkingSpot { get { return true; } } public virtual string Name { get { return name; } } + + public static string GetStaticMethod() + { + return "method_result"; + } + + public static string StaticProperty + { + get + { + return "property_result"; + } + } } public class HashableUser : User { public HashableUser(int id, string name) : base(id, name) { } public override int GetHashCode() { return id; } public override bool Equals(object o) { HashableUser hu = o as HashableUser; if (hu != null) return this.id == hu.id && string.Equals(this.name, hu.name); return false; } } #if false public static string getRandomDir() { string randomDir = tmpdir + "dir" + String.valueOf((int)(Math.random() * 100000)); File f = new File(randomDir); f.mkdirs(); return randomDir; } #endif } } diff --git a/Antlr4.Test.StringTemplate/TestCoreBasics.cs b/Antlr4.Test.StringTemplate/TestCoreBasics.cs index 04bde44..225c6fd 100644 --- a/Antlr4.Test.StringTemplate/TestCoreBasics.cs +++ b/Antlr4.Test.StringTemplate/TestCoreBasics.cs @@ -1,724 +1,760 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.Test.StringTemplate { using System.Collections.Generic; using Antlr4.StringTemplate; using Antlr4.StringTemplate.Misc; using Microsoft.VisualStudio.TestTools.UnitTesting; using ArgumentException = System.ArgumentException; using Path = System.IO.Path; using StringWriter = System.IO.StringWriter; [TestClass] public class TestCoreBasics : BaseTest { [TestMethod][TestCategory(TestCategories.ST4)] public void TestNullAttr() { string template = "hi <name>!"; Template st = new Template(template); string expected = "hi !"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestAttr() { string template = "hi <name>!"; Template st = new Template(template); st.Add("name", "Ter"); string expected = "hi Ter!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestChainAttr() { string template = "<x>:<names>!"; Template st = new Template(template); st.Add("names", "Ter").Add("names", "Tom").Add("x", 1); string expected = "1:TerTom!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestSetUnknownAttr() { string templates = "t() ::= <<hi <name>!>>\n"; ErrorBuffer errors = new ErrorBuffer(); writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); group.Listener = errors; Template st = group.GetInstanceOf("t"); string result = null; try { st.Add("name", "Ter"); } catch (ArgumentException iae) { result = iae.Message; } string expected = "no such attribute: name"; Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMultiAttr() { string template = "hi <name>!"; Template st = new Template(template); st.Add("name", "Ter"); st.Add("name", "Tom"); string expected = "hi TerTom!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestAttrIsList() { string template = "hi <name>!"; Template st = new Template(template); List<string> names = new List<string>() { "Ter", "Tom" }; st.Add("name", names); st.Add("name", "Sumana"); // shouldn't alter my version of names list! string expected = "hi TerTomSumana!"; // Template sees 3 names string result = st.Render(); Assert.AreEqual(expected, result); Assert.AreEqual(2, names.Count); // my names list is still just 2 } [TestMethod][TestCategory(TestCategories.ST4)] public void TestAttrIsArray() { string template = "hi <name>!"; Template st = new Template(template); string[] names = new string[] { "Ter", "Tom" }; st.Add("name", names); st.Add("name", "Sumana"); // shouldn't alter my version of names list! string expected = "hi TerTomSumana!"; // Template sees 3 names string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestProp() { string template = "<u.id>: <u.name>"; // checks field and method getter Template st = new Template(template); st.Add("u", new User(1, "parrt")); string expected = "1: parrt"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPropWithNoAttr() { string template = "<foo.a>: <ick>"; Template st = new Template(template); st.Add("foo", new Dictionary<string, string>() { { "a", "b" } }); string expected = "b: "; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapAcrossDictionaryUsesKeys() { string template = "<foo:{f | <f>}>"; // checks field and method getter Template st = new Template(template); st.Add("foo", new SortedDictionary<string, string>() { { "a", "b" }, { "c", "d" } }); string expected = "ac"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestSTProp() { string template = "<t.x>"; // get x attr of template t Template st = new Template(template); Template t = new Template("<x>"); t.Add("x", "Ter"); st.Add("t", t); string expected = "Ter"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestBooleanISProp() { string template = "<t.isManager>"; // call isManager Template st = new Template(template); st.Add("t", new User(32, "Ter")); string expected = "true"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestBooleanHASProp() { string template = "<t.hasParkingSpot>"; // call hasParkingSpot Template st = new Template(template); st.Add("t", new User(32, "Ter")); string expected = "true"; string result = st.Render(); Assert.AreEqual(expected, result); } + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestStaticMethod() + { + string template = "<t.StaticMethod>"; + Template st = new Template(template); + st.Add("t", new User(32, "Ter")); + string expected = "method_result"; + string result = st.Render(); + Assert.AreEqual(expected, result); + } + + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestStaticProperty() + { + string template = "<t.StaticProperty>"; + Template st = new Template(template); + st.Add("t", new User(32, "Ter")); + string expected = "property_result"; + string result = st.Render(); + Assert.AreEqual(expected, result); + } + + [TestMethod] + [TestCategory(TestCategories.ST4)] + public void TestStaticField() + { + string template = "<t.StaticField>"; + Template st = new Template(template); + st.Add("t", new User(32, "Ter")); + string expected = "field_value"; + string result = st.Render(); + Assert.AreEqual(expected, result); + } + [TestMethod][TestCategory(TestCategories.ST4)] public void TestNullAttrProp() { string template = "<u.id>: <u.name>"; Template st = new Template(template); string expected = ": "; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestNoSuchProp() { ErrorBufferAllErrors errors = new ErrorBufferAllErrors(); string template = "<u.qqq>"; TemplateGroup group = new TemplateGroup(); group.Listener = errors; Template st = new Template(group, template); st.Add("u", new User(1, "parrt")); string expected = ""; string result = st.Render(); Assert.AreEqual(expected, result); TemplateRuntimeMessage msg = (TemplateRuntimeMessage)errors.Errors[0]; TemplateNoSuchPropertyException e = (TemplateNoSuchPropertyException)msg.Cause; Assert.AreEqual("Antlr4.Test.StringTemplate.BaseTest+User.qqq", e.PropertyName); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestNullIndirectProp() { ErrorBufferAllErrors errors = new ErrorBufferAllErrors(); TemplateGroup group = new TemplateGroup(); group.Listener = errors; string template = "<u.(qqq)>"; Template st = new Template(group, template); st.Add("u", new User(1, "parrt")); st.Add("qqq", null); string expected = ""; string result = st.Render(); Assert.AreEqual(expected, result); TemplateRuntimeMessage msg = (TemplateRuntimeMessage)errors.Errors[0]; TemplateNoSuchPropertyException e = (TemplateNoSuchPropertyException)msg.Cause; Assert.AreEqual("Antlr4.Test.StringTemplate.BaseTest+User.null", e.PropertyName); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPropConvertsToString() { ErrorBufferAllErrors errors = new ErrorBufferAllErrors(); TemplateGroup group = new TemplateGroup(); group.Listener = errors; string template = "<u.(name)>"; Template st = new Template(group, template); st.Add("u", new User(1, "parrt")); st.Add("name", 100); string expected = ""; string result = st.Render(); Assert.AreEqual(expected, result); TemplateRuntimeMessage msg = (TemplateRuntimeMessage)errors.Errors[0]; TemplateNoSuchPropertyException e = (TemplateNoSuchPropertyException)msg.Cause; Assert.AreEqual("Antlr4.Test.StringTemplate.BaseTest+User.100", e.PropertyName); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestInclude() { string template = "Load <box()>;"; Template st = new Template(template); st.impl.NativeGroup.DefineTemplate("box", "kewl\ndaddy"); string expected = "Load kewl" + newline + "daddy;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestIncludeWithArg() { string template = "Load <box(\"arg\")>;"; Template st = new Template(template); st.impl.NativeGroup.DefineTemplate("box", "kewl <x> daddy", new string[] { "x" }); st.impl.Dump(); st.Add("name", "Ter"); string expected = "Load kewl arg daddy;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestIncludeWithArg2() { string template = "Load <box(\"arg\", foo())>;"; Template st = new Template(template); st.impl.NativeGroup.DefineTemplate("box", "kewl <x> <y> daddy", new string[] { "x", "y" }); st.impl.NativeGroup.DefineTemplate("foo", "blech"); st.Add("name", "Ter"); string expected = "Load kewl arg blech daddy;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestIncludeWithEmptySubtemplateArg() { string template = "load <box({})>;"; Template st = new Template(template); st.impl.NativeGroup.DefineTemplate("box", "kewl <x> daddy", new string[] { "x" }); st.impl.Dump(); st.Add("name", "Ter"); string expected = "load kewl daddy;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestIncludeWithNestedArgs() { string template = "Load <box(foo(\"arg\"))>;"; Template st = new Template(template); st.impl.NativeGroup.DefineTemplate("box", "kewl <y> daddy", new string[] { "y" }); st.impl.NativeGroup.DefineTemplate("foo", "blech <x>", new string[] { "x" }); st.Add("name", "Ter"); string expected = "Load kewl blech arg daddy;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPassThru() { string templates = "a(x,y) ::= \"<b(...)>\"\n" + "b(x,y) ::= \"<x><y>\"\n"; TemplateGroup group = new TemplateGroupString(templates); Template a = group.GetInstanceOf("a"); a.Add("x", "x"); a.Add("y", "y"); string expected = "xy"; string result = a.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPassThruWithDefaultValue() { string templates = "a(x,y) ::= \"<b(...)>\"\n" + // should not set y when it sees "no value" from above "b(x,y={99}) ::= \"<x><y>\"\n"; TemplateGroup group = new TemplateGroupString(templates); Template a = group.GetInstanceOf("a"); a.Add("x", "x"); string expected = "x99"; string result = a.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPassThruWithDefaultValueThatLacksDefinitionAbove() { string templates = "a(x) ::= \"<b(...)>\"\n" + // should not set y when it sees "no definition" from above "b(x,y={99}) ::= \"<x><y>\"\n"; TemplateGroup group = new TemplateGroupString(templates); Template a = group.GetInstanceOf("a"); a.Add("x", "x"); string expected = "x99"; string result = a.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPassThruPartialArgs() { string templates = "a(x,y) ::= \"<b(y={99},...)>\"\n" + "b(x,y) ::= \"<x><y>\"\n"; TemplateGroup group = new TemplateGroupString(templates); Template a = group.GetInstanceOf("a"); a.Add("x", "x"); a.Add("y", "y"); string expected = "x99"; string result = a.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestPassThruNoMissingArgs() { string templates = "a(x,y) ::= \"<b(y={99},x={1},...)>\"\n" + "b(x,y) ::= \"<x><y>\"\n"; TemplateGroup group = new TemplateGroupString(templates); Template a = group.GetInstanceOf("a"); a.Add("x", "x"); a.Add("y", "y"); string expected = "199"; string result = a.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestDefineTemplate() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("inc", "<x>+1", new string[] { "x" }); group.DefineTemplate("test", "hi <name>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "hi TerTomSumana!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("inc", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "hi <name:inc()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "hi [Ter][Tom][Sumana]!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestIndirectMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("inc", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "<name:(t)()>!", new string[] { "t", "name" }); Template st = group.GetInstanceOf("test"); st.Add("t", "inc"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "[Ter][Tom][Sumana]!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapWithExprAsTemplateName() { string templates = "d ::= [\"foo\":\"bold\"]\n" + "test(name) ::= \"<name:(d.foo)()>\"\n" + "bold(x) ::= <<*<x>*>>\n"; writeFile(tmpdir, "t.stg", templates); TemplateGroup group = new TemplateGroupFile(Path.Combine(tmpdir, "t.stg")); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "*Ter**Tom**Sumana*"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestParallelMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("test", "hi <names,phones:{n,p | <n>:<p>;}>", new string[] { "names", "phones" }); Template st = group.GetInstanceOf("test"); st.Add("names", "Ter"); st.Add("names", "Tom"); st.Add("names", "Sumana"); st.Add("phones", "x5001"); st.Add("phones", "x5002"); st.Add("phones", "x5003"); string expected = "hi Ter:x5001;Tom:x5002;Sumana:x5003;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestParallelMapWith3Versus2Elements() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("test", "hi <names,phones:{n,p | <n>:<p>;}>", new string[] { "names", "phones" }); Template st = group.GetInstanceOf("test"); st.Add("names", "Ter"); st.Add("names", "Tom"); st.Add("names", "Sumana"); st.Add("phones", "x5001"); st.Add("phones", "x5002"); string expected = "hi Ter:x5001;Tom:x5002;Sumana:;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestParallelMapThenMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("bold", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "hi <names,phones:{n,p | <n>:<p>;}:bold()>", new string[] { "names", "phones" }); Template st = group.GetInstanceOf("test"); st.Add("names", "Ter"); st.Add("names", "Tom"); st.Add("names", "Sumana"); st.Add("phones", "x5001"); st.Add("phones", "x5002"); string expected = "hi [Ter:x5001;][Tom:x5002;][Sumana:;]"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapThenParallelMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("bold", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "hi <[names:bold()],phones:{n,p | <n>:<p>;}>", new string[] { "names", "phones" }); Template st = group.GetInstanceOf("test"); st.Add("names", "Ter"); st.Add("names", "Tom"); st.Add("names", "Sumana"); st.Add("phones", "x5001"); st.Add("phones", "x5002"); string expected = "hi [Ter]:x5001;[Tom]:x5002;[Sumana]:;"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapIndexes() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("inc", "<i>:<x>", new string[] { "x", "i" }); group.DefineTemplate("test", "<name:{n|<inc(n,i)>}; separator=\", \">", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", null); // don't count this one st.Add("name", "Sumana"); string expected = "1:Ter, 2:Tom, 3:Sumana"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapIndexes2() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("test", "<name:{n | <i>:<n>}; separator=\", \">", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", null); // don't count this one. still can't apply subtemplate to null value st.Add("name", "Sumana"); string expected = "1:Ter, 2:Tom, 3:Sumana"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapSingleValue() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); string expected = "hi [Ter]!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapNullValue() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); string expected = "hi !"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestMapNullValueInList() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("test", "<name; separator=\", \">", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", null); // don't print this one st.Add("name", "Sumana"); string expected = "Ter, Tom, Sumana"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRepeatedMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("b", "(<x>)", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a():b()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "hi ([Ter])([Tom])([Sumana])!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRepeatedMapWithNullValue() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("b", "(<x>)", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a():b()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", null); st.Add("name", "Sumana"); string expected = "hi ([Ter])([Sumana])!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod] [TestCategory(TestCategories.ST4)] public void TestRepeatedMapWithNullValueAndNullOption() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("b", "(<x>)", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a():b(); null={x}>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", null); st.Add("name", "Sumana"); string expected = "hi ([Ter])x([Sumana])!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestRoundRobinMap() { TemplateGroup group = new TemplateGroup(); group.DefineTemplate("a", "[<x>]", new string[] { "x" }); group.DefineTemplate("b", "(<x>)", new string[] { "x" }); group.DefineTemplate("test", "hi <name:a(),b()>!", new string[] { "name" }); Template st = group.GetInstanceOf("test"); st.Add("name", "Ter"); st.Add("name", "Tom"); st.Add("name", "Sumana"); string expected = "hi [Ter](Tom)[Sumana]!"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestTrueCond() { string template = "<if(name)>works<endif>"; Template st = new Template(template); st.Add("name", "Ter"); string expected = "works"; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestEmptyIFTemplate() { string template = "<if(x)>fail<elseif(name)><endif>"; Template st = new Template(template); st.Add("name", "Ter"); string expected = ""; string result = st.Render(); Assert.AreEqual(expected, result); } [TestMethod][TestCategory(TestCategories.ST4)] public void TestCondParens() { string template = "<if(!(x||y)&&!z)>works<endif>"; Template st = new Template(template); string expected = "works"; string result = st.Render();
antlr/antlrcs
df93ccd67c20fbe9ce8103bf09a0d321d648a371
Handle cases where InternalPreserveStackTrace does not exist (fixes #4)
diff --git a/Antlr3.StringTemplate/Extensions/ExceptionExtensions.cs b/Antlr3.StringTemplate/Extensions/ExceptionExtensions.cs index dca7de9..bb4df62 100644 --- a/Antlr3.StringTemplate/Extensions/ExceptionExtensions.cs +++ b/Antlr3.StringTemplate/Extensions/ExceptionExtensions.cs @@ -1,87 +1,93 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.ST.Extensions { using System; using BindingFlags = System.Reflection.BindingFlags; + using MethodInfo = System.Reflection.MethodInfo; using TextWriter = System.IO.TextWriter; public static class ExceptionExtensions { - private static readonly Action<Exception> _internalPreserveStackTrace = - (Action<Exception>)Delegate.CreateDelegate( - typeof(Action<Exception>), - typeof(Exception).GetMethod( - "InternalPreserveStackTrace", - BindingFlags.Instance | BindingFlags.NonPublic)); + private static readonly Action<Exception> _internalPreserveStackTrace = GetInternalPreserveStackTraceDelegate(); + + private static Action<Exception> GetInternalPreserveStackTraceDelegate() + { + MethodInfo methodInfo = typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); + if (methodInfo == null) + return null; + + return (Action<Exception>)Delegate.CreateDelegate(typeof(Action<Exception>), methodInfo); + } #pragma warning disable 618 public static bool IsCritical(this Exception e) { if (e is AccessViolationException || e is StackOverflowException || e is ExecutionEngineException || e is OutOfMemoryException || e is BadImageFormatException || e is AppDomainUnloadedException) { return true; } return false; } #pragma warning restore 618 public static void PreserveStackTrace(this Exception e) { - _internalPreserveStackTrace(e); + if (_internalPreserveStackTrace != null) + _internalPreserveStackTrace(e); } internal static void PrintStackTrace(this Exception e) { PrintStackTrace(e, Console.Error); } internal static void PrintStackTrace(this Exception e, TextWriter writer) { writer.WriteLine(e.ToString()); string trace = e.StackTrace ?? string.Empty; foreach (string line in trace.Split('\n', '\r')) { if (!string.IsNullOrEmpty(line)) writer.WriteLine(" " + line); } } } } diff --git a/Antlr3/Extensions/ExceptionExtensions.cs b/Antlr3/Extensions/ExceptionExtensions.cs index 88fe742..4c7a184 100644 --- a/Antlr3/Extensions/ExceptionExtensions.cs +++ b/Antlr3/Extensions/ExceptionExtensions.cs @@ -1,97 +1,103 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Extensions { using System; using System.Linq; using BindingFlags = System.Reflection.BindingFlags; + using MethodInfo = System.Reflection.MethodInfo; using StackFrame = System.Diagnostics.StackFrame; using StackTrace = System.Diagnostics.StackTrace; using TextWriter = System.IO.TextWriter; public static class ExceptionExtensions { - private static readonly Action<Exception> _internalPreserveStackTrace = - (Action<Exception>)Delegate.CreateDelegate( - typeof(Action<Exception>), - typeof(Exception).GetMethod( - "InternalPreserveStackTrace", - BindingFlags.Instance | BindingFlags.NonPublic)); + private static readonly Action<Exception> _internalPreserveStackTrace = GetInternalPreserveStackTraceDelegate(); + + private static Action<Exception> GetInternalPreserveStackTraceDelegate() + { + MethodInfo methodInfo = typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); + if (methodInfo == null) + return null; + + return (Action<Exception>)Delegate.CreateDelegate(typeof(Action<Exception>), methodInfo); + } #pragma warning disable 618 public static bool IsCritical(this Exception e) { if (e is AccessViolationException || e is StackOverflowException || e is ExecutionEngineException || e is OutOfMemoryException || e is BadImageFormatException || e is AppDomainUnloadedException) { return true; } return false; } #pragma warning restore 618 public static void PreserveStackTrace(this Exception e) { - _internalPreserveStackTrace(e); + if (_internalPreserveStackTrace != null) + _internalPreserveStackTrace(e); } internal static StackFrame[] GetStackTrace(this Exception e) { StackTrace trace = new StackTrace(e, true); StackFrame[] frames = trace.GetFrames(); if (frames == null) { // don't include this helper function in the trace frames = new StackTrace(true).GetFrames().Skip(1).ToArray(); } return frames; } internal static void PrintStackTrace(this Exception e, TextWriter writer) { writer.WriteLine(e.ToString()); string trace = e.StackTrace ?? string.Empty; foreach (string line in trace.Split('\n', '\r')) { if (!string.IsNullOrEmpty(line)) writer.WriteLine(" " + line); } } } } diff --git a/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs b/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs index 3bb3b77..ed85cb4 100644 --- a/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs +++ b/Antlr4.StringTemplate/Extensions/ExceptionExtensions.cs @@ -1,69 +1,75 @@ /* * [The "BSD licence"] * Copyright (c) 2005-2008 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2010 Sam Harwell, Pixel Mine, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate.Extensions { using System; using BindingFlags = System.Reflection.BindingFlags; + using MethodInfo = System.Reflection.MethodInfo; public static class ExceptionExtensions { - private static readonly Action<Exception> _internalPreserveStackTrace = - (Action<Exception>)Delegate.CreateDelegate( - typeof(Action<Exception>), - typeof(Exception).GetMethod( - "InternalPreserveStackTrace", - BindingFlags.Instance | BindingFlags.NonPublic)); + private static readonly Action<Exception> _internalPreserveStackTrace = GetInternalPreserveStackTraceDelegate(); + + private static Action<Exception> GetInternalPreserveStackTraceDelegate() + { + MethodInfo methodInfo = typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); + if (methodInfo == null) + return null; + + return (Action<Exception>)Delegate.CreateDelegate(typeof(Action<Exception>), methodInfo); + } #pragma warning disable 618 public static bool IsCritical(this Exception e) { if (e is AccessViolationException || e is StackOverflowException || e is ExecutionEngineException || e is OutOfMemoryException || e is BadImageFormatException || e is AppDomainUnloadedException) { return true; } return false; } #pragma warning restore 618 public static void PreserveStackTrace(this Exception e) { - _internalPreserveStackTrace(e); + if (_internalPreserveStackTrace != null) + _internalPreserveStackTrace(e); } } }
antlr/antlrcs
5a529bbc88e5f030612e174567e398551a047be8
Improve handling of TemplateGroupString.FileName (fixes #3)
diff --git a/Antlr4.StringTemplate/TemplateGroupString.cs b/Antlr4.StringTemplate/TemplateGroupString.cs index 41a98ff..1352458 100644 --- a/Antlr4.StringTemplate/TemplateGroupString.cs +++ b/Antlr4.StringTemplate/TemplateGroupString.cs @@ -1,112 +1,112 @@ /* * [The "BSD license"] * Copyright (c) 2011 Terence Parr * All rights reserved. * * Conversion to C#: * Copyright (c) 2011 Sam Harwell, Tunnel Vision Laboratories, LLC * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr4.StringTemplate { using Antlr.Runtime; using Antlr4.StringTemplate.Compiler; using Antlr4.StringTemplate.Misc; using Exception = System.Exception; /** A group derived from a string not a file or dir. */ public class TemplateGroupString : TemplateGroup { private string sourceName; private string text; private bool alreadyLoaded = false; public TemplateGroupString(string text) - : this("<string>", text, '<', '>') + : this("[string]", text, '<', '>') { } public TemplateGroupString(string sourceName, string text) : this(sourceName, text, '<', '>') { } public TemplateGroupString(string sourceName, string text, char delimiterStartChar, char delimiterStopChar) : base(delimiterStartChar, delimiterStopChar) { this.sourceName = sourceName; this.text = text; } public override string FileName { get { - return "<string>"; + return sourceName; } } public override bool IsDefined(string name) { if (!alreadyLoaded) Load(); return base.IsDefined(name); } public override void Load() { if (alreadyLoaded) return; alreadyLoaded = true; GroupParser parser = null; try { ANTLRStringStream fs = new ANTLRStringStream(text); fs.name = sourceName; GroupLexer lexer = new GroupLexer(fs); CommonTokenStream tokens = new CommonTokenStream(lexer); parser = new GroupParser(tokens); // no prefix since this group file is the entire group, nothing lives // beneath it. parser.group(this, "/"); } catch (Exception e) { - ErrorManager.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, "<string>"); + ErrorManager.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, FileName); } } protected override CompiledTemplate Load(string name) { if (!alreadyLoaded) Load(); return RawGetTemplate(name); } } }
antlr/antlrcs
342817891bf9f494a317f8ae5feb8bcfc6bcd09a
Initial NuGet support
diff --git a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj index 6eb88f2..f067d7e 100644 --- a/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj +++ b/Antlr3.StringTemplate/Antlr3.StringTemplate.csproj @@ -1,138 +1,140 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B5910BE2-DE21-4AA9-95C1-486F42B9E794}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr.ST</RootNamespace> <AssemblyName>Antlr3.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Debug\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE;COMPILE_EXPRESSIONS; CACHE_FUNCTORS</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Release\Antlr3.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="CommonGroupLoader.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="PathGroupLoader.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StringTemplate.cs" /> <Compile Include="StringTemplateErrorListener.cs" /> <Compile Include="StringTemplateGroup.cs" /> <Compile Include="StringTemplateGroupInterface.cs" /> <Compile Include="StringTemplateGroupLoader.cs" /> <Compile Include="StringTemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Language\AngleBracketTemplateLexer.g3" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="JavaExtensions\AntlrJavaExtensions.cs" /> <Compile Include="JavaExtensions\DictionaryExtensions.cs" /> <Compile Include="JavaExtensions\ListExtensions.cs" /> <Compile Include="Language\AngleBracketTemplateLexerHelper.cs"> <DependentUpon>AngleBracketTemplateLexer.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Template.g3" /> <Compile Include="Language\ASTExpr.cs" /> <Compile Include="Language\Cat.cs" /> <Compile Include="Language\ChunkToken.cs" /> <Compile Include="Language\ConditionalExpr.cs" /> <Compile Include="Language\Expr.cs" /> <Compile Include="Language\FormalArgument.cs" /> <Compile Include="Language\NewlineRef.cs" /> <Compile Include="Language\RegionType.cs" /> <Compile Include="Language\StringRef.cs" /> <Compile Include="Language\StringTemplateAST.cs" /> <Compile Include="Language\StringTemplateToken.cs" /> <Compile Include="Language\StringTemplateTreeAdaptor.cs" /> <Compile Include="Language\TemplateLexerHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Compile Include="Language\TemplateParserHelper.cs"> <DependentUpon>Template.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Interface.g3" /> <Compile Include="Language\InterfaceLexerHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Compile Include="Language\InterfaceParserHelper.cs"> <DependentUpon>Interface.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Group.g3" /> <Compile Include="Language\GroupLexerHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Language\GroupParserHelper.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Antlr3 Include="Language\Action.g3" /> <Compile Include="Language\ActionLexerHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Compile Include="Language\ActionParserHelper.cs"> <DependentUpon>Action.g3</DependentUpon> </Compile> <Antlr3 Include="Language\ActionEvaluator.g3" /> <Compile Include="Language\ActionEvaluatorHelper.cs"> <DependentUpon>ActionEvaluator.g3</DependentUpon> </Compile> <Compile Include="TypeRegistry`1.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr3/Antlr3.csproj b/Antlr3/Antlr3.csproj index 28fca77..bf106f8 100644 --- a/Antlr3/Antlr3.csproj +++ b/Antlr3/Antlr3.csproj @@ -1,505 +1,507 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{2AB8CAED-C046-4F05-8B18-6948100D2FE7}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr3</RootNamespace> <AssemblyName>Antlr3</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>..\bin\Debug\Antlr3.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>..\bin\Release\Antlr3.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System.XML" /> <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="Analysis\ActionLabel.cs" /> <Compile Include="Analysis\AnalysisRecursionOverflowException.cs" /> <Compile Include="Analysis\AnalysisTimeoutException.cs" /> <Compile Include="Analysis\Cyclic.cs" /> <Compile Include="Analysis\DecisionProbe.cs" /> <Compile Include="Analysis\DFA.cs" /> <Compile Include="Analysis\DFAOptimizer.cs" /> <Compile Include="Analysis\DFAState.cs" /> <Compile Include="Analysis\Label.cs" /> <Compile Include="Analysis\LL1Analyzer.cs" /> <Compile Include="Analysis\LL1DFA.cs" /> <Compile Include="Analysis\LookaheadSet.cs" /> <Compile Include="Analysis\NFA.cs" /> <Compile Include="Analysis\NFAConfiguration.cs" /> <Compile Include="Analysis\NFAContext.cs" /> <Compile Include="Analysis\NFAConversionThread.cs" /> <Compile Include="Analysis\NFAState.cs" /> <Compile Include="Analysis\NFAtoDFAConverter.cs" /> <Compile Include="Analysis\NonLLStarDecisionException.cs" /> <Compile Include="Analysis\PredicateLabel.cs" /> <Compile Include="Analysis\Reachable.cs" /> <Compile Include="Analysis\RuleClosureTransition.cs" /> <Compile Include="Analysis\SemanticContext.cs" /> <Compile Include="Analysis\State.cs" /> <Compile Include="Analysis\StateCluster.cs" /> <Compile Include="Analysis\Transition.cs" /> <Compile Include="Codegen\CodeGenerator.cs" /> <Compile Include="Codegen\Target.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Grammars\LeftRecursiveRuleWalker.g3.cs"> <DependentUpon>LeftRecursiveRuleWalker.g3</DependentUpon> </Compile> <Compile Include="Misc\Barrier.cs" /> <Compile Include="Misc\BitSet.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\IntervalSet.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\OrderedHashSet.cs" /> <Compile Include="Misc\Utils.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="AntlrTool.cs" /> <Compile Include="Tool\ErrorManager.cs" /> <Compile Include="Tool\Grammar.cs" /> <Compile Include="Tool\GrammarAST.cs" /> <Compile Include="Tool\LeftRecursiveRuleAnalyzer.cs" /> <Compile Include="Tool\Message.cs" /> <Compile Include="Tool\Rule.cs" /> <Compile Include="Tool\ToolMessage.cs" /> <Compile Include="Tool\ToolTemplateGroupFile.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionTranslator.g3" /> <Compile Include="Codegen\ACyclicDFACodeGenerator.cs" /> <Compile Include="Tool\Attribute.cs" /> <Compile Include="Tool\AttributeScope.cs" /> <Compile Include="Tool\CompositeGrammar.cs" /> <Compile Include="Tool\CompositeGrammarTree.cs" /> <Compile Include="Tool\GrammarSanity.cs" /> <Compile Include="Tool\NameSpaceChecker.cs" /> <Compile Include="Tool\NFAFactory.cs" /> <Compile Include="Grammars\ActionTranslatorHelper.cs"> <DependentUpon>ActionTranslator.g3</DependentUpon> </Compile> <Antlr3 Include="Grammars\CodeGenTreeWalker.g3" /> <Compile Include="Grammars\CodeGenTreeWalkerHelper.cs"> <DependentUpon>CodeGenTreeWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ActionAnalysisLexer.g3" /> <Compile Include="Grammars\ActionAnalysisLexerHelper.cs"> <DependentUpon>ActionAnalysisLexer.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLR.g3" /> <Compile Include="Grammars\ANTLRParserHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> <Compile Include="Grammars\ANTLRLexerHelper.cs"> <DependentUpon>ANTLR.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\ANTLRTreePrinter.g3" /> <Compile Include="Grammars\ANTLRTreePrinterHelper.cs"> <DependentUpon>ANTLRTreePrinter.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\AssignTokenTypesWalker.g3" /> <Compile Include="Grammars\AssignTokenTypesWalkerHelper.cs"> <DependentUpon>AssignTokenTypesWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\DefineGrammarItemsWalker.g3" /> <Compile Include="Grammars\DefineGrammarItemsWalkerHelper.cs"> <DependentUpon>DefineGrammarItemsWalker.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <Antlr3 Include="Grammars\TreeToNFAConverter.g3" /> <Compile Include="Analysis\MachineProbe.cs" /> <Compile Include="Extensions\EnumerableExtensions.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="Extensions\FuncEqualityComparer.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Misc\Graph.cs" /> <Compile Include="Misc\IIntSet.cs" /> <Compile Include="Tool\AssignTokenTypesBehavior.cs" /> <Compile Include="Tool\BuildDependencyGenerator.cs" /> <Compile Include="Tool\DgmlGenerator.cs" /> <Compile Include="Tool\DOTGenerator.cs" /> <Compile Include="Tool\FASerializer.cs" /> <Compile Include="Tool\GrammarAnalysisAbortedMessage.cs" /> <Compile Include="Tool\GrammarDanglingStateMessage.cs" /> <Compile Include="Tool\GrammarInsufficientPredicatesMessage.cs" /> <Compile Include="Tool\GrammarNonDeterminismMessage.cs" /> <Compile Include="Tool\GrammarReport.cs" /> <Compile Include="Tool\GrammarReport2.cs" /> <Compile Include="Tool\GrammarSemanticsMessage.cs" /> <Compile Include="Tool\GrammarSpelunker.cs" /> <Compile Include="Tool\GrammarSyntaxMessage.cs" /> <Compile Include="Tool\GrammarType.cs" /> <Compile Include="Tool\GrammarUnreachableAltsMessage.cs" /> <Compile Include="Tool\IAntlrErrorListener.cs" /> <Compile Include="Tool\IGraphGenerator.cs" /> <Compile Include="Tool\Interpreter.cs" /> <Compile Include="Tool\LabelType.cs" /> <Compile Include="Tool\LeftRecursionCyclesMessage.cs" /> <Compile Include="Tool\NonRegularDecisionMessage.cs" /> <Compile Include="Tool\RecursionOverflowMessage.cs" /> <Compile Include="Tool\RuleLabelScope.cs" /> <Compile Include="Grammars\TreeToNFAConverterHelper.cs"> <DependentUpon>TreeToNFAConverter.g3</DependentUpon> </Compile> <Compile Include="Tool\RuleType.cs" /> <Compile Include="Tool\Strip.cs" /> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ActionScript.stg"> <Link>Codegen\Templates\ActionScript\ActionScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\AST.stg"> <Link>Codegen\Templates\ActionScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTParser.stg"> <Link>Codegen\Templates\ActionScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ActionScript\ASTTreeParser.stg"> <Link>Codegen\Templates\ActionScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\AST.stg"> <Link>Codegen\Templates\CSharp3\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTDbg.stg"> <Link>Codegen\Templates\CSharp3\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTParser.stg"> <Link>Codegen\Templates\CSharp3\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp3\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\CSharp3.stg"> <Link>Codegen\Templates\CSharp3\CSharp3.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\Dbg.stg"> <Link>Codegen\Templates\CSharp3\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp3\ST.stg"> <Link>Codegen\Templates\CSharp3\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\AST.stg"> <Link>Codegen\Templates\CSharp2\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTDbg.stg"> <Link>Codegen\Templates\CSharp2\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTParser.stg"> <Link>Codegen\Templates\CSharp2\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ASTTreeParser.stg"> <Link>Codegen\Templates\CSharp2\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\CSharp2.stg"> <Link>Codegen\Templates\CSharp2\CSharp2.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\Dbg.stg"> <Link>Codegen\Templates\CSharp2\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CSharp2\ST.stg"> <Link>Codegen\Templates\CSharp2\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\AST.stg"> <Link>Codegen\Templates\C\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTDbg.stg"> <Link>Codegen\Templates\C\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTParser.stg"> <Link>Codegen\Templates\C\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\ASTTreeParser.stg"> <Link>Codegen\Templates\C\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\C.stg"> <Link>Codegen\Templates\C\C.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\C\Dbg.stg"> <Link>Codegen\Templates\C\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\CPP\CPP.stg"> <Link>Codegen\Templates\CPP\CPP.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\AST.stg"> <Link>Codegen\Templates\Delphi\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTParser.stg"> <Link>Codegen\Templates\Delphi\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\ASTTreeParser.stg"> <Link>Codegen\Templates\Delphi\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Delphi\Delphi.stg"> <Link>Codegen\Templates\Delphi\Delphi.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\AST.stg"> <Link>Codegen\Templates\JavaScript\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTParser.stg"> <Link>Codegen\Templates\JavaScript\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\ASTTreeParser.stg"> <Link>Codegen\Templates\JavaScript\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\JavaScript\JavaScript.stg"> <Link>Codegen\Templates\JavaScript\JavaScript.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\AST.stg"> <Link>Codegen\Templates\Java\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTDbg.stg"> <Link>Codegen\Templates\Java\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTParser.stg"> <Link>Codegen\Templates\Java\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ASTTreeParser.stg"> <Link>Codegen\Templates\Java\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Dbg.stg"> <Link>Codegen\Templates\Java\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\Java.stg"> <Link>Codegen\Templates\Java\Java.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Java\ST.stg"> <Link>Codegen\Templates\Java\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\AST.stg"> <Link>Codegen\Templates\ObjC\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTDbg.stg"> <Link>Codegen\Templates\ObjC\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTParser.stg"> <Link>Codegen\Templates\ObjC\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ASTTreeParser.stg"> <Link>Codegen\Templates\ObjC\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\Dbg.stg"> <Link>Codegen\Templates\ObjC\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\ObjC\ObjC.stg"> <Link>Codegen\Templates\ObjC\ObjC.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\ASTTreeParser.stg"> <Link>Codegen\Templates\Perl5\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Perl5\Perl5.stg"> <Link>Codegen\Templates\Perl5\Perl5.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\AST.stg"> <Link>Codegen\Templates\Python\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTDbg.stg"> <Link>Codegen\Templates\Python\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTParser.stg"> <Link>Codegen\Templates\Python\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ASTTreeParser.stg"> <Link>Codegen\Templates\Python\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Dbg.stg"> <Link>Codegen\Templates\Python\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\Python.stg"> <Link>Codegen\Templates\Python\Python.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Python\ST.stg"> <Link>Codegen\Templates\Python\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Ruby.stg"> <Link>Codegen\Templates\Ruby\Ruby.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\depend.stg"> <Link>Tool\Templates\depend.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\antlr.stg"> <Link>Tool\Templates\messages\formats\antlr.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\gnu.stg"> <Link>Tool\Templates\messages\formats\gnu.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\formats\vs2005.stg"> <Link>Tool\Templates\messages\formats\vs2005.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\messages\languages\en.stg"> <Link>Tool\Templates\messages\languages\en.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\tool\templates\dot\dot.stg"> <Link>Tool\Templates\dot\dot.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\AST.stg"> <Link>Codegen\Templates\Ruby\AST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTDbg.stg"> <Link>Codegen\Templates\Ruby\ASTDbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTParser.stg"> <Link>Codegen\Templates\Ruby\ASTParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ASTTreeParser.stg"> <Link>Codegen\Templates\Ruby\ASTTreeParser.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\Dbg.stg"> <Link>Codegen\Templates\Ruby\Dbg.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\Ruby\ST.stg"> <Link>Codegen\Templates\Ruby\ST.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <EmbeddedResource Include="..\Reference\antlr3\tool\src\main\resources\org\antlr\codegen\templates\LeftRecursiveRules.stg"> <Link>Codegen\Templates\LeftRecursiveRules.stg</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="app.config" /> <Antlr3 Include="Grammars\LeftRecursiveRuleWalker.g3" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\Antlr3.Runtime.Debug.csproj"> <Project>{5EE27A90-B023-42C9-AAF1-52B0424C5D0B}</Project> <Name>Antlr3.Runtime.Debug</Name> </ProjectReference> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate.Visualizer\Antlr4.StringTemplate.Visualizer.csproj"> <Project>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</Project> <Name>Antlr4.StringTemplate.Visualizer</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj index 4267197..783eeb6 100644 --- a/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj +++ b/Antlr4.StringTemplate.Visualizer/Antlr4.StringTemplate.Visualizer.csproj @@ -1,125 +1,127 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DC0A9616-0B69-4A3B-ADC7-62FCA9207B98}</ProjectGuid> <OutputType>library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate.Visualizer</RootNamespace> <AssemblyName>Antlr4.StringTemplate.Visualizer</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> <FileAlignment>512</FileAlignment> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Debug\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Release\Antlr4.StringTemplate.Visualizer.xml</DocumentationFile> </PropertyGroup> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> </ItemGroup> <ItemGroup> <Compile Include="AstNodeToStringConverter.cs" /> <Compile Include="AttributeViewModel.cs" /> <Compile Include="Extensions\FlowDocumentExtensions.cs" /> <Compile Include="Extensions\ListExtensions.cs" /> <Compile Include="Extensions\TemplateExtensions.cs" /> <Compile Include="Properties\AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Properties\Settings.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="TemplateCallHierarchyViewModel.cs" /> <Compile Include="TemplateFrameAttributeViewModel.cs" /> <Compile Include="TemplateVisualizer.cs" /> <Compile Include="TemplateVisualizerFrame.xaml.cs"> <DependentUpon>TemplateVisualizerFrame.xaml</DependentUpon> </Compile> <Compile Include="TemplateVisualizerViewModel.cs" /> <Compile Include="TemplateVisualizerWindow.xaml.cs"> <DependentUpon>TemplateVisualizerWindow.xaml</DependentUpon> </Compile> <Compile Include="TreeViewItemDisplay.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> <AppDesigner Include="Properties\" /> <None Include="Resources\Templates\AttributeRendererTemplates.stg" /> </ItemGroup> <ItemGroup> <Page Include="TemplateVisualizerFrame.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> <Page Include="TemplateVisualizerWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> <ProjectReference Include="..\Antlr4.StringTemplate\Antlr4.StringTemplate.csproj"> <Project>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</Project> <Name>Antlr4.StringTemplate</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj index 8fe7166..e8d69de 100644 --- a/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj +++ b/Antlr4.StringTemplate/Antlr4.StringTemplate.csproj @@ -1,157 +1,159 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{DE9B7DA2-35DD-46CC-B768-DAEE3C298660}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Antlr4.StringTemplate</RootNamespace> <AssemblyName>Antlr4.StringTemplate</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <TargetFrameworkProfile>Client</TargetFrameworkProfile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Debug\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Release\Antlr4.StringTemplate.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\TemplateCompiler.TemplateLexerNoNewlines.cs" /> <Compile Include="TemplateRawGroupDirectory.cs" /> <Compile Include="Debug\IndentEvent.cs" /> <Compile Include="Extensions\ExceptionExtensions.cs" /> <Compile Include="IAttributeRenderer.cs" /> <Compile Include="AutoIndentWriter.cs" /> <Compile Include="Debug\DebugEvents.cs" /> <Compile Include="Misc\AttributeNotFoundException.cs" /> <Compile Include="Misc\ObjectReferenceEqualityComparer`1.cs" /> <Compile Include="Misc\TextWriterErrorListener.cs" /> <Compile Include="Misc\DebugErrorListener.cs" /> <Compile Include="Misc\HttpUtility.cs" /> <Compile Include="RenderOption.cs" /> <Compile Include="TemplateFrame.cs" /> <Compile Include="Misc\Aggregate.cs" /> <Compile Include="Misc\AggregateModelAdaptor.cs" /> <Compile Include="TemplateGroupString.cs" /> <Compile Include="TemplateName.cs" /> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <Compile Include="DateRenderer.cs" /> <Compile Include="Compiler\Instruction.cs" /> <Compile Include="ITypeProxyFactory.cs" /> <Compile Include="Misc\TypeRegistry`1.cs" /> <Compile Include="Compiler\OperandType.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Compile Include="Compiler\Bytecode.cs" /> <Compile Include="Compiler\BytecodeDisassembler.cs" /> <Compile Include="Compiler\CompilationState.cs" /> <Compile Include="Compiler\CompiledTemplate.cs" /> <Compile Include="Compiler\TemplateCompiler.cs" /> <Compile Include="Compiler\FormalArgument.cs" /> <Compile Include="Compiler\TemplateException.cs" /> <Compile Include="Compiler\TemplateLexer.cs" /> <Compile Include="Compiler\StringTable.cs" /> <Compile Include="Debug\AddAttributeEvent.cs" /> <Compile Include="Debug\ConstructionEvent.cs" /> <None Include="Debug\DebugTemplate.cs" /> <Compile Include="Debug\EvalExprEvent.cs" /> <Compile Include="Debug\EvalTemplateEvent.cs" /> <Compile Include="Debug\InterpEvent.cs" /> <Compile Include="Interpreter.cs" /> <Compile Include="Misc\Coordinate.cs" /> <Compile Include="Misc\ErrorBuffer.cs" /> <Compile Include="Misc\ErrorManager.cs" /> <Compile Include="Misc\ErrorType.cs" /> <Compile Include="Misc\Interval.cs" /> <Compile Include="Misc\MapModelAdaptor.cs" /> <Compile Include="Misc\Utility.cs" /> <Compile Include="Misc\MultiMap.cs" /> <Compile Include="Misc\ObjectModelAdaptor.cs" /> <Compile Include="Misc\TemplateCompileTimeMessage.cs" /> <Compile Include="Misc\TemplateGroupCompiletimeMessage.cs" /> <Compile Include="Misc\TemplateLexerMessage.cs" /> <Compile Include="Misc\TemplateMessage.cs" /> <Compile Include="Misc\TemplateModelAdaptor.cs" /> <Compile Include="Misc\TemplateNoSuchPropertyException.cs" /> <Compile Include="Misc\TemplateRuntimeMessage.cs" /> <Compile Include="IModelAdaptor.cs" /> <Compile Include="NoIndentWriter.cs" /> <Compile Include="NumberRenderer.cs" /> <Compile Include="Template.cs" /> <Compile Include="ITemplateErrorListener.cs" /> <Compile Include="TemplateGroup.cs" /> <Compile Include="TemplateGroupDirectory.cs" /> <Compile Include="TemplateGroupFile.cs" /> <Compile Include="StringRenderer.cs" /> <Compile Include="ITemplateWriter.cs" /> </ItemGroup> <ItemGroup> <Antlr3 Include="Compiler\CodeGenerator.g3" /> <Compile Include="Compiler\CodeGenerator.g3.cs"> <DependentUpon>CodeGenerator.g3</DependentUpon> </Compile> <Antlr3 Include="Compiler\Group.g3" /> <Compile Include="Compiler\Group.g3.parser.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <Compile Include="Compiler\Group.g3.lexer.cs"> <DependentUpon>Group.g3</DependentUpon> </Compile> <AntlrTokens Include="Compiler\TemplateLexer.tokens" /> <Antlr3 Include="Compiler\TemplateParser.g3" /> <Compile Include="Compiler\TemplateParser.g3.cs"> <DependentUpon>TemplateParser.g3</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\Antlr3.Runtime.csproj"> <Project>{8FDC0A87-9005-4D5A-AB75-E55CEB575559}</Project> <Name>Antlr3.Runtime</Name> </ProjectReference> </ItemGroup> <ItemGroup /> <PropertyGroup> <SignAssembly>true</SignAssembly> </PropertyGroup> <PropertyGroup> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <!-- Folder containing AntlrBuildTask.dll --> <AntlrBuildTaskPath>$(ProjectDir)..\bin\Bootstrap</AntlrBuildTaskPath> <!-- Path to the ANTLR Tool itself. --> <AntlrToolPath>$(ProjectDir)..\bin\Bootstrap\Antlr3.exe</AntlrToolPath> </PropertyGroup> <Import Project="$(ProjectDir)..\bin\Bootstrap\Antlr3.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/Antlr3.props b/AntlrBuildTask/Antlr3.props new file mode 100644 index 0000000..b18aaa8 --- /dev/null +++ b/AntlrBuildTask/Antlr3.props @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" ?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <!-- Folder containing AntlrBuildTask.dll --> + <AntlrBuildTaskPath>.</AntlrBuildTaskPath> + <!-- Path to the ANTLR tool itself --> + <AntlrToolPath>..\tools\Antlr3.exe</AntlrToolPath> + </PropertyGroup> +</Project> diff --git a/AntlrBuildTask/AntlrBuildTask.csproj b/AntlrBuildTask/AntlrBuildTask.csproj index abf67ec..2e171e8 100644 --- a/AntlrBuildTask/AntlrBuildTask.csproj +++ b/AntlrBuildTask/AntlrBuildTask.csproj @@ -1,72 +1,77 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{60F8B554-5C53-4DE2-B868-A0BFEF4EF80E}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>AntlrBuildTask</RootNamespace> <AssemblyName>AntlrBuildTask</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\..\..\keys\antlr\Key.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>..\bin\Debug\AntlrBuildTask.xml</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> + <DocumentationFile>..\bin\Release\AntlrBuildTask.xml</DocumentationFile> </PropertyGroup> <ItemGroup> <Reference Include="Microsoft.Build.Engine" /> <Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Utilities.v3.5"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> </ItemGroup> <ItemGroup> <Compile Include="AntlrClassGenerationTask.cs" /> <Compile Include="AntlrClassGenerationTaskInternal.cs" /> <Compile Include="BuildMessage.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <Content Include="Antlr3.targets"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> <SubType>Designer</SubType> </Content> </ItemGroup> <ItemGroup> <None Include="..\..\..\..\keys\antlr\Key.snk"> <Link>Key.snk</Link> </None> <None Include="Antlr3.Java.targets" /> + <None Include="Antlr3.props"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> \ No newline at end of file diff --git a/AntlrBuildTask/AntlrClassGenerationTask.cs b/AntlrBuildTask/AntlrClassGenerationTask.cs index eee9f30..88d1398 100644 --- a/AntlrBuildTask/AntlrClassGenerationTask.cs +++ b/AntlrBuildTask/AntlrClassGenerationTask.cs @@ -1,316 +1,322 @@ /* * [The "BSD licence"] * Copyright (c) 2009 Sam Harwell * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace Antlr3.Build.Tasks { using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Security; using System.Security.Policy; using System.Threading; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Directory = System.IO.Directory; using File = System.IO.File; using FileAttributes = System.IO.FileAttributes; using Path = System.IO.Path; public class AntlrClassGenerationTask : Task { private static AppDomain _sharedAppDomain; private const string DefaultGeneratedSourceExtension = "g"; private List<ITaskItem> _generatedCodeFiles = new List<ITaskItem>(); public AntlrClassGenerationTask() { this.GeneratedSourceExtension = DefaultGeneratedSourceExtension; } [Required] public string AntlrToolPath { get; set; } [Required] public string OutputPath { get; set; } public string TargetLanguage { get; set; } public string BuildTaskPath { get; set; } public ITaskItem[] SourceCodeFiles { get; set; } public ITaskItem[] TokensFiles { get; set; } public ITaskItem[] AbstractGrammarFiles { get; set; } public string GeneratedSourceExtension { get; set; } public string RootNamespace { get; set; } public string[] LanguageSourceExtensions { get; set; } public bool DebugGrammar { get; set; } public bool ProfileGrammar { get; set; } [Output] public ITaskItem[] GeneratedCodeFiles { get { return this._generatedCodeFiles.ToArray(); } set { this._generatedCodeFiles = new List<ITaskItem>(value); } } public AppDomain GetAntlrTaskAppDomain() { if (_sharedAppDomain != null) return _sharedAppDomain; AppDomainSetup info = new AppDomainSetup { ApplicationBase = BuildTaskPath, LoaderOptimization = LoaderOptimization.MultiDomainHost, ShadowCopyFiles = "true" }; string friendlyName = "AntlrClassGenerationDomain_" + Guid.NewGuid(); _sharedAppDomain = AppDomain.CreateDomain(friendlyName, AppDomain.CurrentDomain.Evidence, info, new NamedPermissionSet("FullTrust"), new StrongName[0]); return _sharedAppDomain; } public override bool Execute() { AppDomain domain = null; bool success; + if (!Path.IsPathRooted(AntlrToolPath)) + AntlrToolPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), AntlrToolPath); + + if (!Path.IsPathRooted(BuildTaskPath)) + BuildTaskPath = Path.Combine(Path.GetDirectoryName(BuildEngine.ProjectFileOfTaskNode), BuildTaskPath); + try { domain = GetAntlrTaskAppDomain(); AntlrClassGenerationTaskInternal wrapper = CreateBuildTaskWrapper(domain); success = wrapper.Execute(); if (success) { _generatedCodeFiles.AddRange(wrapper.GeneratedCodeFiles.Select(file => (ITaskItem)new TaskItem(file))); } foreach (BuildMessage message in wrapper.BuildMessages) { ProcessBuildMessage(message); } } catch (Exception exception) { if (IsFatalException(exception)) throw; ProcessExceptionAsBuildMessage(exception); success = false; } finally { if (domain != null && domain != _sharedAppDomain) AppDomain.Unload(domain); } return success; } private void ProcessExceptionAsBuildMessage(Exception exception) { ProcessBuildMessage(new BuildMessage(exception.Message)); } private void ProcessBuildMessage(BuildMessage message) { string logMessage; string errorCode; errorCode = Log.ExtractMessageCode(message.Message, out logMessage); if (string.IsNullOrEmpty(errorCode)) { errorCode = "AC1000"; logMessage = "Unknown build error: " + message.Message; } string subcategory = null; string helpKeyword = null; switch (message.Severity) { case TraceLevel.Error: this.Log.LogError(subcategory, errorCode, helpKeyword, message.FileName, message.LineNumber, message.ColumnNumber, 0, 0, logMessage); break; case TraceLevel.Warning: this.Log.LogWarning(subcategory, errorCode, helpKeyword, message.FileName, message.LineNumber, message.ColumnNumber, 0, 0, logMessage); break; case TraceLevel.Info: this.Log.LogMessage(MessageImportance.Normal, logMessage); break; case TraceLevel.Verbose: this.Log.LogMessage(MessageImportance.Low, logMessage); break; } } private AntlrClassGenerationTaskInternal CreateBuildTaskWrapper(AppDomain domain) { AntlrClassGenerationTaskInternal wrapper = (AntlrClassGenerationTaskInternal)domain.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(AntlrClassGenerationTaskInternal).FullName); IList<string> sourceCodeFiles = null; if (this.SourceCodeFiles != null) { sourceCodeFiles = new List<string>(SourceCodeFiles.Length); foreach (ITaskItem taskItem in SourceCodeFiles) sourceCodeFiles.Add(taskItem.ItemSpec); } if (this.TokensFiles != null && this.TokensFiles.Length > 0) { Directory.CreateDirectory(OutputPath); HashSet<string> copied = new HashSet<string>(StringComparer.OrdinalIgnoreCase); foreach (ITaskItem taskItem in TokensFiles) { string fileName = taskItem.ItemSpec; if (!File.Exists(fileName)) { Log.LogError("The tokens file '{0}' does not exist.", fileName); continue; } string vocabName = Path.GetFileNameWithoutExtension(fileName); if (!copied.Add(vocabName)) { Log.LogWarning("The tokens file '{0}' conflicts with another tokens file in the same project.", fileName); continue; } string target = Path.Combine(OutputPath, Path.GetFileName(fileName)); if (!Path.GetExtension(target).Equals(".tokens", StringComparison.OrdinalIgnoreCase)) { Log.LogError("The destination for the tokens file '{0}' did not have the correct extension '.tokens'.", target); continue; } File.Copy(fileName, target, true); File.SetAttributes(target, File.GetAttributes(target) & ~FileAttributes.ReadOnly); } } wrapper.AntlrToolPath = AntlrToolPath; wrapper.SourceCodeFiles = sourceCodeFiles; wrapper.TargetLanguage = TargetLanguage; wrapper.OutputPath = OutputPath; wrapper.RootNamespace = RootNamespace; wrapper.GeneratedSourceExtension = GeneratedSourceExtension; wrapper.LanguageSourceExtensions = LanguageSourceExtensions; wrapper.DebugGrammar = DebugGrammar; wrapper.ProfileGrammar = ProfileGrammar; return wrapper; } private static bool IsFatalException(Exception exception) { while (exception != null) { if ((exception is OutOfMemoryException) || (exception is InsufficientMemoryException) || (exception is ThreadAbortException)) { return true; } if (!(exception is TypeInitializationException) && !(exception is TargetInvocationException)) { break; } exception = exception.InnerException; } return false; } } } diff --git a/Reference/antlr3 b/Reference/antlr3 index 16284da..c034866 160000 --- a/Reference/antlr3 +++ b/Reference/antlr3 @@ -1 +1 @@ -Subproject commit 16284da4436bcb57f339db01e81c4bea94663fff +Subproject commit c034866d7f26832c497733edcfe9818adb5dd9d3 diff --git a/bin/prep/Antlr3.Runtime.Debug.nuspec b/bin/prep/Antlr3.Runtime.Debug.nuspec new file mode 100644 index 0000000..40d9764 --- /dev/null +++ b/bin/prep/Antlr3.Runtime.Debug.nuspec @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>Antlr3.Runtime.Debug</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$version$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>antlr antlr3 parsing</tags> + <title>ANTLR 3 Runtime</title> + <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> + <dependencies> + <dependency id="Antlr3.Runtime" version="$version$" /> + </dependencies> + </metadata> + <files> + <!-- Runtime Libraries --> + + <file src="Tool\Antlr3.Runtime.Debug.dll" target="lib\net20"/> + <file src="Tool\Antlr3.Runtime.Debug.pdb" target="lib\net20"/> + <file src="Tool\Antlr3.Runtime.Debug.xml" target="lib\net20"/> + + <!-- Source Code --> + + <file exclude="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\obj\**\*.cs" src="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime.Debug\**\*.cs" target="src"/> + </files> +</package> diff --git a/bin/prep/Antlr3.Runtime.nuspec b/bin/prep/Antlr3.Runtime.nuspec new file mode 100644 index 0000000..8a26b16 --- /dev/null +++ b/bin/prep/Antlr3.Runtime.nuspec @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>Antlr3.Runtime</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The runtime library for parsers generated by the C# target of ANTLR 3. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$version$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>antlr antlr3 parsing</tags> + <title>ANTLR 3 Runtime</title> + <summary>The runtime library for parsers generated by the C# target of ANTLR 3.</summary> + </metadata> + <files> + <!-- Runtime Libraries --> + + <file src="Runtime\Antlr3.Runtime.dll" target="lib\net20"/> + <file src="Runtime\Antlr3.Runtime.pdb" target="lib\net20"/> + <file src="Runtime\Antlr3.Runtime.xml" target="lib\net20"/> + + <!-- Source Code --> + + <file exclude="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\obj\**\*.cs" src="..\..\Reference\antlr3\runtime\CSharp3\Sources\Antlr3.Runtime\**\*.cs" target="src"/> + </files> +</package> diff --git a/bin/prep/Antlr3.nuspec b/bin/prep/Antlr3.nuspec new file mode 100644 index 0000000..195d813 --- /dev/null +++ b/bin/prep/Antlr3.nuspec @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata minClientVersion="2.5"> + <id>Antlr3</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The C# target of the ANTLR 3 parser generator. This package supports projects targeting .NET 2.0 or newer, and built using Visual Studio 2008 or newer.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlr4cs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlr4cs/master/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlr4cs/releases/v$version$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>antlr antlr3 parsing</tags> + <title>ANTLR 3</title> + <summary>The C# target of the ANTLR 3 parser generator.</summary> + <dependencies> + <dependency id="Antlr3.Runtime" version="$version$" /> + <dependency id="Antlr3.Runtime.Debug" version="$version$" /> + <dependency id="StringTemplate3" version="$version$" /> + </dependencies> + </metadata> + <files> + <!-- Tools --> + + <file src="Bootstrap\**\*.*" target="tools"/> + + <!-- Build Configuration --> + + <file src="Tool\Antlr3.props" target="build"/> + <file src="Tool\Antlr3.targets" target="build"/> + <file src="Tool\AntlrBuildTask.dll" target="build"/> + </files> +</package> diff --git a/bin/prep/NuGet.exe b/bin/prep/NuGet.exe new file mode 100644 index 0000000..be85ec2 Binary files /dev/null and b/bin/prep/NuGet.exe differ diff --git a/bin/prep/StringTemplate3.nuspec b/bin/prep/StringTemplate3.nuspec new file mode 100644 index 0000000..488c5e3 --- /dev/null +++ b/bin/prep/StringTemplate3.nuspec @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>StringTemplate3</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The C# port of StringTemplate 3.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$ANTLRVersion$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>stringtemplate st3 stringtemplate3 template</tags> + <title>StringTemplate 3</title> + <summary>The C# port of StringTemplate 3.</summary> + <dependencies> + <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + </dependencies> + </metadata> + <files> + <!-- Runtime Libraries --> + + <file src="ST3\Antlr3.StringTemplate.dll" target="lib\net35-client"/> + <file src="ST3\Antlr3.StringTemplate.pdb" target="lib\net35-client"/> + <file src="ST3\Antlr3.StringTemplate.xml" target="lib\net35-client"/> + + <!-- Source Code --> + + <file exclude="..\..\Antlr3.StringTemplate\obj\**\*.cs" src="..\..\Antlr3.StringTemplate\**\*.cs" target="src"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> + <file src="..\..\Antlr3.StringTemplate\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> + </files> +</package> diff --git a/bin/prep/StringTemplate4.Visualizer.nuspec b/bin/prep/StringTemplate4.Visualizer.nuspec new file mode 100644 index 0000000..68984d6 --- /dev/null +++ b/bin/prep/StringTemplate4.Visualizer.nuspec @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>StringTemplate4.Visualizer</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>Provides the visualizer runtime for StringTemplate 4.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$ANTLRVersion$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>stringtemplate st4 stringtemplate4 stviz template</tags> + <title>StringTemplate 4 Visualizer</title> + <summary>Provides the visualizer runtime for StringTemplate 4.</summary> + <dependencies> + <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + <dependency id="StringTemplate4" version="$version$" /> + </dependencies> + </metadata> + <files> + <!-- Runtime Libraries --> + + <file src="ST4\Antlr4.StringTemplate.Visualizer.dll" target="lib\net35-client"/> + <file src="ST4\Antlr4.StringTemplate.Visualizer.pdb" target="lib\net35-client"/> + <file src="ST4\Antlr4.StringTemplate.Visualizer.xml" target="lib\net35-client"/> + + <!-- Source Code --> + + <file exclude="..\..\Antlr4.StringTemplate.Visualizer\obj\**\*.cs" src="..\..\Antlr4.StringTemplate.Visualizer\**\*.cs" target="src"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\**\*.xaml" target="src"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> + <file src="..\..\Antlr4.StringTemplate.Visualizer\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> + </files> +</package> diff --git a/bin/prep/StringTemplate4.nuspec b/bin/prep/StringTemplate4.nuspec new file mode 100644 index 0000000..b2924b4 --- /dev/null +++ b/bin/prep/StringTemplate4.nuspec @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>StringTemplate4</id> + <version>0.0.0</version> + <authors>Sam Harwell, Terence Parr</authors> + <owners>Sam Harwell</owners> + <description>The C# port of StringTemplate 4.</description> + <language>en-us</language> + <projectUrl>https://github.com/sharwell/antlrcs</projectUrl> + <licenseUrl>https://raw.github.com/sharwell/antlrcs/master/bin/prep/LICENSE.txt</licenseUrl> + <iconUrl>https://raw.github.com/antlr/website-antlr4/master/images/icons/antlr.png</iconUrl> + <copyright>Copyright © Sam Harwell 2013</copyright> + <releaseNotes>https://github.com/sharwell/antlrcs/releases/v$ANTLRVersion$</releaseNotes> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <tags>stringtemplate st4 stringtemplate4 template</tags> + <title>StringTemplate 4</title> + <summary>The C# port of StringTemplate 4.</summary> + <dependencies> + <dependency id="Antlr3.Runtime" version="$ANTLRVersion$" /> + </dependencies> + </metadata> + <files> + <!-- Runtime Libraries --> + + <file src="ST4\Antlr4.StringTemplate.dll" target="lib\net35-client"/> + <file src="ST4\Antlr4.StringTemplate.pdb" target="lib\net35-client"/> + <file src="ST4\Antlr4.StringTemplate.xml" target="lib\net35-client"/> + + <!-- Source Code --> + + <file exclude="..\..\Antlr4.StringTemplate\obj\**\*.cs" src="..\..\Antlr4.StringTemplate\**\*.cs" target="src"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\**\*.cs" target="src\obj\$Configuration$"/> + <file src="..\..\Antlr4.StringTemplate\obj\$Configuration$\**\*.tokens" target="src\obj\$Configuration$"/> + </files> +</package> diff --git a/bin/prep/prepare.ps1 b/bin/prep/prepare.ps1 index fe47185..4f06fa2 100644 --- a/bin/prep/prepare.ps1 +++ b/bin/prep/prepare.ps1 @@ -1,180 +1,207 @@ # build the solution $SolutionPath = "..\..\Antlr3.sln" # make sure the script was run from the expected path if (!(Test-Path $SolutionPath)) { echo "The script was run from an invalid working directory." exit 1 } $BuildConfig = "Release" # clean up from any previous builds $CleanItems = "Runtime", "Tool", "Bootstrap", "ST3", "ST4" $CleanItems | ForEach-Object { if (Test-Path $_) { Remove-Item -Force -Recurse $_ } } # build the project $msbuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" #if (!(Test-Path $msbuild)) { # [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') # $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest") #} &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # back up the bootstrap folder $ArchivePath = ".\Backup\Bootstrap-" + [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName()) + ".7z" .\7z.exe a -r $ArchivePath "..\Bootstrap\*" # copy the new bootstrap files -$BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "AntlrBuildTask.dll" +$BootstrapBinaries = "Antlr3.exe", "Antlr3.exe.config", "Antlr3.Runtime.dll", "Antlr3.Runtime.Debug.dll", "Antlr4.StringTemplate.dll", "Antlr4.StringTemplate.Visualizer.dll", "Antlr3.targets", "Antlr3.props", "AntlrBuildTask.dll" $BootstrapBinaries | ForEach-Object { copy -force "..\$BuildConfig\$_" "..\Bootstrap" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } } if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } if (-not (Test-Path "..\Bootstrap\Codegen\Templates\CSharp2")) { mkdir "..\Bootstrap\Codegen\Templates\CSharp2" } copy -force "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" "..\Bootstrap\Codegen\Templates" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Codegen\Templates\CSharp2\*" "..\Bootstrap\Codegen\Templates\CSharp2" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Codegen\Templates\CSharp3\*" "..\Bootstrap\Codegen\Templates\CSharp3" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -force "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" "..\Bootstrap\Targets" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } copy -r -force "..\$BuildConfig\Tool\*" "..\Bootstrap\Tool" if ($LASTEXITCODE -ne 0) { echo "Bootstrap update failed, Aborting!" exit $p.ExitCode } Remove-Item -force "..\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # build the project again with the new bootstrap files &$msbuild /nologo /m /nr:false /t:rebuild /p:Configuration=$BuildConfig $SolutionPath if ($LASTEXITCODE -ne 0) { echo "Build Failed, Aborting!" exit $p.ExitCode } # copy files from the build mkdir Runtime mkdir Tool mkdir Bootstrap mkdir ST3 mkdir ST4 copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Runtime" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Runtime" +copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Runtime" copy "LICENSE.txt" ".\Runtime" copy "..\$BuildConfig\Antlr3.exe" ".\Tool" copy "..\$BuildConfig\Antlr3.exe.config" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.Debug.dll" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\Tool" +copy "..\$BuildConfig\Antlr3.props" ".\Tool" copy "..\$BuildConfig\Antlr3.targets" ".\Tool" copy "..\$BuildConfig\AntlrBuildTask.dll" ".\Tool" copy "LICENSE.txt" ".\Tool" copy ".\Tool\*" ".\Bootstrap" # copy ST4 binaries and all symbol files to the full Tool folder copy "..\$BuildConfig\Antlr3.pdb" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\Tool" copy "..\$BuildConfig\Antlr3.Runtime.Debug.pdb" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\Tool" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\Tool" copy "..\$BuildConfig\AntlrBuildTask.pdb" ".\Tool" +copy "..\$BuildConfig\Antlr3.xml" ".\Tool" +copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\Tool" +copy "..\$BuildConfig\Antlr3.Runtime.Debug.xml" ".\Tool" +copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\Tool" +copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\Tool" +copy "..\$BuildConfig\AntlrBuildTask.xml" ".\Tool" mkdir "Tool\Codegen" mkdir "Tool\Targets" mkdir "Tool\Tool" copy -r "..\$BuildConfig\Codegen\*" ".\Tool\Codegen" copy -r "..\$BuildConfig\Targets\*.dll" ".\Tool\Targets" copy -r "..\$BuildConfig\Targets\*.pdb" ".\Tool\Targets" +copy -r "..\$BuildConfig\Targets\*.xml" ".\Tool\Targets" copy -r "..\$BuildConfig\Tool\*" ".\Tool\Tool" mkdir "Bootstrap\Codegen\Templates\CSharp2" mkdir "Bootstrap\Codegen\Templates\CSharp3" mkdir "Bootstrap\Tool" mkdir "Bootstrap\Targets" copy "..\$BuildConfig\Codegen\Templates\LeftRecursiveRules.stg" ".\Bootstrap\Codegen\Templates" copy "..\$BuildConfig\Codegen\Templates\CSharp2\*" ".\Bootstrap\Codegen\Templates\CSharp2" copy "..\$BuildConfig\Codegen\Templates\CSharp3\*" ".\Bootstrap\Codegen\Templates\CSharp3" copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp2.dll" ".\Bootstrap\Targets" copy "..\$BuildConfig\Targets\Antlr3.Targets.CSharp3.dll" ".\Bootstrap\Targets" copy -r "..\$BuildConfig\Tool\*" ".\Bootstrap\Tool" Remove-Item ".\Bootstrap\Tool\Templates\messages\formats\gnu.stg" # ST3 dist copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.dll" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.pdb" ".\ST3" copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.pdb" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.StringTemplate.xml" ".\ST3" +copy "..\..\Antlr3.StringTemplate\bin\$BuildConfig\Antlr3.Runtime.xml" ".\ST3" copy "LICENSE.txt" ".\ST3" # ST4 dist copy "..\$BuildConfig\Antlr3.Runtime.dll" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.dll" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.dll" ".\ST4" copy "..\$BuildConfig\Antlr3.Runtime.pdb" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.pdb" ".\ST4" copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.pdb" ".\ST4" +copy "..\$BuildConfig\Antlr3.Runtime.xml" ".\ST4" +copy "..\$BuildConfig\Antlr4.StringTemplate.xml" ".\ST4" +copy "..\$BuildConfig\Antlr4.StringTemplate.Visualizer.xml" ".\ST4" copy "LICENSE.txt" ".\ST4" # compress the distributable packages -$AntlrVersion = "special-3.5.0.2" -$STVersion = "special-4.0.7.1" +$AntlrVersion = "3.5.0.3-alpha001" +$STVersion = "4.0.7.2-alpha001" $ArchivePath = ".\dist\antlr-dotnet-csharpbootstrap-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Bootstrap\*" $ArchivePath = ".\dist\antlr-dotnet-csharpruntime-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Runtime\*" $ArchivePath = ".\dist\antlr-dotnet-tool-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\Tool\*" $ArchivePath = ".\dist\antlr-dotnet-st3-" + $AntlrVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST3\*" $ArchivePath = ".\dist\antlr-dotnet-st4-" + $STVersion + ".7z" .\7z.exe a -r -mx9 $ArchivePath ".\ST4\*" + +# Build the NuGet packages + +if (-not (Test-Path nuget)) { + mkdir "nuget" +} + +.\NuGet.exe pack .\Antlr3.Runtime.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\Antlr3.Runtime.Debug.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\Antlr3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\StringTemplate3.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $AntlrVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\StringTemplate4.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols +.\NuGet.exe pack .\StringTemplate4.Visualizer.nuspec -OutputDirectory nuget -Prop Configuration=Release -Version $STVersion -Prop ANTLRVersion=$AntlrVersion -Prop STVersion=$STVersion -Symbols