diff --git a/ShowBuildMenu.bat b/ShowBuildMenu.bat index 8f5faa1007f..72a5861bac0 100644 --- a/ShowBuildMenu.bat +++ b/ShowBuildMenu.bat @@ -22,9 +22,6 @@ echo E. Build NHibernate (Debug) echo F. Build NHibernate (Release) echo G. Build Release Package (Also runs tests and creates documentation) echo. -echo --- GRAMMAR --- -echo H. Grammar operations (related to Hql.g and HqlSqlWalker.g) -echo. echo --- TeamCity (CI) build options echo I. TeamCity build menu echo. @@ -32,10 +29,9 @@ echo --- Exit --- echo X. Make the beautiful build menu go away. echo. -%BUILDTOOL% prompt ABCDEFGHIX -if errorlevel 9 goto end -if errorlevel 8 goto teamcity-menu -if errorlevel 7 goto grammar-menu +%BUILDTOOL% prompt ABCDEFGIX +if errorlevel 8 goto end +if errorlevel 7 goto teamcity-menu if errorlevel 6 goto build-release-package if errorlevel 5 goto build-release if errorlevel 4 goto build-debug @@ -194,77 +190,6 @@ echo including NuGet packages and tools to push them. echo. goto main-menu -:grammar-menu -echo. -echo --- GRAMMAR --- -echo A. Regenerate all grammars. -echo Hql.g to HqlLexer.cs -echo Hql.g to HqlParser.cs -echo HqlSqlWalker.g to HqlSqlWalker.cs -echo SqlGenerator.g to SqlGenerator.cs -echo B. Regenerate all grammars, with Hql.g in debug mode. -echo C. Regenerate all grammars, with HqlSqlWalker.g in debug mode. -echo D. Regenerate all grammars, with SqlGenerator.g in debug mode. -echo E. Quick instructions on using debug mode. -echo. -echo X. Exit to main menu. -echo. - -%BUILDTOOL% prompt ABCDEX -if errorlevel 5 goto main-menu -if errorlevel 4 goto antlr-debug -if errorlevel 3 goto antlr-sqlgenerator-debug -if errorlevel 2 goto antlr-hqlsqlwalker-debug -if errorlevel 1 goto antlr-hql-debug -if errorlevel 0 goto antlr-all - -:antlr-all -echo *** Regenerating from Hql.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHql.bat -echo *** Regenerating from HqlSqlWalker.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHqlSqlWalker.bat -echo *** Regenerating from SqlGenerator.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrSqlGenerator.bat -goto main-menu - -:antlr-hql-debug -echo *** Regenerating from Hql.g (Debug Enabled) -call src\NHibernate\Hql\Ast\ANTLR\AntlrHqlDebug.bat -echo *** Regenerating from HqlSqlWalker.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHqlSqlWalker.bat -echo *** Regenerating from SqlGenerator.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrSqlGenerator.bat -goto main-menu - -:antlr-hqlsqlwalker-debug -echo *** Regenerating from Hql.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHql.bat -echo *** Regenerating from HqlSqlWalker.g (Debug Enabled) -call src\NHibernate\Hql\Ast\ANTLR\AntlrHqlSqlWalkerDebug.bat -echo *** Regenerating from SqlGenerator.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrSqlGenerator.bat -goto main-menu - -:antlr-sqlgenerator-debug -echo *** Regenerating from Hql.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHql.bat -echo *** Regenerating from HqlSqlWalker.g -call src\NHibernate\Hql\Ast\ANTLR\AntlrHqlSqlWalker.bat -echo *** Regenerating from SqlGenerator.g (Debug Enabled) -call src\NHibernate\Hql\Ast\ANTLR\AntlrSqlGeneratorDebug.bat -goto main-menu - -:antlr-debug -echo To use the debug grammar: -echo 1. Create a unit test that runs the hql parser on the input you're interested in. -echo The one you want to debug must be the first grammar parsed. -echo 2. Run the unit test. It will appear to stall. -echo 3. Download and run AntlrWorks (java -jar AntlrWorks.jar). -echo 4. Open the grammar you intend to debug in AntlrWorks. -echo 5. Choose "Debug Remote" and accept the default port. -echo 6. You should now be connected and able to step through your grammar. -goto main-menu - :teamcity-menu echo. echo --- TeamCity (CI) build options diff --git a/Tools/Antlr/Antlr3.Runtime.Debug.dll b/Tools/Antlr/Antlr3.Runtime.Debug.dll deleted file mode 100644 index ed0b1059752..00000000000 Binary files a/Tools/Antlr/Antlr3.Runtime.Debug.dll and /dev/null differ diff --git a/Tools/Antlr/Antlr3.Runtime.dll b/Tools/Antlr/Antlr3.Runtime.dll deleted file mode 100644 index b963933d5f7..00000000000 Binary files a/Tools/Antlr/Antlr3.Runtime.dll and /dev/null differ diff --git a/Tools/Antlr/Antlr3.exe b/Tools/Antlr/Antlr3.exe deleted file mode 100644 index e360d807943..00000000000 Binary files a/Tools/Antlr/Antlr3.exe and /dev/null differ diff --git a/Tools/Antlr/Antlr3.exe.config b/Tools/Antlr/Antlr3.exe.config deleted file mode 100644 index 450518ad32d..00000000000 --- a/Tools/Antlr/Antlr3.exe.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Tools/Antlr/Antlr3.targets b/Tools/Antlr/Antlr3.targets deleted file mode 100644 index c5f5c70da10..00000000000 --- a/Tools/Antlr/Antlr3.targets +++ /dev/null @@ -1,169 +0,0 @@ - - - - MSBuild - 3.5.0.2 - eb42632606e9261f - AntlrBuildTask, Version=$(TaskVersion), Culture=neutral, PublicKeyToken=$(TaskKeyToken) - - - - - $(LoadTimeSensitiveTargets); - AntlrCompile; - - - $(LoadTimeSensitiveProperties); - AntlrCompileDependsOn; - - - - - $(MSBuildBinPath) - $(AntlrBuildTaskPath) - $(MSBuildBinPath)\Antlr3\Antlr3.exe - $(AntlrToolPath) - - - - $(MSBuildProjectFile).AntlrGeneratedCodeFileListAbsolute.txt - - - - - - - - AntlrCompile; - AntlrCompileAddFilesGenerated; - $(PrepareResourcesDependsOn) - - - - - - AntlrCompileReadGeneratedFileList - - - - - - - - - - - - MSBuild:Compile - - false - false - - - - - - - - - - - - - DesignTimeGrammarCompilation; - $(CoreCompileDependsOn) - - - - - - - - - - - - - - - - <_IntellisenseOnlyCompile>false - <_IntellisenseOnlyCompile Condition="'$(BuildingProject)' != 'true'">true - - - - - - - - - - - - - - - - - - - - - - - <_GeneratedCodeFiles Include="@(AntlrGeneratedCodeFiles)" /> - - - - diff --git a/Tools/Antlr/Antlr4.StringTemplate.Visualizer.dll b/Tools/Antlr/Antlr4.StringTemplate.Visualizer.dll deleted file mode 100644 index 42d4df5a440..00000000000 Binary files a/Tools/Antlr/Antlr4.StringTemplate.Visualizer.dll and /dev/null differ diff --git a/Tools/Antlr/Antlr4.StringTemplate.dll b/Tools/Antlr/Antlr4.StringTemplate.dll deleted file mode 100644 index 88b210ceecc..00000000000 Binary files a/Tools/Antlr/Antlr4.StringTemplate.dll and /dev/null differ diff --git a/Tools/Antlr/AntlrBuildTask.dll b/Tools/Antlr/AntlrBuildTask.dll deleted file mode 100644 index 4341c7465e2..00000000000 Binary files a/Tools/Antlr/AntlrBuildTask.dll and /dev/null differ diff --git a/Tools/Antlr/Codegen/Templates/CSharp2/AST.stg b/Tools/Antlr/Codegen/Templates/CSharp2/AST.stg deleted file mode 100644 index a94ed7c4b22..00000000000 --- a/Tools/Antlr/Codegen/Templates/CSharp2/AST.stg +++ /dev/null @@ -1,430 +0,0 @@ -/* - * [The "BSD license"] - * Copyright (c) 2007-2008 Johannes Luber - * Copyright (c) 2005-2007 Kunle Odutola - * Copyright (c) 2011 Sam Harwell - * Copyright (c) 2011 Terence Parr - * 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. - */ - -@outputFile.imports() ::= << -<@super.imports()> - - - -using Antlr.Runtime.Tree; -using RewriteRuleITokenStream = Antlr.Runtime.Tree.RewriteRuleTokenStream; - ->> - -@genericParser.members() ::= << -<@super.members()> - ->> - -parserCtorBody() ::= <% -<\n> -TreeAdaptor = - - - - new () - -; -%> - -/** Add an adaptor property that knows how to build trees */ -parserMembers() ::= << -private adaptor; - -public TreeAdaptor -{ - get - { - return adaptor; - } - - set - { - this.adaptor = value; - .TreeAdaptor = this.adaptor;}> - } -} ->> - -treeAdaptorType() ::= << - ->> - -ruleReturnBaseType() ::= <% -AstTreeParserRuleReturnScope\<, > -%> - -/** Add a variable to track rule's return AST */ -ruleDeclarations() ::= << - - root_0 = default();<\n> ->> - -ruleLabelDefs() ::= << - -<[ruleDescriptor.tokenLabels,ruleDescriptor.wildcardTreeLabels,ruleDescriptor.wildcardTreeListLabels] - :{it| _tree = default();}; separator="\n"> - _tree = default();}; separator="\n"> -Stream stream_=new RewriteRuleStream(adaptor,"token ");}; separator="\n"> -=new RewriteRuleSubtreeStream(adaptor,"rule ");}; separator="\n"> ->> - -/** When doing auto AST construction, we must define some variables; - * These should be turned off if doing rewrites. This must be a "mode" - * as a rule could have both rewrite and AST within the same alternative - * block. - */ -@alt.declarations() ::= << - - - -root_0 = ()adaptor.Nil(); - - - ->> - -// T r a c k i n g R u l e E l e m e n t s - -/** ID and track it for use in a rewrite rule */ -tokenRefTrack(token,label,elementIndex,terminalOptions={}) ::= << - -if () stream_.Add(