Skip to content

Commit 72b89ce

Browse files
committed
Update to the latest version of ANTLR on NuGet
1 parent f23f935 commit 72b89ce

40 files changed

+6985
-6043
lines changed

RetailCoder.VBE/Refactorings/ReorderParameters/ReorderParametersRefactoring.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private void RewriteCall(VBAParser.ArgumentListContext argList, ICodeModule modu
147147
var args = argList.argument().Select((s, i) => new { Index = i, Text = s.GetText() }).ToList();
148148
for (var i = 0; i < _model.Parameters.Count; i++)
149149
{
150-
if (argList.argument().Count <= i)
150+
if (argList.argument().Length <= i)
151151
{
152152
break;
153153
}

RetailCoder.VBE/Rubberduck.csproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Antlr4.4.3.0\build\Antlr4.props" Condition="Exists('..\packages\Antlr4.4.3.0\build\Antlr4.props')" />
3+
<Import Project="..\packages\Antlr4.4.5.3\build\Antlr4.props" Condition="Exists('..\packages\Antlr4.4.5.3\build\Antlr4.props')" />
44
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
55
<PropertyGroup>
66
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,7 +12,8 @@
1212
<AssemblyName>Rubberduck</AssemblyName>
1313
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15-
<NuGetPackageImportStamp>480c0557</NuGetPackageImportStamp>
15+
<NuGetPackageImportStamp>
16+
</NuGetPackageImportStamp>
1617
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1718
<RestorePackages>true</RestorePackages>
1819
</PropertyGroup>
@@ -222,9 +223,9 @@
222223
<StartupObject />
223224
</PropertyGroup>
224225
<ItemGroup>
225-
<Reference Include="Antlr4.Runtime.net45">
226-
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
227-
<EmbedInteropTypes>False</EmbedInteropTypes>
226+
<Reference Include="Antlr4.Runtime, Version=4.5.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
227+
<HintPath>..\packages\Antlr4.Runtime.4.5.3\lib\net45\Antlr4.Runtime.dll</HintPath>
228+
<Private>True</Private>
228229
</Reference>
229230
<Reference Include="Castle.Core">
230231
<HintPath>..\packages\Castle.Core.3.2.0\lib\net45\Castle.Core.dll</HintPath>
@@ -1477,11 +1478,10 @@
14771478
<PropertyGroup>
14781479
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
14791480
</PropertyGroup>
1480-
<Error Condition="!Exists('..\packages\Antlr4.4.3.0\build\Antlr4.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.3.0\build\Antlr4.props'))" />
1481-
<Error Condition="!Exists('..\packages\Antlr4.4.3.0\build\Antlr4.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.3.0\build\Antlr4.targets'))" />
14821481
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
1482+
<Error Condition="!Exists('..\packages\Antlr4.4.5.3\build\Antlr4.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.5.3\build\Antlr4.props'))" />
1483+
<Error Condition="!Exists('..\packages\Antlr4.4.5.3\build\Antlr4.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Antlr4.4.5.3\build\Antlr4.targets'))" />
14831484
</Target>
1484-
<Import Project="..\packages\Antlr4.4.3.0\build\Antlr4.targets" Condition="Exists('..\packages\Antlr4.4.3.0\build\Antlr4.targets')" />
14851485
<PropertyGroup>
14861486
<PostBuildEvent>
14871487
</PostBuildEvent>
@@ -1491,6 +1491,7 @@
14911491
</PreBuildEvent>
14921492
</PropertyGroup>
14931493
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
1494+
<Import Project="..\packages\Antlr4.4.5.3\build\Antlr4.targets" Condition="Exists('..\packages\Antlr4.4.5.3\build\Antlr4.targets')" />
14941495
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
14951496
Other similar extension points exist, see Microsoft.Common.targets.
14961497
<Target Name="BeforeBuild">

RetailCoder.VBE/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Antlr4" version="4.3.0" targetFramework="net45" />
4-
<package id="Antlr4.Runtime" version="4.3.0" targetFramework="net45" />
3+
<package id="Antlr4" version="4.5.3" targetFramework="net45" developmentDependency="true" />
4+
<package id="Antlr4.Runtime" version="4.5.3" targetFramework="net45" />
55
<package id="AvalonEdit" version="5.0.3" targetFramework="net45" />
66
<package id="Castle.Core" version="3.2.0" targetFramework="net45" />
77
<package id="EasyHook" version="2.7.6270" targetFramework="net45" />

Rubberduck.Inspections/Rubberduck.Inspections.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34-
<Reference Include="Antlr4.Runtime.net45, Version=4.3.0.0, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
35-
<HintPath>..\packages\Antlr4.Runtime.4.3.0\lib\net45\Antlr4.Runtime.net45.dll</HintPath>
34+
<Reference Include="Antlr4.Runtime, Version=4.5.0.0, Culture=neutral, PublicKeyToken=09abb75b9ed49849, processorArchitecture=MSIL">
35+
<HintPath>..\packages\Antlr4.Runtime.4.5.3\lib\net45\Antlr4.Runtime.dll</HintPath>
3636
<Private>True</Private>
3737
</Reference>
3838
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
@@ -207,7 +207,9 @@
207207
</ProjectReference>
208208
</ItemGroup>
209209
<ItemGroup>
210-
<None Include="packages.config" />
210+
<None Include="packages.config">
211+
<SubType>Designer</SubType>
212+
</None>
211213
</ItemGroup>
212214
<ItemGroup />
213215
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Antlr4.Runtime" version="4.3.0" targetFramework="net452" />
3+
<package id="Antlr4.Runtime" version="4.5.3" targetFramework="net45" />
44
<package id="NLog" version="4.0.1" targetFramework="net452" />
55
</packages>

Rubberduck.Parsing/Grammar/VBALexer.cs

Lines changed: 100 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was generated by a tool.
4-
// ANTLR Version: 4.3
4+
// ANTLR Version: 4.5.3
55
//
66
// Changes to this file may cause incorrect behavior and will be lost if
77
// the code is regenerated.
88
// </auto-generated>
99
//------------------------------------------------------------------------------
1010

11-
// Generated from C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\Grammar\VBALexer.g4 by ANTLR 4.3
11+
// Generated from C:\Users\hosch\Documents\Visual Studio 2015\Projects\Rubberduck\Rubberduck.Parsing\Grammar\VBALexer.g4 by ANTLR 4.5.3
1212

1313
// Unreachable code detected
1414
#pragma warning disable 0162
1515
// The variable '...' is assigned but its value is never used
1616
#pragma warning disable 0219
1717
// Missing XML comment for publicly visible type or member '...'
1818
#pragma warning disable 1591
19+
// Ambiguous reference in cref attribute
20+
#pragma warning disable 419
1921

2022
namespace Rubberduck.Parsing.Grammar {
2123
using Antlr4.Runtime;
2224
using Antlr4.Runtime.Atn;
2325
using Antlr4.Runtime.Misc;
2426
using DFA = Antlr4.Runtime.Dfa.DFA;
2527

26-
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.3")]
28+
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.5.3")]
2729
[System.CLSCompliant(false)]
2830
public partial class VBALexer : Lexer {
2931
public const int
@@ -68,41 +70,6 @@ public const int
6870
"DEFAULT_MODE"
6971
};
7072

71-
public static readonly string[] tokenNames = {
72-
"'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'",
73-
"'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'",
74-
"'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'",
75-
"'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'",
76-
"'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'",
77-
"'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''",
78-
"'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'",
79-
"'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'",
80-
"'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'",
81-
"'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'",
82-
"'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'",
83-
"'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'",
84-
"'d'", "'e'", "'f'", "'g'", "'h'", "'i'", "'j'", "'k'", "'l'", "'m'",
85-
"'n'", "'o'", "'p'", "'q'", "'r'", "'s'", "'t'", "'u'", "'v'", "'w'",
86-
"'x'", "'y'", "'z'", "'{'", "'|'", "'}'", "'~'", "'\\u007F'", "'\\u0080'",
87-
"'\\u0081'", "'\\u0082'", "'\\u0083'", "'\\u0084'", "'\\u0085'", "'\\u0086'",
88-
"'\\u0087'", "'\\u0088'", "'\\u0089'", "'\\u008A'", "'\\u008B'", "'\\u008C'",
89-
"'\\u008D'", "'\\u008E'", "'\\u008F'", "'\\u0090'", "'\\u0091'", "'\\u0092'",
90-
"'\\u0093'", "'\\u0094'", "'\\u0095'", "'\\u0096'", "'\\u0097'", "'\\u0098'",
91-
"'\\u0099'", "'\\u009A'", "'\\u009B'", "'\\u009C'", "'\\u009D'", "'\\u009E'",
92-
"'\\u009F'", "'\\u00A0'", "'\\u00A1'", "'\\u00A2'", "'\\u00A3'", "'\\u00A4'",
93-
"'\\u00A5'", "'\\u00A6'", "'\\u00A7'", "'\\u00A8'", "'\\u00A9'", "'\\u00AA'",
94-
"'\\u00AB'", "'\\u00AC'", "'\\u00AD'", "'\\u00AE'", "'\\u00AF'", "'\\u00B0'",
95-
"'\\u00B1'", "'\\u00B2'", "'\\u00B3'", "'\\u00B4'", "'\\u00B5'", "'\\u00B6'",
96-
"'\\u00B7'", "'\\u00B8'", "'\\u00B9'", "'\\u00BA'", "'\\u00BB'", "'\\u00BC'",
97-
"'\\u00BD'", "'\\u00BE'", "'\\u00BF'", "'\\u00C0'", "'\\u00C1'", "'\\u00C2'",
98-
"'\\u00C3'", "'\\u00C4'", "'\\u00C5'", "'\\u00C6'", "'\\u00C7'", "'\\u00C8'",
99-
"'\\u00C9'", "'\\u00CA'", "'\\u00CB'", "'\\u00CC'", "'\\u00CD'", "'\\u00CE'",
100-
"'\\u00CF'", "'\\u00D0'", "'\\u00D1'", "'\\u00D2'", "'\\u00D3'", "'\\u00D4'",
101-
"'\\u00D5'", "'\\u00D6'", "'\\u00D7'", "'\\u00D8'", "'\\u00D9'", "'\\u00DA'",
102-
"'\\u00DB'", "'\\u00DC'", "'\\u00DD'", "'\\u00DE'", "'\\u00DF'", "'\\u00E0'",
103-
"'\\u00E1'", "'\\u00E2'", "'\\u00E3'", "'\\u00E4'", "'\\u00E5'", "'\\u00E6'",
104-
"'\\u00E7'", "'\\u00E8'", "'\\u00E9'", "'\\u00EA'", "'\\u00EB'"
105-
};
10673
public static readonly string[] ruleNames = {
10774
"ABS", "ANY", "ARRAY", "B_CHAR", "BF", "CBOOL", "CBYTE", "CCUR", "CDATE",
10875
"CDBL", "CDEC", "CINT", "CIRCLE", "CLNG", "CLNGLNG", "CLNGPTR", "CSNG",
@@ -154,9 +121,102 @@ public VBALexer(ICharStream input)
154121
_interp = new LexerATNSimulator(this,_ATN);
155122
}
156123

157-
public override string GrammarFileName { get { return "VBALexer.g4"; } }
124+
private static readonly string[] _LiteralNames = {
125+
null, null, null, null, null, null, null, null, null, null, null, null,
126+
null, null, null, null, null, null, null, null, null, null, null, null,
127+
null, null, null, null, null, null, null, null, null, null, null, null,
128+
null, null, null, "','", "':'", "';'", "'!'", "'.'", "'#'", "'@'", "'%'",
129+
"'$'", "'&'", null, null, null, null, null, null, null, null, null, null,
130+
null, null, null, null, null, null, null, null, null, null, null, null,
131+
null, null, null, null, null, null, null, null, null, null, null, null,
132+
null, null, null, null, null, null, null, null, null, null, null, null,
133+
null, null, null, null, null, null, null, null, null, null, null, null,
134+
null, null, null, null, null, null, null, null, null, null, null, null,
135+
null, null, null, null, null, null, null, null, null, null, null, null,
136+
null, null, null, null, null, null, null, null, null, null, null, null,
137+
null, null, null, null, null, null, null, null, null, null, null, null,
138+
null, null, null, null, null, null, null, null, null, null, null, null,
139+
null, null, null, null, null, null, null, null, null, null, null, null,
140+
null, null, null, null, null, null, null, null, null, null, null, null,
141+
null, null, null, null, null, null, null, null, null, null, null, null,
142+
null, null, "':='", "'/'", "'\\'", "'='", null, "'>'", null, "'('", "'<'",
143+
"'-'", "'*'", null, "'+'", "'^'", "')'", "'['", "']'", null, null, null,
144+
null, null, null, null, "'''", "'_'"
145+
};
146+
private static readonly string[] _SymbolicNames = {
147+
null, "ABS", "ANY", "ARRAY", "B_CHAR", "BF", "CBOOL", "CBYTE", "CCUR",
148+
"CDATE", "CDBL", "CDEC", "CINT", "CIRCLE", "CLNG", "CLNGLNG", "CLNGPTR",
149+
"CSNG", "CSTR", "CURRENCY", "CVAR", "CVERR", "DEBUG", "DOEVENTS", "EXIT",
150+
"FIX", "INPUTB", "INT", "LBOUND", "LEN", "LENB", "LONGLONG", "LONGPTR",
151+
"MIDB", "OPTION", "PSET", "SCALE", "SGN", "UBOUND", "COMMA", "COLON",
152+
"SEMICOLON", "EXCLAMATIONPOINT", "DOT", "HASH", "AT", "PERCENT", "DOLLAR",
153+
"AMPERSAND", "ACCESS", "ADDRESSOF", "ALIAS", "AND", "ATTRIBUTE", "APPEND",
154+
"AS", "BEGIN", "BINARY", "BOOLEAN", "BYVAL", "BYREF", "BYTE", "CALL",
155+
"CASE", "CLASS", "CLOSE", "CONST", "DATABASE", "DATE", "DECLARE", "DEFBOOL",
156+
"DEFBYTE", "DEFDATE", "DEFDBL", "DEFCUR", "DEFINT", "DEFLNG", "DEFLNGLNG",
157+
"DEFLNGPTR", "DEFOBJ", "DEFSNG", "DEFSTR", "DEFVAR", "DIM", "DO", "DOUBLE",
158+
"EACH", "ELSE", "ELSEIF", "EMPTY", "END_ENUM", "END_FUNCTION", "END_IF",
159+
"END_PROPERTY", "END_SELECT", "END_SUB", "END_TYPE", "END_WITH", "END",
160+
"ENUM", "EQV", "ERASE", "ERROR", "EVENT", "EXIT_DO", "EXIT_FOR", "EXIT_FUNCTION",
161+
"EXIT_PROPERTY", "EXIT_SUB", "FALSE", "FRIEND", "FOR", "FUNCTION", "GET",
162+
"GLOBAL", "GOSUB", "GOTO", "IF", "IMP", "IMPLEMENTS", "IN", "INPUT", "IS",
163+
"INTEGER", "LOCK", "LONG", "LOOP", "LET", "LIB", "LIKE", "LINE_INPUT",
164+
"LOCK_READ", "LOCK_WRITE", "LOCK_READ_WRITE", "LSET", "ME", "MID", "MOD",
165+
"NAME", "NEXT", "NEW", "NOT", "NOTHING", "NULL", "OBJECT", "ON", "ON_ERROR",
166+
"ON_LOCAL_ERROR", "OPEN", "OPTIONAL", "OPTION_BASE", "OPTION_EXPLICIT",
167+
"OPTION_COMPARE", "OPTION_PRIVATE_MODULE", "OR", "OUTPUT", "PARAMARRAY",
168+
"PRESERVE", "PRINT", "PRIVATE", "PROPERTY_GET", "PROPERTY_LET", "PROPERTY_SET",
169+
"PTRSAFE", "PUBLIC", "PUT", "RANDOM", "RAISEEVENT", "READ", "READ_WRITE",
170+
"REDIM", "REM", "RESET", "RESUME", "RETURN", "RSET", "SEEK", "SELECT",
171+
"SET", "SHARED", "SINGLE", "SPC", "STATIC", "STEP", "STOP", "STRING",
172+
"SUB", "TAB", "TEXT", "THEN", "TO", "TRUE", "TYPE", "TYPEOF", "UNLOCK",
173+
"UNTIL", "VARIANT", "VERSION", "WEND", "WHILE", "WIDTH", "WITH", "WITHEVENTS",
174+
"WRITE", "XOR", "ASSIGN", "DIV", "INTDIV", "EQ", "GEQ", "GT", "LEQ", "LPAREN",
175+
"LT", "MINUS", "MULT", "NEQ", "PLUS", "POW", "RPAREN", "L_SQUARE_BRACKET",
176+
"R_SQUARE_BRACKET", "STRINGLITERAL", "OCTLITERAL", "HEXLITERAL", "FLOATLITERAL",
177+
"INTEGERLITERAL", "DATELITERAL", "NEWLINE", "SINGLEQUOTE", "UNDERSCORE",
178+
"WS", "GUIDLITERAL", "IDENTIFIER", "LINE_CONTINUATION", "ERRORCHAR"
179+
};
180+
public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
181+
182+
[System.Obsolete("Use Vocabulary instead.")]
183+
public static readonly string[] tokenNames = GenerateTokenNames(DefaultVocabulary, _SymbolicNames.Length);
184+
185+
private static string[] GenerateTokenNames(IVocabulary vocabulary, int length) {
186+
string[] tokenNames = new string[length];
187+
for (int i = 0; i < tokenNames.Length; i++) {
188+
tokenNames[i] = vocabulary.GetLiteralName(i);
189+
if (tokenNames[i] == null) {
190+
tokenNames[i] = vocabulary.GetSymbolicName(i);
191+
}
192+
193+
if (tokenNames[i] == null) {
194+
tokenNames[i] = "<INVALID>";
195+
}
196+
}
197+
198+
return tokenNames;
199+
}
200+
201+
[System.Obsolete]
202+
public override string[] TokenNames
203+
{
204+
get
205+
{
206+
return tokenNames;
207+
}
208+
}
158209

159-
public override string[] TokenNames { get { return tokenNames; } }
210+
[NotNull]
211+
public override IVocabulary Vocabulary
212+
{
213+
get
214+
{
215+
return DefaultVocabulary;
216+
}
217+
}
218+
219+
public override string GrammarFileName { get { return "VBALexer.g4"; } }
160220

161221
public override string[] RuleNames { get { return ruleNames; } }
162222

0 commit comments

Comments
 (0)