diff --git a/reference/sharpen b/reference/sharpen index f01e18ba7..ee88c0a13 160000 --- a/reference/sharpen +++ b/reference/sharpen @@ -1 +1 @@ -Subproject commit f01e18ba72eda0825e09da106ff9c9e7c337cd22 +Subproject commit ee88c0a13113436b09009d8f621333e239ac926f diff --git a/runtime/CSharp/Antlr4.Runtime/AntlrFileStream.cs b/runtime/CSharp/Antlr4.Runtime/AntlrFileStream.cs index 633528917..f6767d5b9 100644 --- a/runtime/CSharp/Antlr4.Runtime/AntlrFileStream.cs +++ b/runtime/CSharp/Antlr4.Runtime/AntlrFileStream.cs @@ -51,7 +51,8 @@ namespace Antlr4.Runtime protected internal string fileName; /// - public AntlrFileStream(string fileName) : this(fileName, null) + public AntlrFileStream(string fileName) + : this(fileName, null) { } diff --git a/runtime/CSharp/Antlr4.Runtime/AntlrInputStream.cs b/runtime/CSharp/Antlr4.Runtime/AntlrInputStream.cs index c0d026e39..34f752ebc 100644 --- a/runtime/CSharp/Antlr4.Runtime/AntlrInputStream.cs +++ b/runtime/CSharp/Antlr4.Runtime/AntlrInputStream.cs @@ -88,14 +88,14 @@ namespace Antlr4.Runtime } /// - public AntlrInputStream(TextReader r) : this(r, InitialBufferSize, ReadBufferSize - ) + public AntlrInputStream(TextReader r) + : this(r, InitialBufferSize, ReadBufferSize) { } /// - public AntlrInputStream(TextReader r, int initialSize) : this(r, initialSize, ReadBufferSize - ) + public AntlrInputStream(TextReader r, int initialSize) + : this(r, initialSize, ReadBufferSize) { } @@ -106,20 +106,20 @@ namespace Antlr4.Runtime } /// - public AntlrInputStream(Stream input) : this(new StreamReader(input), InitialBufferSize - ) + public AntlrInputStream(Stream input) + : this(new StreamReader(input), InitialBufferSize) { } /// - public AntlrInputStream(Stream input, int initialSize) : this(new StreamReader(input - ), initialSize) + public AntlrInputStream(Stream input, int initialSize) + : this(new StreamReader(input), initialSize) { } /// - public AntlrInputStream(Stream input, int initialSize, int readChunkSize) : this( - new StreamReader(input), initialSize, readChunkSize) + public AntlrInputStream(Stream input, int initialSize, int readChunkSize) + : this(new StreamReader(input), initialSize, readChunkSize) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/ATNConfig.cs b/runtime/CSharp/Antlr4.Runtime/Atn/ATNConfig.cs index 407896bbe..035791774 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/ATNConfig.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/ATNConfig.cs @@ -504,15 +504,15 @@ namespace Antlr4.Runtime.Atn private readonly Antlr4.Runtime.Atn.SemanticContext semanticContext; public SemanticContextATNConfig(Antlr4.Runtime.Atn.SemanticContext semanticContext - , ATNState state, int alt, PredictionContext context) : base(state, alt, context - ) + , ATNState state, int alt, PredictionContext context) + : base(state, alt, context) { this.semanticContext = semanticContext; } public SemanticContextATNConfig(Antlr4.Runtime.Atn.SemanticContext semanticContext - , ATNConfig c, ATNState state, PredictionContext context) : base(c, state, context - ) + , ATNConfig c, ATNState state, PredictionContext context) + : base(c, state, context) { this.semanticContext = semanticContext; } @@ -531,13 +531,15 @@ namespace Antlr4.Runtime.Atn private readonly int actionIndex; public ActionATNConfig(int actionIndex, ATNState state, int alt, PredictionContext - context) : base(state, alt, context) + context) + : base(state, alt, context) { this.actionIndex = actionIndex; } protected internal ActionATNConfig(int actionIndex, ATNConfig c, ATNState state, - PredictionContext context) : base(c, state, context) + PredictionContext context) + : base(c, state, context) { if (c.SemanticContext != SemanticContext.None) { @@ -560,15 +562,15 @@ namespace Antlr4.Runtime.Atn private readonly int actionIndex; public ActionSemanticContextATNConfig(int actionIndex, SemanticContext semanticContext - , ATNState state, int alt, PredictionContext context) : base(semanticContext, - state, alt, context) + , ATNState state, int alt, PredictionContext context) + : base(semanticContext, state, alt, context) { this.actionIndex = actionIndex; } public ActionSemanticContextATNConfig(int actionIndex, SemanticContext semanticContext - , ATNConfig c, ATNState state, PredictionContext context) : base(semanticContext - , c, state, context) + , ATNConfig c, ATNState state, PredictionContext context) + : base(semanticContext, c, state, context) { this.actionIndex = actionIndex; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/AbstractPredicateTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/AbstractPredicateTransition.cs index 33f660acd..e0471c8c6 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/AbstractPredicateTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/AbstractPredicateTransition.cs @@ -35,7 +35,8 @@ namespace Antlr4.Runtime.Atn /// Sam Harwell public abstract class AbstractPredicateTransition : Transition { - public AbstractPredicateTransition(ATNState target) : base(target) + public AbstractPredicateTransition(ATNState target) + : base(target) { } } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/ActionTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/ActionTransition.cs index 4405aa634..67db33f39 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/ActionTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/ActionTransition.cs @@ -40,13 +40,14 @@ namespace Antlr4.Runtime.Atn public readonly bool isCtxDependent; - public ActionTransition(ATNState target, int ruleIndex) : this(target, ruleIndex, - -1, false) + public ActionTransition(ATNState target, int ruleIndex) + : this(target, ruleIndex, -1, false) { } public ActionTransition(ATNState target, int ruleIndex, int actionIndex, bool isCtxDependent - ) : base(target) + ) + : base(target) { // e.g., $i ref in action this.ruleIndex = ruleIndex; diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/ArrayPredictionContext.cs b/runtime/CSharp/Antlr4.Runtime/Atn/ArrayPredictionContext.cs index f205b54d1..79a56f01a 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/ArrayPredictionContext.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/ArrayPredictionContext.cs @@ -44,8 +44,8 @@ namespace Antlr4.Runtime.Atn [NotNull] public readonly int[] returnStates; - internal ArrayPredictionContext(PredictionContext[] parents, int[] returnStates) : - base(CalculateHashCode(parents, returnStates)) + internal ArrayPredictionContext(PredictionContext[] parents, int[] returnStates) + : base(CalculateHashCode(parents, returnStates)) { System.Diagnostics.Debug.Assert(parents.Length == returnStates.Length); System.Diagnostics.Debug.Assert(returnStates.Length > 1 || returnStates[0] != EmptyFullStateKey @@ -55,7 +55,8 @@ namespace Antlr4.Runtime.Atn } internal ArrayPredictionContext(PredictionContext[] parents, int[] returnStates, - int hashCode) : base(hashCode) + int hashCode) + : base(hashCode) { System.Diagnostics.Debug.Assert(parents.Length == returnStates.Length); System.Diagnostics.Debug.Assert(returnStates.Length > 1 || returnStates[0] != EmptyFullStateKey diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/AtomTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/AtomTransition.cs index 4ce1c02a8..e53a2c920 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/AtomTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/AtomTransition.cs @@ -40,7 +40,8 @@ namespace Antlr4.Runtime.Atn /// The token type or character value; or, signifies special label. public readonly int label; - public AtomTransition(ATNState target, int label) : base(target) + public AtomTransition(ATNState target, int label) + : base(target) { this.label = label; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/EmptyPredictionContext.cs b/runtime/CSharp/Antlr4.Runtime/Atn/EmptyPredictionContext.cs index 87246c875..9e52a394b 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/EmptyPredictionContext.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/EmptyPredictionContext.cs @@ -45,7 +45,8 @@ namespace Antlr4.Runtime.Atn private readonly bool fullContext; - private EmptyPredictionContext(bool fullContext) : base(CalculateEmptyHashCode()) + private EmptyPredictionContext(bool fullContext) + : base(CalculateEmptyHashCode()) { this.fullContext = fullContext; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/EpsilonTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/EpsilonTransition.cs index 7d981aa17..10e0bb0da 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/EpsilonTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/EpsilonTransition.cs @@ -35,7 +35,8 @@ namespace Antlr4.Runtime.Atn { public sealed class EpsilonTransition : Transition { - public EpsilonTransition(ATNState target) : base(target) + public EpsilonTransition(ATNState target) + : base(target) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/LexerATNSimulator.cs b/runtime/CSharp/Antlr4.Runtime/Atn/LexerATNSimulator.cs index ae1ddd79f..bb76556fa 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/LexerATNSimulator.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/LexerATNSimulator.cs @@ -117,11 +117,13 @@ namespace Antlr4.Runtime.Atn public static int match_calls = 0; - public LexerATNSimulator(ATN atn) : this(null, atn) + public LexerATNSimulator(ATN atn) + : this(null, atn) { } - public LexerATNSimulator(Lexer recog, ATN atn) : base(atn) + public LexerATNSimulator(Lexer recog, ATN atn) + : base(atn) { this.recog = recog; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/NotSetTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/NotSetTransition.cs index fdc35c376..f71699f4e 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/NotSetTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/NotSetTransition.cs @@ -35,7 +35,8 @@ namespace Antlr4.Runtime.Atn { public sealed class NotSetTransition : SetTransition { - public NotSetTransition(ATNState target, IntervalSet set) : base(target, set) + public NotSetTransition(ATNState target, IntervalSet set) + : base(target, set) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs b/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs index 353f8c1db..567d4ec85 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/OrderedATNConfigSet.cs @@ -39,8 +39,8 @@ namespace Antlr4.Runtime.Atn { } - public OrderedATNConfigSet(ATNConfigSet set, bool @readonly) : base(set, @readonly - ) + public OrderedATNConfigSet(ATNConfigSet set, bool @readonly) + : base(set, @readonly) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/ParserATNSimulator.cs b/runtime/CSharp/Antlr4.Runtime/Atn/ParserATNSimulator.cs index ddfcae94f..79e43d0ae 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/ParserATNSimulator.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/ParserATNSimulator.cs @@ -268,11 +268,13 @@ namespace Antlr4.Runtime.Atn protected internal bool userWantsCtxSensitive = true; /// Testing only! - public ParserATNSimulator(ATN atn) : this(null, atn) + public ParserATNSimulator(ATN atn) + : this(null, atn) { } - public ParserATNSimulator(Parser parser, ATN atn) : base(atn) + public ParserATNSimulator(Parser parser, ATN atn) + : base(atn) { this.parser = parser; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/PrecedencePredicateTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/PrecedencePredicateTransition.cs index 9f7a95b65..2b4849927 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/PrecedencePredicateTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/PrecedencePredicateTransition.cs @@ -37,8 +37,8 @@ namespace Antlr4.Runtime.Atn { public readonly int precedence; - public PrecedencePredicateTransition(ATNState target, int precedence) : base(target - ) + public PrecedencePredicateTransition(ATNState target, int precedence) + : base(target) { this.precedence = precedence; } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/PredicateTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/PredicateTransition.cs index b9815af3d..0123a6d15 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/PredicateTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/PredicateTransition.cs @@ -53,7 +53,8 @@ namespace Antlr4.Runtime.Atn public readonly bool isCtxDependent; public PredicateTransition(ATNState target, int ruleIndex, int predIndex, bool isCtxDependent - ) : base(target) + ) + : base(target) { // e.g., $i ref in pred this.ruleIndex = ruleIndex; diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContext.cs b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContext.cs index 23b83852d..78b9fd74e 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContext.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContext.cs @@ -522,8 +522,8 @@ outer_continue: ; public sealed class IdentityHashMap : Dictionary { - public IdentityHashMap() : base(PredictionContext.IdentityEqualityComparator.Instance - ) + public IdentityHashMap() + : base(PredictionContext.IdentityEqualityComparator.Instance) { } } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContextCache.cs b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContextCache.cs index 18c079e4c..f25d3f197 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContextCache.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionContextCache.cs @@ -59,7 +59,8 @@ namespace Antlr4.Runtime.Atn private readonly bool enableCache; - public PredictionContextCache() : this(true) + public PredictionContextCache() + : this(true) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionMode.cs b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionMode.cs index 3cad08b44..960ef84da 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/PredictionMode.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/PredictionMode.cs @@ -80,8 +80,8 @@ namespace Antlr4.Runtime.Atn /// A Map that uses just the state and the stack context as the key. internal class AltAndContextMap : Dictionary { - public AltAndContextMap() : base(PredictionMode.AltAndContextConfigEqualityComparator - .Instance) + public AltAndContextMap() + : base(PredictionMode.AltAndContextConfigEqualityComparator.Instance) { } } diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/RangeTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/RangeTransition.cs index 8ce4dd63d..7b2f00a97 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/RangeTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/RangeTransition.cs @@ -39,7 +39,8 @@ namespace Antlr4.Runtime.Atn public readonly int to; - public RangeTransition(ATNState target, int from, int to) : base(target) + public RangeTransition(ATNState target, int from, int to) + : base(target) { this.from = from; this.to = to; diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/RuleTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/RuleTransition.cs index df99fdfa0..e87b7226f 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/RuleTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/RuleTransition.cs @@ -49,7 +49,8 @@ namespace Antlr4.Runtime.Atn public bool optimizedTailCall; public RuleTransition(RuleStartState ruleStart, int ruleIndex, int precedence, ATNState - followState) : base(ruleStart) + followState) + : base(ruleStart) { // no Rule object at runtime this.ruleIndex = ruleIndex; diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/SetTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/SetTransition.cs index c6dcb7261..d44575b1f 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/SetTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/SetTransition.cs @@ -40,7 +40,8 @@ namespace Antlr4.Runtime.Atn [NotNull] public readonly IntervalSet set; - public SetTransition(ATNState target, IntervalSet set) : base(target) + public SetTransition(ATNState target, IntervalSet set) + : base(target) { // TODO (sam): should we really allow null here? if (set == null) diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs b/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs index d4d423a26..33c88ed21 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/SingletonPredictionContext.cs @@ -41,8 +41,8 @@ namespace Antlr4.Runtime.Atn public readonly int returnState; - internal SingletonPredictionContext(PredictionContext parent, int returnState) : - base(CalculateHashCode(parent, returnState)) + internal SingletonPredictionContext(PredictionContext parent, int returnState) + : base(CalculateHashCode(parent, returnState)) { System.Diagnostics.Debug.Assert(returnState != EmptyFullStateKey && returnState != EmptyLocalStateKey); diff --git a/runtime/CSharp/Antlr4.Runtime/Atn/WildcardTransition.cs b/runtime/CSharp/Antlr4.Runtime/Atn/WildcardTransition.cs index 14a6f2cab..e4fed3b3c 100644 --- a/runtime/CSharp/Antlr4.Runtime/Atn/WildcardTransition.cs +++ b/runtime/CSharp/Antlr4.Runtime/Atn/WildcardTransition.cs @@ -35,7 +35,8 @@ namespace Antlr4.Runtime.Atn { public sealed class WildcardTransition : Transition { - public WildcardTransition(ATNState target) : base(target) + public WildcardTransition(ATNState target) + : base(target) { } diff --git a/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs b/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs index ccb6fb140..8aebe0a54 100644 --- a/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs +++ b/runtime/CSharp/Antlr4.Runtime/CommonTokenFactory.cs @@ -60,7 +60,8 @@ namespace Antlr4.Runtime this.copyText = copyText; } - public CommonTokenFactory() : this(false) + public CommonTokenFactory() + : this(false) { } diff --git a/runtime/CSharp/Antlr4.Runtime/CommonTokenStream.cs b/runtime/CSharp/Antlr4.Runtime/CommonTokenStream.cs index 34ee7e682..23ffa49cb 100644 --- a/runtime/CSharp/Antlr4.Runtime/CommonTokenStream.cs +++ b/runtime/CSharp/Antlr4.Runtime/CommonTokenStream.cs @@ -66,12 +66,13 @@ namespace Antlr4.Runtime /// protected internal int channel = TokenConstants.DefaultChannel; - public CommonTokenStream(ITokenSource tokenSource) : base(tokenSource) + public CommonTokenStream(ITokenSource tokenSource) + : base(tokenSource) { } - public CommonTokenStream(ITokenSource tokenSource, int channel) : this(tokenSource - ) + public CommonTokenStream(ITokenSource tokenSource, int channel) + : this(tokenSource) { this.channel = channel; } diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/ArrayEdgeMap`1.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/ArrayEdgeMap`1.cs index 590029149..8156ed88c 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/ArrayEdgeMap`1.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/ArrayEdgeMap`1.cs @@ -43,7 +43,8 @@ namespace Antlr4.Runtime.Dfa private int size; - public ArrayEdgeMap(int minIndex, int maxIndex) : base(minIndex, maxIndex) + public ArrayEdgeMap(int minIndex, int maxIndex) + : base(minIndex, maxIndex) { arrayData = new T[maxIndex - minIndex + 1]; } diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/DFA.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/DFA.cs index 42facd94a..97b7ac906 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/DFA.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/DFA.cs @@ -68,7 +68,8 @@ namespace Antlr4.Runtime.Dfa private int nextStateNumber; - public DFA(ATNState atnStartState) : this(atnStartState, 0) + public DFA(ATNState atnStartState) + : this(atnStartState, 0) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/DFASerializer.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/DFASerializer.cs index bbf03ef8f..95f07092b 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/DFASerializer.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/DFASerializer.cs @@ -53,14 +53,14 @@ namespace Antlr4.Runtime.Dfa [Nullable] internal readonly ATN atn; - public DFASerializer(DFA dfa, string[] tokenNames) : this(dfa, tokenNames, null, - null) + public DFASerializer(DFA dfa, string[] tokenNames) + : this(dfa, tokenNames, null, null) { } - public DFASerializer(DFA dfa, IRecognizer parser) : this(dfa, parser - != null ? parser.TokenNames : null, parser != null ? parser.RuleNames : null - , parser != null ? parser.Atn : null) + public DFASerializer(DFA dfa, IRecognizer parser) + : this(dfa, parser != null ? parser.TokenNames : null, parser != null ? parser.RuleNames + : null, parser != null ? parser.Atn : null) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/LexerDFASerializer.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/LexerDFASerializer.cs index 0d0ec0886..a0bff3865 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/LexerDFASerializer.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/LexerDFASerializer.cs @@ -35,7 +35,8 @@ namespace Antlr4.Runtime.Dfa { public class LexerDFASerializer : DFASerializer { - public LexerDFASerializer(DFA dfa) : base(dfa, (string[])null) + public LexerDFASerializer(DFA dfa) + : base(dfa, (string[])null) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/SingletonEdgeMap`1.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/SingletonEdgeMap`1.cs index 3c8c0136b..ffc0b960b 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/SingletonEdgeMap`1.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/SingletonEdgeMap`1.cs @@ -41,14 +41,15 @@ namespace Antlr4.Runtime.Dfa private readonly T value; - public SingletonEdgeMap(int minIndex, int maxIndex) : base(minIndex, maxIndex) + public SingletonEdgeMap(int minIndex, int maxIndex) + : base(minIndex, maxIndex) { this.key = 0; this.value = null; } - public SingletonEdgeMap(int minIndex, int maxIndex, int key, T value) : base(minIndex - , maxIndex) + public SingletonEdgeMap(int minIndex, int maxIndex, int key, T value) + : base(minIndex, maxIndex) { if (key >= minIndex && key <= maxIndex) { diff --git a/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap`1.cs b/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap`1.cs index 42d18eec4..cc8aaca6d 100644 --- a/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap`1.cs +++ b/runtime/CSharp/Antlr4.Runtime/Dfa/SparseEdgeMap`1.cs @@ -45,20 +45,20 @@ namespace Antlr4.Runtime.Dfa private readonly List values; - public SparseEdgeMap(int minIndex, int maxIndex) : this(minIndex, maxIndex, DefaultMaxSize - ) + public SparseEdgeMap(int minIndex, int maxIndex) + : this(minIndex, maxIndex, DefaultMaxSize) { } - public SparseEdgeMap(int minIndex, int maxIndex, int maxSparseSize) : base(minIndex - , maxIndex) + public SparseEdgeMap(int minIndex, int maxIndex, int maxSparseSize) + : base(minIndex, maxIndex) { this.keys = new int[maxSparseSize]; this.values = new List(maxSparseSize); } private SparseEdgeMap(Antlr4.Runtime.Dfa.SparseEdgeMap map, int maxSparseSize) - : base(map.minIndex, map.maxIndex) + : base(map.minIndex, map.maxIndex) { if (maxSparseSize < map.values.Count) { diff --git a/runtime/CSharp/Antlr4.Runtime/DiagnosticErrorListener.cs b/runtime/CSharp/Antlr4.Runtime/DiagnosticErrorListener.cs index 1f0fd311d..d22f52da7 100644 --- a/runtime/CSharp/Antlr4.Runtime/DiagnosticErrorListener.cs +++ b/runtime/CSharp/Antlr4.Runtime/DiagnosticErrorListener.cs @@ -74,7 +74,8 @@ namespace Antlr4.Runtime /// which only /// reports exact ambiguities. /// - public DiagnosticErrorListener() : this(true) + public DiagnosticErrorListener() + : this(true) { } diff --git a/runtime/CSharp/Antlr4.Runtime/FailedPredicateException.cs b/runtime/CSharp/Antlr4.Runtime/FailedPredicateException.cs index 22e97cd5f..3dfbd82b9 100644 --- a/runtime/CSharp/Antlr4.Runtime/FailedPredicateException.cs +++ b/runtime/CSharp/Antlr4.Runtime/FailedPredicateException.cs @@ -55,18 +55,20 @@ namespace Antlr4.Runtime private readonly string predicate; - public FailedPredicateException(Parser recognizer) : this(recognizer, null) + public FailedPredicateException(Parser recognizer) + : this(recognizer, null) { } - public FailedPredicateException(Parser recognizer, string predicate) : this(recognizer - , predicate, null) + public FailedPredicateException(Parser recognizer, string predicate) + : this(recognizer, predicate, null) { } public FailedPredicateException(Parser recognizer, string predicate, string message - ) : base(FormatMessage(predicate, message), recognizer, ((ITokenStream)recognizer - .InputStream), recognizer._ctx) + ) + : base(FormatMessage(predicate, message), recognizer, ((ITokenStream)recognizer.InputStream + ), recognizer._ctx) { ATNState s = recognizer.Interpreter.atn.states[recognizer.State]; AbstractPredicateTransition trans = (AbstractPredicateTransition)s.Transition(0); diff --git a/runtime/CSharp/Antlr4.Runtime/InputMismatchException.cs b/runtime/CSharp/Antlr4.Runtime/InputMismatchException.cs index 2422e421d..15ac83841 100644 --- a/runtime/CSharp/Antlr4.Runtime/InputMismatchException.cs +++ b/runtime/CSharp/Antlr4.Runtime/InputMismatchException.cs @@ -47,8 +47,8 @@ namespace Antlr4.Runtime { private const long serialVersionUID = 1532568338707443067L; - public InputMismatchException(Parser recognizer) : base(recognizer, ((ITokenStream - )recognizer.InputStream), recognizer._ctx) + public InputMismatchException(Parser recognizer) + : base(recognizer, ((ITokenStream)recognizer.InputStream), recognizer._ctx) { this.OffendingToken = recognizer.CurrentToken; } diff --git a/runtime/CSharp/Antlr4.Runtime/LexerNoViableAltException.cs b/runtime/CSharp/Antlr4.Runtime/LexerNoViableAltException.cs index 0b1fbdb7a..210884f86 100644 --- a/runtime/CSharp/Antlr4.Runtime/LexerNoViableAltException.cs +++ b/runtime/CSharp/Antlr4.Runtime/LexerNoViableAltException.cs @@ -51,7 +51,8 @@ namespace Antlr4.Runtime private readonly ATNConfigSet deadEndConfigs; public LexerNoViableAltException(Lexer lexer, ICharStream input, int startIndex, - ATNConfigSet deadEndConfigs) : base(lexer, input) + ATNConfigSet deadEndConfigs) + : base(lexer, input) { this.startIndex = startIndex; this.deadEndConfigs = deadEndConfigs; diff --git a/runtime/CSharp/Antlr4.Runtime/Misc/Array2DHashSet`1.cs b/runtime/CSharp/Antlr4.Runtime/Misc/Array2DHashSet`1.cs index 947c06aa2..326d8cff0 100644 --- a/runtime/CSharp/Antlr4.Runtime/Misc/Array2DHashSet`1.cs +++ b/runtime/CSharp/Antlr4.Runtime/Misc/Array2DHashSet`1.cs @@ -61,12 +61,13 @@ namespace Antlr4.Runtime.Misc protected internal int initialBucketCapacity = InitalBucketCapacity; - public Array2DHashSet() : this(null, InitalCapacity, InitalBucketCapacity) + public Array2DHashSet() + : this(null, InitalCapacity, InitalBucketCapacity) { } - public Array2DHashSet(EqualityComparer comparator) : this(comparator, InitalCapacity - , InitalBucketCapacity) + public Array2DHashSet(EqualityComparer comparator) + : this(comparator, InitalCapacity, InitalBucketCapacity) { } @@ -436,7 +437,8 @@ namespace Antlr4.Runtime.Misc return true; } - public virtual bool AddAll<_T0>(ICollection<_T0> c) where _T0:T + public virtual bool AddAll<_T0>(ICollection<_T0> c) + where _T0 : T { bool changed = false; foreach (T o in c) diff --git a/runtime/CSharp/Antlr4.Runtime/Misc/IntervalSet.cs b/runtime/CSharp/Antlr4.Runtime/Misc/IntervalSet.cs index e487e35c9..33fc5aaa7 100644 --- a/runtime/CSharp/Antlr4.Runtime/Misc/IntervalSet.cs +++ b/runtime/CSharp/Antlr4.Runtime/Misc/IntervalSet.cs @@ -73,7 +73,8 @@ namespace Antlr4.Runtime.Misc this.intervals = intervals; } - public IntervalSet(Antlr4.Runtime.Misc.IntervalSet set) : this() + public IntervalSet(Antlr4.Runtime.Misc.IntervalSet set) + : this() { AddAll(set); } diff --git a/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs b/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs index 2275dfb68..32c1999d3 100644 --- a/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs +++ b/runtime/CSharp/Antlr4.Runtime/Misc/ParseCanceledException.cs @@ -59,7 +59,8 @@ namespace Antlr4.Runtime.Misc { } - public ParseCanceledException(string message) : base(message) + public ParseCanceledException(string message) + : base(message) { } diff --git a/runtime/CSharp/Antlr4.Runtime/Misc/TestRig.cs b/runtime/CSharp/Antlr4.Runtime/Misc/TestRig.cs index b6da8d41c..5b982f2ec 100644 --- a/runtime/CSharp/Antlr4.Runtime/Misc/TestRig.cs +++ b/runtime/CSharp/Antlr4.Runtime/Misc/TestRig.cs @@ -265,7 +265,8 @@ namespace Antlr4.Runtime.Misc /// /// protected internal virtual void Process<_T0>(Lexer lexer, Type<_T0> parserClass, - Parser parser, Stream @is, StreamReader r) where _T0:Parser + Parser parser, Stream @is, StreamReader r) + where _T0 : Parser { try { diff --git a/runtime/CSharp/Antlr4.Runtime/NoViableAltException.cs b/runtime/CSharp/Antlr4.Runtime/NoViableAltException.cs index 4187e0899..404080379 100644 --- a/runtime/CSharp/Antlr4.Runtime/NoViableAltException.cs +++ b/runtime/CSharp/Antlr4.Runtime/NoViableAltException.cs @@ -69,15 +69,16 @@ namespace Antlr4.Runtime [NotNull] private readonly IToken startToken; - public NoViableAltException(Parser recognizer) : this(recognizer, ((ITokenStream) - recognizer.InputStream), recognizer.CurrentToken, recognizer.CurrentToken, null - , recognizer._ctx) + public NoViableAltException(Parser recognizer) + : this(recognizer, ((ITokenStream)recognizer.InputStream), recognizer.CurrentToken + , recognizer.CurrentToken, null, recognizer._ctx) { } public NoViableAltException(IRecognizer recognizer, ITokenStream input , IToken startToken, IToken offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext - ctx) : base(recognizer, input, ctx) + ctx) + : base(recognizer, input, ctx) { // LL(1) error this.deadEndConfigs = deadEndConfigs; diff --git a/runtime/CSharp/Antlr4.Runtime/ParserRuleContext.cs b/runtime/CSharp/Antlr4.Runtime/ParserRuleContext.cs index 789bb6ca2..f44faaa46 100644 --- a/runtime/CSharp/Antlr4.Runtime/ParserRuleContext.cs +++ b/runtime/CSharp/Antlr4.Runtime/ParserRuleContext.cs @@ -153,7 +153,8 @@ namespace Antlr4.Runtime } public ParserRuleContext(Antlr4.Runtime.ParserRuleContext parent, int invokingStateNumber - ) : base(parent, invokingStateNumber) + ) + : base(parent, invokingStateNumber) { } @@ -235,7 +236,8 @@ namespace Antlr4.Runtime return children != null && i >= 0 && i < children.Count ? children[i] : null; } - public virtual T GetChild(int i) where T:IParseTree + public virtual T GetChild(int i) + where T : IParseTree { if (children == null || i < 0 || i >= children.Count) { @@ -322,15 +324,18 @@ namespace Antlr4.Runtime #endif } - public virtual T GetRuleContext(int i) where T:Antlr4.Runtime.ParserRuleContext + public virtual T GetRuleContext(int i) + where T : Antlr4.Runtime.ParserRuleContext { return GetChild(i); } #if NET_4_5 - public virtual IReadOnlyList GetRuleContexts() where T:Antlr4.Runtime.ParserRuleContext + public virtual IReadOnlyList GetRuleContexts() + where T : Antlr4.Runtime.ParserRuleContext #else - public virtual T[] GetRuleContexts() where T:Antlr4.Runtime.ParserRuleContext + public virtual T[] GetRuleContexts() + where T : Antlr4.Runtime.ParserRuleContext #endif { if (children == null) diff --git a/runtime/CSharp/Antlr4.Runtime/ProxyParserErrorListener.cs b/runtime/CSharp/Antlr4.Runtime/ProxyParserErrorListener.cs index 3167e5562..2c7f96e21 100644 --- a/runtime/CSharp/Antlr4.Runtime/ProxyParserErrorListener.cs +++ b/runtime/CSharp/Antlr4.Runtime/ProxyParserErrorListener.cs @@ -39,7 +39,8 @@ namespace Antlr4.Runtime public class ProxyParserErrorListener : ProxyErrorListener, IParserErrorListener { public ProxyParserErrorListener(ICollection> delegates - ) : base(delegates) + ) + : base(delegates) { } diff --git a/runtime/CSharp/Antlr4.Runtime/RecognitionException.cs b/runtime/CSharp/Antlr4.Runtime/RecognitionException.cs index a53557ea9..62323c7ff 100644 --- a/runtime/CSharp/Antlr4.Runtime/RecognitionException.cs +++ b/runtime/CSharp/Antlr4.Runtime/RecognitionException.cs @@ -95,7 +95,8 @@ namespace Antlr4.Runtime } } - public RecognitionException(string message, IRecognizer recognizer, IIntStream input, ParserRuleContext ctx) : base(message) + public RecognitionException(string message, IRecognizer recognizer, IIntStream input, ParserRuleContext ctx) + : base(message) { this.recognizer = recognizer; this.input = input; diff --git a/runtime/CSharp/Antlr4.Runtime/TokenStreamRewriter.cs b/runtime/CSharp/Antlr4.Runtime/TokenStreamRewriter.cs index ac5a32aea..94ddb91bf 100644 --- a/runtime/CSharp/Antlr4.Runtime/TokenStreamRewriter.cs +++ b/runtime/CSharp/Antlr4.Runtime/TokenStreamRewriter.cs @@ -149,8 +149,8 @@ namespace Antlr4.Runtime internal class InsertBeforeOp : TokenStreamRewriter.RewriteOperation { - public InsertBeforeOp(ITokenStream tokens, int index, object text) : base(tokens, - index, text) + public InsertBeforeOp(ITokenStream tokens, int index, object text) + : base(tokens, index, text) { } @@ -177,8 +177,8 @@ namespace Antlr4.Runtime { protected internal int lastIndex; - public ReplaceOp(ITokenStream tokens, int from, int to, object text) : base(tokens - , from, text) + public ReplaceOp(ITokenStream tokens, int from, int to, object text) + : base(tokens, from, text) { lastIndex = to; } diff --git a/runtime/CSharp/Antlr4.Runtime/Tree/ErrorNodeImpl.cs b/runtime/CSharp/Antlr4.Runtime/Tree/ErrorNodeImpl.cs index 871a36f73..5bda57371 100644 --- a/runtime/CSharp/Antlr4.Runtime/Tree/ErrorNodeImpl.cs +++ b/runtime/CSharp/Antlr4.Runtime/Tree/ErrorNodeImpl.cs @@ -46,7 +46,8 @@ namespace Antlr4.Runtime.Tree /// public class ErrorNodeImpl : TerminalNodeImpl, IErrorNode { - public ErrorNodeImpl(IToken token) : base(token) + public ErrorNodeImpl(IToken token) + : base(token) { } diff --git a/runtime/CSharp/Antlr4.Runtime/UnbufferedCharStream.cs b/runtime/CSharp/Antlr4.Runtime/UnbufferedCharStream.cs index 29e6c0d86..ac2bd5c71 100644 --- a/runtime/CSharp/Antlr4.Runtime/UnbufferedCharStream.cs +++ b/runtime/CSharp/Antlr4.Runtime/UnbufferedCharStream.cs @@ -136,7 +136,8 @@ namespace Antlr4.Runtime /// Useful for subclasses that pull char from other than this.input. /// Useful for subclasses that pull char from other than this.input. - public UnbufferedCharStream() : this(256) + public UnbufferedCharStream() + : this(256) { } @@ -148,22 +149,25 @@ namespace Antlr4.Runtime data = new char[bufferSize]; } - public UnbufferedCharStream(Stream input) : this(input, 256) + public UnbufferedCharStream(Stream input) + : this(input, 256) { } - public UnbufferedCharStream(TextReader input) : this(input, 256) + public UnbufferedCharStream(TextReader input) + : this(input, 256) { } - public UnbufferedCharStream(Stream input, int bufferSize) : this(bufferSize) + public UnbufferedCharStream(Stream input, int bufferSize) + : this(bufferSize) { this.input = new StreamReader(input); Fill(1); } - public UnbufferedCharStream(TextReader input, int bufferSize) : this(bufferSize - ) + public UnbufferedCharStream(TextReader input, int bufferSize) + : this(bufferSize) { // prime this.input = input; diff --git a/runtime/CSharp/Antlr4.Runtime/UnbufferedTokenStream.cs b/runtime/CSharp/Antlr4.Runtime/UnbufferedTokenStream.cs index 5f08b3d57..52482e8cb 100644 --- a/runtime/CSharp/Antlr4.Runtime/UnbufferedTokenStream.cs +++ b/runtime/CSharp/Antlr4.Runtime/UnbufferedTokenStream.cs @@ -128,7 +128,8 @@ namespace Antlr4.Runtime /// protected internal int currentTokenIndex = 0; - public UnbufferedTokenStream(ITokenSource tokenSource) : this(tokenSource, 256) + public UnbufferedTokenStream(ITokenSource tokenSource) + : this(tokenSource, 256) { }