--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Antlr4.Runtime</RootNamespace>
<AssemblyName>Antlr4.Runtime.Standard</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj\net20\</BaseIntermediateOutputPath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/ATN.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/ATN.cs
@@ -82,7 +82,7 @@ namespace Antlr4.Runtime.Atn
[NotNull]
public DFA[] modeToDFA = new DFA[0];
- protected internal readonly ConcurrentDictionary<int, int> LL1Table = new ConcurrentDictionary<int, int>();
+ protected internal readonly Antlr4.Runtime.Sharpen.ConcurrentDictionary<int, int> LL1Table = new Antlr4.Runtime.Sharpen.ConcurrentDictionary<int, int>();
/// <summary>Used for runtime deserialization of ATNs from strings</summary>
public ATN(ATNType grammarType, int maxTokenType)
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/ATNDeserializer.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Atn/ATNDeserializer.cs
@@ -482,8 +482,8 @@ namespace Antlr4.Runtime.Atn
//
// STATES
//
- IList<Tuple<LoopEndState, int>> loopBackStateNumbers = new List<Tuple<LoopEndState, int>>();
- IList<Tuple<BlockStartState, int>> endStateNumbers = new List<Tuple<BlockStartState, int>>();
+ IList<Antlr4.Runtime.Sharpen.Tuple<LoopEndState, int>> loopBackStateNumbers = new List<Antlr4.Runtime.Sharpen.Tuple<LoopEndState, int>>();
+ IList<Antlr4.Runtime.Sharpen.Tuple<BlockStartState, int>> endStateNumbers = new List<Antlr4.Runtime.Sharpen.Tuple<BlockStartState, int>>();
int nstates = ReadInt();
for (int i_1 = 0; i_1 < nstates; i_1++)
{
@@ -504,24 +504,24 @@ namespace Antlr4.Runtime.Atn
{
// special case
int loopBackStateNumber = ReadInt();
- loopBackStateNumbers.Add(Tuple.Create((LoopEndState)s, loopBackStateNumber));
+ loopBackStateNumbers.Add(Antlr4.Runtime.Sharpen.Tuple.Create((LoopEndState)s, loopBackStateNumber));
}
else
{
if (s is BlockStartState)
{
int endStateNumber = ReadInt();
- endStateNumbers.Add(Tuple.Create((BlockStartState)s, endStateNumber));
+ endStateNumbers.Add(Antlr4.Runtime.Sharpen.Tuple.Create((BlockStartState)s, endStateNumber));
}
}
atn.AddState(s);
}
// delay the assignment of loop back and end states until we know all the state instances have been initialized
- foreach (Tuple<LoopEndState, int> pair in loopBackStateNumbers)
+ foreach (Antlr4.Runtime.Sharpen.Tuple<LoopEndState, int> pair in loopBackStateNumbers)
{
pair.Item1.loopBackState = atn.states[pair.Item2];
}
- foreach (Tuple<BlockStartState, int> pair_1 in endStateNumbers)
+ foreach (Antlr4.Runtime.Sharpen.Tuple<BlockStartState, int> pair_1 in endStateNumbers)
{
pair_1.Item1.endState = (BlockEndState)atn.states[pair_1.Item2];
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/CommonToken.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/CommonToken.cs
@@ -21,7 +21,7 @@ namespace Antlr4.Runtime
/// <see cref="source"/>
/// for tokens that do not have a source.
/// </summary>
- protected internal static readonly Tuple<ITokenSource, ICharStream> EmptySource = Tuple.Create<ITokenSource, ICharStream>(null, null);
+ protected internal static readonly Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> EmptySource = Antlr4.Runtime.Sharpen.Tuple.Create<ITokenSource, ICharStream>(null, null);
/// <summary>
/// This is the backing field for the <see cref="Type"/> property.
@@ -60,7 +60,7 @@ namespace Antlr4.Runtime
/// containing these values.</p>
/// </summary>
[NotNull]
- protected internal Tuple<ITokenSource, ICharStream> source;
+ protected internal Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> source;
/// <summary>
/// This is the backing field for the <see cref="Text"/> property.
@@ -96,7 +96,7 @@ namespace Antlr4.Runtime
this.source = EmptySource;
}
- public CommonToken(Tuple<ITokenSource, ICharStream> source, int type, int channel, int start, int stop)
+ public CommonToken(Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> source, int type, int channel, int start, int stop)
{
this.source = source;
this._type = type;
@@ -176,7 +176,7 @@ namespace Antlr4.Runtime
else
{
_text = oldToken.Text;
- source = Tuple.Create(oldToken.TokenSource, oldToken.InputStream);
+ source = Antlr4.Runtime.Sharpen.Tuple.Create(oldToken.TokenSource, oldToken.InputStream);
}
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs
@@ -99,7 +99,7 @@ namespace Antlr4.Runtime
{
}
- public virtual CommonToken Create(Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine)
+ public virtual CommonToken Create(Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine)
{
CommonToken t = new CommonToken(source, type, channel, start, stop);
t.Line = line;
@@ -118,7 +118,7 @@ namespace Antlr4.Runtime
return t;
}
- IToken ITokenFactory.Create(Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine)
+ IToken ITokenFactory.Create(Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine)
{
return Create(source, type, text, channel, start, stop, line, charPositionInLine);
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/DefaultErrorStrategy.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/DefaultErrorStrategy.cs
@@ -699,7 +699,7 @@ namespace Antlr4.Runtime
protected internal virtual IToken ConstructToken(ITokenSource tokenSource, int expectedTokenType, string tokenText, IToken current)
{
ITokenFactory factory = tokenSource.TokenFactory;
- return factory.Create(Tuple.Create(tokenSource, current.TokenSource.InputStream), expectedTokenType, tokenText, TokenConstants.DefaultChannel, -1, -1, current.Line, current.Column);
+ return factory.Create(Antlr4.Runtime.Sharpen.Tuple.Create(tokenSource, current.TokenSource.InputStream), expectedTokenType, tokenText, TokenConstants.DefaultChannel, -1, -1, current.Line, current.Column);
}
[return: NotNull]
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ITokenFactory.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ITokenFactory.cs
@@ -27,7 +27,7 @@ namespace Antlr4.Runtime
/// are wiped to -1 in the text override is set in the CommonToken.
/// </remarks>
[return: NotNull]
- IToken Create(Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine);
+ IToken Create(Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> source, int type, string text, int channel, int start, int stop, int line, int charPositionInLine);
/// <summary>Generically useful</summary>
[return: NotNull]
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Lexer.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Lexer.cs
@@ -38,7 +38,7 @@ namespace Antlr4.Runtime
protected readonly TextWriter ErrorOutput;
- private Tuple<ITokenSource, ICharStream> _tokenFactorySourcePair;
+ private Antlr4.Runtime.Sharpen.Tuple<ITokenSource, ICharStream> _tokenFactorySourcePair;
/// <summary>How to create token objects</summary>
private ITokenFactory _factory = CommonTokenFactory.Default;
@@ -106,7 +106,7 @@ namespace Antlr4.Runtime
this._input = input;
this.Output = output;
this.ErrorOutput = errorOutput;
- this._tokenFactorySourcePair = Tuple.Create((ITokenSource)this, input);
+ this._tokenFactorySourcePair = Antlr4.Runtime.Sharpen.Tuple.Create((ITokenSource)this, input);
}
public virtual void Reset()
@@ -271,10 +271,10 @@ outer_continue: ;
public virtual void SetInputStream(ICharStream input)
{
this._input = null;
- this._tokenFactorySourcePair = Tuple.Create((ITokenSource)this, _input);
+ this._tokenFactorySourcePair = Antlr4.Runtime.Sharpen.Tuple.Create((ITokenSource)this, _input);
Reset();
this._input = input;
- this._tokenFactorySourcePair = Tuple.Create((ITokenSource)this, _input);
+ this._tokenFactorySourcePair = Antlr4.Runtime.Sharpen.Tuple.Create((ITokenSource)this, _input);
}
public virtual string SourceName
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ListTokenSource.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ListTokenSource.cs
@@ -198,7 +198,7 @@ namespace Antlr4.Runtime
}
}
int stop = Math.Max(-1, start - 1);
- eofToken = _factory.Create(Tuple.Create((ITokenSource)this, InputStream), TokenConstants.EOF, "EOF", TokenConstants.DefaultChannel, start, stop, Line, Column);
+ eofToken = _factory.Create(Antlr4.Runtime.Sharpen.Tuple.Create((ITokenSource)this, InputStream), TokenConstants.EOF, "EOF", TokenConstants.DefaultChannel, start, stop, Line, Column);
}
return eofToken;
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/MultiMap.cs
@@ -24,14 +24,14 @@ namespace Antlr4.Runtime.Misc
elementsForKey.Add(value);
}
- public virtual IList<Tuple<K, V>> GetPairs()
+ public virtual IList<Antlr4.Runtime.Sharpen.Tuple<K, V>> GetPairs()
{
- IList<Tuple<K, V>> pairs = new ArrayList<Tuple<K, V>>();
+ IList<Antlr4.Runtime.Sharpen.Tuple<K, V>> pairs = new ArrayList<Antlr4.Runtime.Sharpen.Tuple<K, V>>();
foreach (KeyValuePair<K, IList<V>> pair in this)
{
foreach (V value in pair.Value)
{
- pairs.Add(Tuple.Create(pair.Key, value));
+ pairs.Add(Antlr4.Runtime.Sharpen.Tuple.Create(pair.Key, value));
}
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Misc/RuleDependencyChecker.cs
@@ -31,7 +31,7 @@ namespace Antlr4.Runtime.Misc
}
IEnumerable<TypeInfo> typesToCheck = GetTypesToCheck(assembly);
- List<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies = new List<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ List<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies = new List<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
foreach (TypeInfo clazz in typesToCheck)
{
dependencies.AddRange(GetDependencies(clazz));
@@ -39,20 +39,20 @@ namespace Antlr4.Runtime.Misc
if (dependencies.Count > 0)
{
- IDictionary<TypeInfo, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> recognizerDependencies = new Dictionary<TypeInfo, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>>();
- foreach (Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
+ IDictionary<TypeInfo, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> recognizerDependencies = new Dictionary<TypeInfo, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>>();
+ foreach (Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
{
TypeInfo recognizerType = dependency.Item1.Recognizer.GetTypeInfo();
- IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> list;
+ IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> list;
if (!recognizerDependencies.TryGetValue(recognizerType, out list))
{
- list = new List<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ list = new List<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
recognizerDependencies[recognizerType] = list;
}
list.Add(dependency);
}
- foreach (KeyValuePair<TypeInfo, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies)
+ foreach (KeyValuePair<TypeInfo, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies)
{
//processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, String.format("ANTLR 4: Validating {0} dependencies on rules in {1}.", entry.getValue().size(), entry.getKey().toString()));
CheckDependencies(entry.Value, entry.Key);
@@ -83,13 +83,13 @@ namespace Antlr4.Runtime.Misc
}
}
- private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, TypeInfo recognizerType)
+ private static void CheckDependencies(IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, TypeInfo recognizerType)
{
string[] ruleNames = GetRuleNames(recognizerType);
int[] ruleVersions = GetRuleVersions(recognizerType, ruleNames);
RuleDependencyChecker.RuleRelations relations = ExtractRuleRelations(recognizerType);
StringBuilder errors = new StringBuilder();
- foreach (Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
+ foreach (Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
{
if (!dependency.Item1.Recognizer.GetTypeInfo().IsAssignableFrom(recognizerType))
{
@@ -180,7 +180,7 @@ namespace Antlr4.Runtime.Misc
private static readonly Dependents ImplementedDependents = Dependents.Self | Dependents.Parents | Dependents.Children | Dependents.Ancestors | Dependents.Descendants;
- private static void ReportUnimplementedDependents(StringBuilder errors, Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, Dependents dependents)
+ private static void ReportUnimplementedDependents(StringBuilder errors, Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, Dependents dependents)
{
Dependents unimplemented = dependents;
unimplemented &= ~ImplementedDependents;
@@ -191,7 +191,7 @@ namespace Antlr4.Runtime.Misc
}
}
- private static int CheckDependencyVersion(StringBuilder errors, Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, string[] ruleNames, int[] ruleVersions, int relatedRule, string relation)
+ private static int CheckDependencyVersion(StringBuilder errors, Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, string[] ruleNames, int[] ruleVersions, int relatedRule, string relation)
{
string ruleName = ruleNames[dependency.Item1.Rule];
string path;
@@ -294,9 +294,9 @@ namespace Antlr4.Runtime.Misc
return (string[])ruleNames.GetValue(null);
}
- public static IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> GetDependencies(TypeInfo clazz)
+ public static IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> GetDependencies(TypeInfo clazz)
{
- IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result = new List<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result = new List<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
GetElementDependencies(AsCustomAttributeProvider(clazz), result);
foreach (ConstructorInfo ctor in clazz.DeclaredConstructors)
@@ -329,11 +329,11 @@ namespace Antlr4.Runtime.Misc
return result;
}
- private static void GetElementDependencies(ICustomAttributeProvider annotatedElement, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result)
+ private static void GetElementDependencies(ICustomAttributeProvider annotatedElement, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result)
{
foreach (RuleDependencyAttribute dependency in annotatedElement.GetCustomAttributes(typeof(RuleDependencyAttribute), true))
{
- result.Add(Tuple.Create(dependency, annotatedElement));
+ result.Add(Antlr4.Runtime.Sharpen.Tuple.Create(dependency, annotatedElement));
}
}
@@ -586,7 +586,7 @@ namespace Antlr4.Runtime.Misc
}
IList<Type> typesToCheck = GetTypesToCheck(assembly);
- ArrayList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies = new ArrayList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ ArrayList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies = new ArrayList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
foreach (Type clazz in typesToCheck)
{
dependencies.AddRange(GetDependencies(clazz));
@@ -594,20 +594,20 @@ namespace Antlr4.Runtime.Misc
if (dependencies.Count > 0)
{
- IDictionary<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> recognizerDependencies = new Dictionary<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>>();
- foreach (Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
+ IDictionary<Type, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> recognizerDependencies = new Dictionary<Type, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>>();
+ foreach (Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
{
Type recognizerType = dependency.Item1.Recognizer;
- IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> list;
+ IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> list;
if (!recognizerDependencies.TryGetValue(recognizerType, out list))
{
- list = new ArrayList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ list = new ArrayList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
recognizerDependencies[recognizerType] = list;
}
list.Add(dependency);
}
- foreach (KeyValuePair<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies)
+ foreach (KeyValuePair<Type, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies)
{
//processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, String.format("ANTLR 4: Validating {0} dependencies on rules in {1}.", entry.getValue().size(), entry.getKey().toString()));
CheckDependencies(entry.Value, entry.Key);
@@ -638,13 +638,13 @@ namespace Antlr4.Runtime.Misc
}
}
- private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, Type recognizerType)
+ private static void CheckDependencies(IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, Type recognizerType)
{
string[] ruleNames = GetRuleNames(recognizerType);
int[] ruleVersions = GetRuleVersions(recognizerType, ruleNames);
RuleDependencyChecker.RuleRelations relations = ExtractRuleRelations(recognizerType);
StringBuilder errors = new StringBuilder();
- foreach (Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
+ foreach (Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency in dependencies)
{
#if DOTNETCORE
if (!dependency.Item1.Recognizer.GetTypeInfo().IsAssignableFrom(recognizerType))
@@ -739,7 +739,7 @@ namespace Antlr4.Runtime.Misc
private static readonly Dependents ImplementedDependents = Dependents.Self | Dependents.Parents | Dependents.Children | Dependents.Ancestors | Dependents.Descendants;
- private static void ReportUnimplementedDependents(StringBuilder errors, Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, Dependents dependents)
+ private static void ReportUnimplementedDependents(StringBuilder errors, Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, Dependents dependents)
{
Dependents unimplemented = dependents;
unimplemented &= ~ImplementedDependents;
@@ -750,7 +750,7 @@ namespace Antlr4.Runtime.Misc
}
}
- private static int CheckDependencyVersion(StringBuilder errors, Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, string[] ruleNames, int[] ruleVersions, int relatedRule, string relation)
+ private static int CheckDependencyVersion(StringBuilder errors, Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider> dependency, string[] ruleNames, int[] ruleVersions, int relatedRule, string relation)
{
string ruleName = ruleNames[dependency.Item1.Rule];
string path;
@@ -873,9 +873,9 @@ namespace Antlr4.Runtime.Misc
return (string[])ruleNames.GetValue(null);
}
- public static IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> GetDependencies(Type clazz)
+ public static IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> GetDependencies(Type clazz)
{
- IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result = new ArrayList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
+ IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result = new ArrayList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>();
#if DOTNETCORE
GetElementDependencies(AsCustomAttributeProvider(clazz.GetTypeInfo()), result);
@@ -924,11 +924,11 @@ namespace Antlr4.Runtime.Misc
return result;
}
- private static void GetElementDependencies(ICustomAttributeProvider annotatedElement, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result)
+ private static void GetElementDependencies(ICustomAttributeProvider annotatedElement, IList<Antlr4.Runtime.Sharpen.Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> result)
{
foreach (RuleDependencyAttribute dependency in annotatedElement.GetCustomAttributes(typeof(RuleDependencyAttribute), true))
{
- result.Add(Tuple.Create(dependency, annotatedElement));
+ result.Add(Antlr4.Runtime.Sharpen.Tuple.Create(dependency, annotatedElement));
}
}
--- a/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ParserInterpreter.cs
+++ b/runtime/CSharp/runtime/CSharp/Antlr4.Runtime/ParserInterpreter.cs
@@ -41,7 +41,7 @@ namespace Antlr4.Runtime
[NotNull]
private readonly IVocabulary vocabulary;
- private readonly Stack<Tuple<ParserRuleContext, int>> _parentContextStack = new Stack<Tuple<ParserRuleContext, int>>();
+ private readonly Stack<Antlr4.Runtime.Sharpen.Tuple<ParserRuleContext, int>> _parentContextStack = new Stack<Antlr4.Runtime.Sharpen.Tuple<ParserRuleContext, int>>();
public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, IEnumerable<string> ruleNames, ATN atn, ITokenStream input)
: base(input)
@@ -134,7 +134,7 @@ namespace Antlr4.Runtime
if (startRuleStartState.isPrecedenceRule)
{
ParserRuleContext result = RuleContext;
- Tuple<ParserRuleContext, int> parentContext = _parentContextStack.Pop();
+ Antlr4.Runtime.Sharpen.Tuple<ParserRuleContext, int> parentContext = _parentContextStack.Pop();
UnrollRecursionContexts(parentContext.Item1);
return result;
}
@@ -169,7 +169,7 @@ namespace Antlr4.Runtime
public override void EnterRecursionRule(ParserRuleContext localctx, int state, int ruleIndex, int precedence)
{
- _parentContextStack.Push(Tuple.Create(RuleContext, localctx.invokingState));
+ _parentContextStack.Push(Antlr4.Runtime.Sharpen.Tuple.Create(RuleContext, localctx.invokingState));
base.EnterRecursionRule(localctx, state, ruleIndex, precedence);
}
@@ -285,7 +285,7 @@ namespace Antlr4.Runtime
RuleStartState ruleStartState = _atn.ruleToStartState[p.ruleIndex];
if (ruleStartState.isPrecedenceRule)
{
- Tuple<ParserRuleContext, int> parentContext = _parentContextStack.Pop();
+ Antlr4.Runtime.Sharpen.Tuple<ParserRuleContext, int> parentContext = _parentContextStack.Pop();
UnrollRecursionContexts(parentContext.Item1);
State = parentContext.Item2;
}