forked from jasder/antlr
Fix errors in documentation comments
This commit is contained in:
parent
92e77eda26
commit
72968775bd
|
@ -49,7 +49,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This UUID indicates an extension of
|
/// This UUID indicates an extension of
|
||||||
/// <see cref="#ADDED_PRECEDENCE_TRANSITIONS">#ADDED_PRECEDENCE_TRANSITIONS</see>
|
/// <see cref="BaseSerializedUuid"/>
|
||||||
/// for the addition of lexer actions encoded as a sequence of
|
/// for the addition of lexer actions encoded as a sequence of
|
||||||
/// <see cref="ILexerAction">ILexerAction</see>
|
/// <see cref="ILexerAction">ILexerAction</see>
|
||||||
/// instances.
|
/// instances.
|
||||||
|
@ -100,19 +100,19 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines if a particular serialized representation of an ATN supports
|
/// Determines if a particular serialized representation of an ATN supports
|
||||||
/// a particular feature, identified by the
|
/// a particular feature, identified by the
|
||||||
/// <see cref="Sharpen.UUID">Sharpen.UUID</see>
|
/// <see cref="Guid"/>
|
||||||
/// used for serializing
|
/// used for serializing
|
||||||
/// the ATN at the time the feature was first introduced.
|
/// the ATN at the time the feature was first introduced.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="feature">
|
/// <param name="feature">
|
||||||
/// The
|
/// The
|
||||||
/// <see cref="Sharpen.UUID">Sharpen.UUID</see>
|
/// <see cref="Guid"/>
|
||||||
/// marking the first time the feature was
|
/// marking the first time the feature was
|
||||||
/// supported in the serialized ATN.
|
/// supported in the serialized ATN.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="actualUuid">
|
/// <param name="actualUuid">
|
||||||
/// The
|
/// The
|
||||||
/// <see cref="Sharpen.UUID">Sharpen.UUID</see>
|
/// <see cref="Guid"/>
|
||||||
/// of the actual serialized ATN which is
|
/// of the actual serialized ATN which is
|
||||||
/// currently being deserialized.
|
/// currently being deserialized.
|
||||||
/// </param>
|
/// </param>
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// <see cref="hashCode">hashCode</see>
|
/// <see cref="hashCode">hashCode</see>
|
||||||
/// since the hash code is an element
|
/// since the hash code is an element
|
||||||
/// of the performance-critical
|
/// of the performance-critical
|
||||||
/// <see cref="LexerATNConfig.hashCode">LexerATNConfig#hashCode</see>
|
/// <see cref="ATNConfig.GetHashCode()"/>
|
||||||
/// operation.
|
/// operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly int hashCode;
|
private readonly int hashCode;
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// Implements the
|
/// Implements the
|
||||||
/// <code>channel</code>
|
/// <code>channel</code>
|
||||||
/// lexer action by calling
|
/// lexer action by calling
|
||||||
/// <see cref="Antlr4.Runtime.Lexer.Channel(int)">Antlr4.Runtime.Lexer.Channel(int)</see>
|
/// <see cref="Lexer.Channel"/>
|
||||||
/// with the assigned channel.
|
/// with the assigned channel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <author>Sam Harwell</author>
|
/// <author>Sam Harwell</author>
|
||||||
|
@ -54,7 +54,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="channel">
|
/// <param name="channel">
|
||||||
/// The channel value to pass to
|
/// The channel value to pass to
|
||||||
/// <see cref="Antlr4.Runtime.Lexer.Channel(int)">Antlr4.Runtime.Lexer.Channel(int)</see>
|
/// <see cref="Lexer.Channel"/>
|
||||||
/// .
|
/// .
|
||||||
/// </param>
|
/// </param>
|
||||||
public LexerChannelAction(int channel)
|
public LexerChannelAction(int channel)
|
||||||
|
@ -102,7 +102,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <inheritDoc></inheritDoc>
|
/// <inheritDoc></inheritDoc>
|
||||||
/// <p>This action is implemented by calling
|
/// <p>This action is implemented by calling
|
||||||
/// <see cref="Antlr4.Runtime.Lexer.Channel(int)">Antlr4.Runtime.Lexer.Channel(int)</see>
|
/// <see cref="Lexer.Channel"/>
|
||||||
/// with the
|
/// with the
|
||||||
/// value provided by
|
/// value provided by
|
||||||
/// <see cref="GetChannel()">GetChannel()</see>
|
/// <see cref="GetChannel()">GetChannel()</see>
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <inheritDoc></inheritDoc>
|
/// <inheritDoc></inheritDoc>
|
||||||
/// <p>This action is implemented by calling
|
/// <p>This action is implemented by calling
|
||||||
/// <see cref="Antlr4.Runtime.Lexer.Type(int)">Antlr4.Runtime.Lexer.Type(int)</see>
|
/// <see cref="Lexer.Type"/>
|
||||||
/// with the
|
/// with the
|
||||||
/// value provided by
|
/// value provided by
|
||||||
/// <see cref="GetType()">GetType()</see>
|
/// <see cref="GetType()">GetType()</see>
|
||||||
|
|
|
@ -180,7 +180,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// it adds a new DFA object to that array.
|
/// it adds a new DFA object to that array.
|
||||||
/// <see cref="AddDFAEdge(Antlr4.Runtime.Dfa.DFAState, int, Antlr4.Runtime.Dfa.DFAState)">AddDFAEdge(Antlr4.Runtime.Dfa.DFAState, int, Antlr4.Runtime.Dfa.DFAState)</see>
|
/// <see cref="AddDFAEdge(Antlr4.Runtime.Dfa.DFAState, int, Antlr4.Runtime.Dfa.DFAState)">AddDFAEdge(Antlr4.Runtime.Dfa.DFAState, int, Antlr4.Runtime.Dfa.DFAState)</see>
|
||||||
/// locks on the DFA for the current decision when setting the
|
/// locks on the DFA for the current decision when setting the
|
||||||
/// <see cref="DFAState#edges">DFAState#edges</see>
|
/// <see cref="DFAState.edges"/>
|
||||||
/// field.
|
/// field.
|
||||||
/// <see cref="AddDFAState(Antlr4.Runtime.Dfa.DFA, ATNConfigSet, PredictionContextCache)">AddDFAState(Antlr4.Runtime.Dfa.DFA, ATNConfigSet, PredictionContextCache)</see>
|
/// <see cref="AddDFAState(Antlr4.Runtime.Dfa.DFA, ATNConfigSet, PredictionContextCache)">AddDFAState(Antlr4.Runtime.Dfa.DFA, ATNConfigSet, PredictionContextCache)</see>
|
||||||
/// locks on
|
/// locks on
|
||||||
|
@ -204,10 +204,10 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// . Once into the DFA, the DFA simulation does not reference the
|
/// . Once into the DFA, the DFA simulation does not reference the
|
||||||
/// <see cref="Antlr4.Runtime.Dfa.DFA.states">Antlr4.Runtime.Dfa.DFA.states</see>
|
/// <see cref="Antlr4.Runtime.Dfa.DFA.states">Antlr4.Runtime.Dfa.DFA.states</see>
|
||||||
/// map. It follows the
|
/// map. It follows the
|
||||||
/// <see cref="DFAState#edges">DFAState#edges</see>
|
/// <see cref="DFAState.edges"/>
|
||||||
/// field to new
|
/// field to new
|
||||||
/// targets. The DFA simulator will either find
|
/// targets. The DFA simulator will either find
|
||||||
/// <see cref="DFAState#edges">DFAState#edges</see>
|
/// <see cref="DFAState.edges"/>
|
||||||
/// to be
|
/// to be
|
||||||
/// <code>null</code>
|
/// <code>null</code>
|
||||||
/// , to be non-
|
/// , to be non-
|
||||||
|
@ -240,13 +240,13 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// parser.
|
/// parser.
|
||||||
/// <see cref="Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Interpreter()">getInterpreter()</see>
|
/// <see cref="Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}.Interpreter()">getInterpreter()</see>
|
||||||
/// .
|
/// .
|
||||||
/// <see cref="PredictionMode(PredictionMode)">setPredictionMode</see>
|
/// <see cref="PredictionMode"/>
|
||||||
/// <code>(</code>
|
/// <code>(</code>
|
||||||
/// <see cref="PredictionMode.Sll">PredictionMode.Sll</see>
|
/// <see cref="Atn.PredictionMode.Sll"/>
|
||||||
/// <code>)</code>
|
/// <code>)</code>
|
||||||
/// ;
|
/// ;
|
||||||
/// parser.
|
/// parser.
|
||||||
/// <see cref="Antlr4.Runtime.Parser.ErrorHandler(IAntlrErrorStrategy)">setErrorHandler</see>
|
/// <see cref="Parser.ErrorHandler"/>
|
||||||
/// (new
|
/// (new
|
||||||
/// <see cref="Antlr4.Runtime.BailErrorStrategy">Antlr4.Runtime.BailErrorStrategy</see>
|
/// <see cref="Antlr4.Runtime.BailErrorStrategy">Antlr4.Runtime.BailErrorStrategy</see>
|
||||||
/// ());
|
/// ());
|
||||||
|
@ -1444,7 +1444,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// set.
|
/// set.
|
||||||
/// <ol>
|
/// <ol>
|
||||||
/// <li>Evaluate the precedence predicates for each configuration using
|
/// <li>Evaluate the precedence predicates for each configuration using
|
||||||
/// <see cref="SemanticContext.EvalPrecedence(Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}, Antlr4.Runtime.RuleContext)">SemanticContext.EvalPrecedence(Antlr4.Runtime.Recognizer<Symbol, ATNInterpreter>, Antlr4.Runtime.RuleContext)</see>
|
/// <see cref="SemanticContext.EvalPrecedence{Symbol, ATNInterpreter}(Antlr4.Runtime.Recognizer{Symbol, ATNInterpreter}, Antlr4.Runtime.RuleContext)"/>
|
||||||
/// .</li>
|
/// .</li>
|
||||||
/// <li>Remove all configurations which predict an alternative greater than
|
/// <li>Remove all configurations which predict an alternative greater than
|
||||||
/// 1, for which another configuration that predicts alternative 1 is in the
|
/// 1, for which another configuration that predicts alternative 1 is in the
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// The hash code is only a function of the
|
/// The hash code is only a function of the
|
||||||
/// <see cref="ATNState.stateNumber">ATNState.stateNumber</see>
|
/// <see cref="ATNState.stateNumber">ATNState.stateNumber</see>
|
||||||
/// and
|
/// and
|
||||||
/// <see cref="ATNConfig#context">ATNConfig#context</see>
|
/// <see cref="ATNConfig.context"/>
|
||||||
/// .
|
/// .
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override int GetHashCode(ATNConfig o)
|
public override int GetHashCode(ATNConfig o)
|
||||||
|
@ -393,7 +393,7 @@ namespace Antlr4.Runtime.Atn
|
||||||
/// <code>(s, j, ctx, _)</code>
|
/// <code>(s, j, ctx, _)</code>
|
||||||
/// for
|
/// for
|
||||||
/// <code>i!=j</code>
|
/// <code>i!=j</code>
|
||||||
/// .
|
/// .</p>
|
||||||
/// <p/>
|
/// <p/>
|
||||||
/// Reduce these configuration subsets to the set of possible alternatives.
|
/// Reduce these configuration subsets to the set of possible alternatives.
|
||||||
/// You can compute the alternative subsets in one pass as follows:
|
/// You can compute the alternative subsets in one pass as follows:
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace Antlr4.Runtime
|
||||||
/// <code>myparser.setErrorHandler(new BailErrorStrategy());</code>
|
/// <code>myparser.setErrorHandler(new BailErrorStrategy());</code>
|
||||||
/// </p>
|
/// </p>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="Parser.ErrorHandler(IAntlrErrorStrategy)">Parser.ErrorHandler(IAntlrErrorStrategy)</seealso>
|
/// <seealso cref="Parser.ErrorHandler"/>
|
||||||
public class BailErrorStrategy : DefaultErrorStrategy
|
public class BailErrorStrategy : DefaultErrorStrategy
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -49,9 +49,9 @@ namespace Antlr4.Runtime
|
||||||
/// . If your
|
/// . If your
|
||||||
/// parser requires the token stream filter tokens to only those on a particular
|
/// parser requires the token stream filter tokens to only those on a particular
|
||||||
/// channel, such as
|
/// channel, such as
|
||||||
/// <see cref="IToken.DefaultChannel">IToken.DefaultChannel</see>
|
/// <see cref="TokenConstants.DefaultChannel"/>
|
||||||
/// or
|
/// or
|
||||||
/// <see cref="IToken.HiddenChannel">IToken.HiddenChannel</see>
|
/// <see cref="TokenConstants.HiddenChannel"/>
|
||||||
/// , use a filtering token stream such a
|
/// , use a filtering token stream such a
|
||||||
/// <see cref="CommonTokenStream">CommonTokenStream</see>
|
/// <see cref="CommonTokenStream">CommonTokenStream</see>
|
||||||
/// .</p>
|
/// .</p>
|
||||||
|
@ -104,7 +104,7 @@ namespace Antlr4.Runtime
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether the
|
/// Indicates whether the
|
||||||
/// <see cref="IToken.Eof">IToken.Eof</see>
|
/// <see cref="TokenConstants.Eof"/>
|
||||||
/// token has been fetched from
|
/// token has been fetched from
|
||||||
/// <see cref="tokenSource">tokenSource</see>
|
/// <see cref="tokenSource">tokenSource</see>
|
||||||
/// and added to
|
/// and added to
|
||||||
|
@ -129,7 +129,7 @@ namespace Antlr4.Runtime
|
||||||
/// : The check to prevent adding multiple EOF symbols into
|
/// : The check to prevent adding multiple EOF symbols into
|
||||||
/// <see cref="tokens">tokens</see>
|
/// <see cref="tokens">tokens</see>
|
||||||
/// is trivial with this field.</li>
|
/// is trivial with this field.</li>
|
||||||
/// <ul>
|
/// </ul>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal bool fetchedEOF;
|
protected internal bool fetchedEOF;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace Antlr4.Runtime
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty
|
/// An empty
|
||||||
/// <see cref="Antlr4.Runtime.Misc.Tuple2{T1, T2}">Antlr4.Runtime.Misc.Tuple2<T1, T2></see>
|
/// <see cref="Tuple{T1, T2}"/>
|
||||||
/// which is used as the default value of
|
/// which is used as the default value of
|
||||||
/// <see cref="source">source</see>
|
/// <see cref="source">source</see>
|
||||||
/// for tokens that do not have a source.
|
/// for tokens that do not have a source.
|
||||||
|
@ -51,38 +51,22 @@ namespace Antlr4.Runtime
|
||||||
protected internal static readonly Tuple<ITokenSource, ICharStream> EmptySource = Tuple.Create<ITokenSource, ICharStream>(null, null);
|
protected internal static readonly Tuple<ITokenSource, ICharStream> EmptySource = Tuple.Create<ITokenSource, ICharStream>(null, null);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="Type"/> property.
|
||||||
/// <see cref="Type()">Type()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="Type(int)">Type(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int type;
|
protected internal int type;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="Line"/> property.
|
||||||
/// <see cref="Line()">Line()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="Line(int)">Line(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int line;
|
protected internal int line;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="Column"/> property.
|
||||||
/// <see cref="Column()">Column()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="Column(int)">Column(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int charPositionInLine = -1;
|
protected internal int charPositionInLine = -1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="Channel"/> property.
|
||||||
/// <see cref="Channel()">Channel()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="Channel(int)">Channel(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int channel = TokenConstants.DefaultChannel;
|
protected internal int channel = TokenConstants.DefaultChannel;
|
||||||
|
|
||||||
|
@ -99,47 +83,30 @@ namespace Antlr4.Runtime
|
||||||
/// <see cref="CommonTokenFactory">CommonTokenFactory</see>
|
/// <see cref="CommonTokenFactory">CommonTokenFactory</see>
|
||||||
/// from
|
/// from
|
||||||
/// the same source and input stream share a reference to the same
|
/// the same source and input stream share a reference to the same
|
||||||
/// <see cref="Antlr4.Runtime.Misc.Tuple2{T1, T2}">Antlr4.Runtime.Misc.Tuple2<T1, T2></see>
|
/// <see cref="Tuple{T1, T2}"/>
|
||||||
/// containing these values.</p>
|
/// containing these values.</p>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[NotNull]
|
[NotNull]
|
||||||
protected internal Tuple<ITokenSource, ICharStream> source;
|
protected internal Tuple<ITokenSource, ICharStream> source;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="Text"/> property.
|
||||||
/// <see cref="Text()">Text()</see>
|
|
||||||
/// when the token text is
|
|
||||||
/// explicitly set in the constructor or via
|
|
||||||
/// <see cref="Text(string)">Text(string)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="Text()">Text()</seealso>
|
/// <seealso cref="Text"/>
|
||||||
protected internal string text;
|
protected internal string text;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="TokenIndex"/> property.
|
||||||
/// <see cref="TokenIndex()">TokenIndex()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="TokenIndex(int)">TokenIndex(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int index = -1;
|
protected internal int index = -1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="StartIndex"/> property.
|
||||||
/// <see cref="StartIndex()">StartIndex()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="SetStartIndex(int)">SetStartIndex(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int start;
|
protected internal int start;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="StopIndex"/> property.
|
||||||
/// <see cref="StopIndex()">StopIndex()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="SetStopIndex(int)">SetStopIndex(int)</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal int stop;
|
protected internal int stop;
|
||||||
|
|
||||||
|
@ -202,7 +169,7 @@ namespace Antlr4.Runtime
|
||||||
/// <see cref="text">text</see>
|
/// <see cref="text">text</see>
|
||||||
/// field and
|
/// field and
|
||||||
/// the
|
/// the
|
||||||
/// <see cref="Antlr4.Runtime.Misc.Tuple2{T1, T2}">Antlr4.Runtime.Misc.Tuple2<T1, T2></see>
|
/// <see cref="Tuple{T1, T2}"/>
|
||||||
/// stored in
|
/// stored in
|
||||||
/// <see cref="source">source</see>
|
/// <see cref="source">source</see>
|
||||||
/// . Otherwise,
|
/// . Otherwise,
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace Antlr4.Runtime
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether
|
/// Indicates whether
|
||||||
/// <see cref="CommonToken.Text(string)">CommonToken.Text(string)</see>
|
/// <see cref="CommonToken.Text"/>
|
||||||
/// should be called after
|
/// should be called after
|
||||||
/// constructing tokens to explicitly set the text. This is useful for cases
|
/// constructing tokens to explicitly set the text. This is useful for cases
|
||||||
/// where the input stream might not be able to provide arbitrary substrings
|
/// where the input stream might not be able to provide arbitrary substrings
|
||||||
|
|
|
@ -54,12 +54,12 @@ namespace Antlr4.Runtime
|
||||||
/// <p>
|
/// <p>
|
||||||
/// By default, tokens are placed on the default channel
|
/// By default, tokens are placed on the default channel
|
||||||
/// (
|
/// (
|
||||||
/// <see cref="IToken.DefaultChannel">IToken.DefaultChannel</see>
|
/// <see cref="TokenConstants.DefaultChannel"/>
|
||||||
/// ), but may be reassigned by using the
|
/// ), but may be reassigned by using the
|
||||||
/// <code>->channel(HIDDEN)</code>
|
/// <code>->channel(HIDDEN)</code>
|
||||||
/// lexer command, or by using an embedded action to
|
/// lexer command, or by using an embedded action to
|
||||||
/// call
|
/// call
|
||||||
/// <see cref="Lexer.Channel(int)">Lexer.Channel(int)</see>
|
/// <see cref="Lexer.Channel"/>
|
||||||
/// .
|
/// .
|
||||||
/// </p>
|
/// </p>
|
||||||
/// <p>
|
/// <p>
|
||||||
|
@ -78,7 +78,7 @@ namespace Antlr4.Runtime
|
||||||
/// Specifies the channel to use for filtering tokens.
|
/// Specifies the channel to use for filtering tokens.
|
||||||
/// <p>
|
/// <p>
|
||||||
/// The default value is
|
/// The default value is
|
||||||
/// <see cref="IToken.DefaultChannel">IToken.DefaultChannel</see>
|
/// <see cref="TokenConstants.DefaultChannel"/>
|
||||||
/// , which matches the
|
/// , which matches the
|
||||||
/// default channel assigned to tokens created by the lexer.</p>
|
/// default channel assigned to tokens created by the lexer.</p>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
@ -89,7 +89,7 @@ namespace Antlr4.Runtime
|
||||||
/// <see cref="CommonTokenStream">CommonTokenStream</see>
|
/// <see cref="CommonTokenStream">CommonTokenStream</see>
|
||||||
/// using the specified token
|
/// using the specified token
|
||||||
/// source and the default token channel (
|
/// source and the default token channel (
|
||||||
/// <see cref="IToken.DefaultChannel">IToken.DefaultChannel</see>
|
/// <see cref="TokenConstants.DefaultChannel"/>
|
||||||
/// ).
|
/// ).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="tokenSource">The token source.</param>
|
/// <param name="tokenSource">The token source.</param>
|
||||||
|
@ -109,7 +109,7 @@ namespace Antlr4.Runtime
|
||||||
/// or have the
|
/// or have the
|
||||||
/// <see cref="IToken.Type()">IToken.Type()</see>
|
/// <see cref="IToken.Type()">IToken.Type()</see>
|
||||||
/// equal to
|
/// equal to
|
||||||
/// <see cref="IToken.Eof">IToken.Eof</see>
|
/// <see cref="TokenConstants.Eof"/>
|
||||||
/// will be returned by the
|
/// will be returned by the
|
||||||
/// token stream lookahead methods.
|
/// token stream lookahead methods.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Antlr4.Runtime
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a default instance of
|
/// Provides a default instance of
|
||||||
/// <see cref="ConsoleErrorListener">ConsoleErrorListener</see>
|
/// <see cref="ConsoleErrorListener{Symbol}"/>
|
||||||
/// .
|
/// .
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ConsoleErrorListener<Symbol> Instance = new ConsoleErrorListener<Symbol>();
|
public static readonly ConsoleErrorListener<Symbol> Instance = new ConsoleErrorListener<Symbol>();
|
||||||
|
|
|
@ -527,7 +527,7 @@ namespace Antlr4.Runtime
|
||||||
/// , it will have
|
/// , it will have
|
||||||
/// call chain:</p>
|
/// call chain:</p>
|
||||||
/// <pre>
|
/// <pre>
|
||||||
/// stat → expr → atom
|
/// stat → expr → atom
|
||||||
/// </pre>
|
/// </pre>
|
||||||
/// and it will be trying to match the
|
/// and it will be trying to match the
|
||||||
/// <code>')'</code>
|
/// <code>')'</code>
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
/// which is not stored in
|
/// which is not stored in
|
||||||
/// <see cref="states">states</see>
|
/// <see cref="states">states</see>
|
||||||
/// . The
|
/// . The
|
||||||
/// <see cref="DFAState#edges">DFAState#edges</see>
|
/// <see cref="DFAState.edges"/>
|
||||||
/// array for this start state contains outgoing edges
|
/// array for this start state contains outgoing edges
|
||||||
/// supplying individual start states corresponding to specific precedence
|
/// supplying individual start states corresponding to specific precedence
|
||||||
/// values.
|
/// values.
|
||||||
|
@ -199,7 +199,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
/// ; otherwise, it is initialized to a new
|
/// ; otherwise, it is initialized to a new
|
||||||
/// <see cref="DFAState">DFAState</see>
|
/// <see cref="DFAState">DFAState</see>
|
||||||
/// with an empty outgoing
|
/// with an empty outgoing
|
||||||
/// <see cref="DFAState#edges">DFAState#edges</see>
|
/// <see cref="DFAState.edges"/>
|
||||||
/// array to
|
/// array to
|
||||||
/// store the start states for individual precedence values.</li>
|
/// store the start states for individual precedence values.</li>
|
||||||
/// <li>The
|
/// <li>The
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace Antlr4.Runtime.Dfa
|
||||||
/// input a1a2..an, the DFA is in a state that represents the
|
/// input a1a2..an, the DFA is in a state that represents the
|
||||||
/// subset T of the states of the ATN that are reachable from the
|
/// subset T of the states of the ATN that are reachable from the
|
||||||
/// ATN's start state along some path labeled a1a2..an."
|
/// ATN's start state along some path labeled a1a2..an."
|
||||||
/// In conventional NFA→DFA conversion, therefore, the subset T
|
/// In conventional NFA→DFA conversion, therefore, the subset T
|
||||||
/// would be a bitset representing the set of states the
|
/// would be a bitset representing the set of states the
|
||||||
/// ATN could be in. We need to track the alt predicted by each
|
/// ATN could be in. We need to track the alt predicted by each
|
||||||
/// state as well, however. More importantly, we need to maintain
|
/// state as well, however. More importantly, we need to maintain
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace Antlr4.Runtime
|
||||||
/// Gets the name of the underlying input source. This method returns a
|
/// Gets the name of the underlying input source. This method returns a
|
||||||
/// non-null, non-empty string. If such a name is not known, this method
|
/// non-null, non-empty string. If such a name is not known, this method
|
||||||
/// returns
|
/// returns
|
||||||
/// <see cref="IIntStream.UnknownSourceName">IIntStream.UnknownSourceName</see>
|
/// <see cref="IntStreamConstants.UnknownSourceName"/>
|
||||||
/// .
|
/// .
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
string SourceName
|
string SourceName
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace Antlr4.Runtime
|
||||||
/// <see cref="IToken">IToken</see>
|
/// <see cref="IToken">IToken</see>
|
||||||
/// objects.
|
/// objects.
|
||||||
/// <p>If the final token in the list is an
|
/// <p>If the final token in the list is an
|
||||||
/// <see cref="IToken.Eof">IToken.Eof</see>
|
/// <see cref="TokenConstants.Eof"/>
|
||||||
/// token, it will be used
|
/// token, it will be used
|
||||||
/// as the EOF token for every call to
|
/// as the EOF token for every call to
|
||||||
/// <see cref="NextToken()">NextToken()</see>
|
/// <see cref="NextToken()">NextToken()</see>
|
||||||
|
@ -89,11 +89,7 @@ namespace Antlr4.Runtime
|
||||||
protected internal IToken eofToken;
|
protected internal IToken eofToken;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the backing field for
|
/// This is the backing field for the <see cref="TokenFactory"/> property.
|
||||||
/// <see cref="TokenFactory()">TokenFactory()</see>
|
|
||||||
/// and
|
|
||||||
/// <see cref="setTokenFactory">setTokenFactory</see>
|
|
||||||
/// .
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private ITokenFactory _factory = CommonTokenFactory.Default;
|
private ITokenFactory _factory = CommonTokenFactory.Default;
|
||||||
|
|
||||||
|
|
|
@ -143,10 +143,10 @@ namespace Antlr4.Runtime.Misc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Convert array of strings to string→index map.</summary>
|
/// <summary>Convert array of strings to string→index map.</summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Convert array of strings to string→index map. Useful for
|
/// Convert array of strings to string→index map. Useful for
|
||||||
/// converting rulenames to name→ruleindex map.
|
/// converting rulenames to name→ruleindex map.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static IDictionary<string, int> ToMap(string[] keys)
|
public static IDictionary<string, int> ToMap(string[] keys)
|
||||||
{
|
{
|
||||||
|
|
|
@ -239,11 +239,11 @@ namespace Antlr4.Runtime
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// You may have multiple, named streams of rewrite operations.
|
/// You may have multiple, named streams of rewrite operations.
|
||||||
/// I'm calling these things "programs."
|
/// I'm calling these things "programs."
|
||||||
/// Maps String (name) → rewrite (List)
|
/// Maps String (name) → rewrite (List)
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected internal readonly IDictionary<string, IList<TokenStreamRewriter.RewriteOperation>> programs;
|
protected internal readonly IDictionary<string, IList<TokenStreamRewriter.RewriteOperation>> programs;
|
||||||
|
|
||||||
/// <summary>Map String (program name) → Integer index</summary>
|
/// <summary>Map String (program name) → Integer index</summary>
|
||||||
protected internal readonly IDictionary<string, int> lastRewriteTokenIndexes;
|
protected internal readonly IDictionary<string, int> lastRewriteTokenIndexes;
|
||||||
|
|
||||||
public TokenStreamRewriter(ITokenStream tokens)
|
public TokenStreamRewriter(ITokenStream tokens)
|
||||||
|
@ -578,7 +578,7 @@ namespace Antlr4.Runtime
|
||||||
/// insert with replace and delete this replace.
|
/// insert with replace and delete this replace.
|
||||||
/// 3. throw exception if index in same range as previous 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.
|
/// Don't actually delete; make op null in list. Easier to walk list.
|
||||||
/// Later we can throw as we add to index → op map.
|
/// 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
|
/// 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
|
/// inserted stuff would be before the replace range. But, if you
|
||||||
/// add tokens in front of a method body '{' and then delete the method
|
/// add tokens in front of a method body '{' and then delete the method
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <code>label</code>
|
/// <code>label</code>
|
||||||
/// .
|
/// .
|
||||||
/// <p>For example, for pattern
|
/// <p>For example, for pattern
|
||||||
/// <code><id:ID></code>
|
/// <code><id:ID></code>
|
||||||
/// ,
|
/// ,
|
||||||
/// <code>get("id")</code>
|
/// <code>get("id")</code>
|
||||||
/// returns the
|
/// returns the
|
||||||
|
@ -146,9 +146,9 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <code>null</code>
|
/// <code>null</code>
|
||||||
/// .</p>
|
/// .</p>
|
||||||
/// <p>Pattern tags like
|
/// <p>Pattern tags like
|
||||||
/// <code><ID></code>
|
/// <code><ID></code>
|
||||||
/// and
|
/// and
|
||||||
/// <code><expr></code>
|
/// <code><expr></code>
|
||||||
/// without labels are
|
/// without labels are
|
||||||
/// considered to be labeled with
|
/// considered to be labeled with
|
||||||
/// <code>ID</code>
|
/// <code>ID</code>
|
||||||
|
@ -194,15 +194,15 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// the result will contain <em>all</em> of the following.</p>
|
/// the result will contain <em>all</em> of the following.</p>
|
||||||
/// <ul>
|
/// <ul>
|
||||||
/// <li>Parse tree nodes matching tags of the form
|
/// <li>Parse tree nodes matching tags of the form
|
||||||
/// <code><foo:anyRuleName></code>
|
/// <code><foo:anyRuleName></code>
|
||||||
/// and
|
/// and
|
||||||
/// <code><foo:AnyTokenName></code>
|
/// <code><foo:AnyTokenName></code>
|
||||||
/// .</li>
|
/// .</li>
|
||||||
/// <li>Parse tree nodes matching tags of the form
|
/// <li>Parse tree nodes matching tags of the form
|
||||||
/// <code><anyLabel:foo></code>
|
/// <code><anyLabel:foo></code>
|
||||||
/// .</li>
|
/// .</li>
|
||||||
/// <li>Parse tree nodes matching tags of the form
|
/// <li>Parse tree nodes matching tags of the form
|
||||||
/// <code><foo></code>
|
/// <code><foo></code>
|
||||||
/// .</li>
|
/// .</li>
|
||||||
/// </ul>
|
/// </ul>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
@ -227,9 +227,9 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Return a mapping from label → [list of nodes].</summary>
|
/// <summary>Return a mapping from label → [list of nodes].</summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Return a mapping from label → [list of nodes].
|
/// Return a mapping from label → [list of nodes].
|
||||||
/// <p>The map includes special entries corresponding to the names of rules and
|
/// <p>The map includes special entries corresponding to the names of rules and
|
||||||
/// tokens referenced in tags in the original pattern. For additional
|
/// tokens referenced in tags in the original pattern. For additional
|
||||||
/// information, see the description of
|
/// information, see the description of
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A pattern like
|
/// A pattern like
|
||||||
/// <code><ID> = <expr>;</code>
|
/// <code><ID> = <expr>;</code>
|
||||||
/// converted to a
|
/// converted to a
|
||||||
/// <see cref="Antlr4.Runtime.Tree.IParseTree">Antlr4.Runtime.Tree.IParseTree</see>
|
/// <see cref="Antlr4.Runtime.Tree.IParseTree">Antlr4.Runtime.Tree.IParseTree</see>
|
||||||
/// by
|
/// by
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <p>Patterns are strings of source input text with special tags representing
|
/// <p>Patterns are strings of source input text with special tags representing
|
||||||
/// token or rule references such as:</p>
|
/// token or rule references such as:</p>
|
||||||
/// <p>
|
/// <p>
|
||||||
/// <code><ID> = <expr>;</code>
|
/// <code><ID> = <expr>;</code>
|
||||||
/// </p>
|
/// </p>
|
||||||
/// <p>Given a pattern start rule such as
|
/// <p>Given a pattern start rule such as
|
||||||
/// <code>statement</code>
|
/// <code>statement</code>
|
||||||
|
@ -61,12 +61,12 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// routines can compare an actual
|
/// routines can compare an actual
|
||||||
/// <see cref="Antlr4.Runtime.Tree.IParseTree">Antlr4.Runtime.Tree.IParseTree</see>
|
/// <see cref="Antlr4.Runtime.Tree.IParseTree">Antlr4.Runtime.Tree.IParseTree</see>
|
||||||
/// from a parse with this pattern. Tag
|
/// from a parse with this pattern. Tag
|
||||||
/// <code><ID></code>
|
/// <code><ID></code>
|
||||||
/// matches
|
/// matches
|
||||||
/// any
|
/// any
|
||||||
/// <code>ID</code>
|
/// <code>ID</code>
|
||||||
/// token and tag
|
/// token and tag
|
||||||
/// <code><expr></code>
|
/// <code><expr></code>
|
||||||
/// references the result of the
|
/// references the result of the
|
||||||
/// <code>expr</code>
|
/// <code>expr</code>
|
||||||
/// rule (generally an instance of
|
/// rule (generally an instance of
|
||||||
|
@ -95,7 +95,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// object that
|
/// object that
|
||||||
/// contains the parse tree, the parse tree pattern, and a map from tag name to
|
/// contains the parse tree, the parse tree pattern, and a map from tag name to
|
||||||
/// matched nodes (more below). A subtree that fails to match, returns with
|
/// matched nodes (more below). A subtree that fails to match, returns with
|
||||||
/// <see cref="ParseTreeMatch#mismatchedNode">ParseTreeMatch#mismatchedNode</see>
|
/// <see cref="ParseTreeMatch.mismatchedNode"/>
|
||||||
/// set to the first tree node that did not
|
/// set to the first tree node that did not
|
||||||
/// match.</p>
|
/// match.</p>
|
||||||
/// <p>For efficiency, you can compile a tree pattern in string form to a
|
/// <p>For efficiency, you can compile a tree pattern in string form to a
|
||||||
|
@ -118,7 +118,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <see cref="ParseTreePatternMatcher">ParseTreePatternMatcher</see>
|
/// <see cref="ParseTreePatternMatcher">ParseTreePatternMatcher</see>
|
||||||
/// constructor are used to parse the pattern in string form. The lexer converts
|
/// constructor are used to parse the pattern in string form. The lexer converts
|
||||||
/// the
|
/// the
|
||||||
/// <code><ID> = <expr>;</code>
|
/// <code><ID> = <expr>;</code>
|
||||||
/// into a sequence of four tokens (assuming lexer
|
/// into a sequence of four tokens (assuming lexer
|
||||||
/// throws out whitespace or puts it on a hidden channel). Be aware that the
|
/// throws out whitespace or puts it on a hidden channel). Be aware that the
|
||||||
/// input stream is reset for the lexer (but not the parser; a
|
/// input stream is reset for the lexer (but not the parser; a
|
||||||
|
@ -127,7 +127,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// fields you have put into the lexer might get changed when this mechanism asks
|
/// fields you have put into the lexer might get changed when this mechanism asks
|
||||||
/// it to scan the pattern string.</p>
|
/// it to scan the pattern string.</p>
|
||||||
/// <p>Normally a parser does not accept token
|
/// <p>Normally a parser does not accept token
|
||||||
/// <code><expr></code>
|
/// <code><expr></code>
|
||||||
/// as a valid
|
/// as a valid
|
||||||
/// <code>expr</code>
|
/// <code>expr</code>
|
||||||
/// but, from the parser passed in, we create a special version of
|
/// but, from the parser passed in, we create a special version of
|
||||||
|
@ -135,7 +135,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <see cref="Antlr4.Runtime.Atn.ATN">Antlr4.Runtime.Atn.ATN</see>
|
/// <see cref="Antlr4.Runtime.Atn.ATN">Antlr4.Runtime.Atn.ATN</see>
|
||||||
/// ) that allows imaginary
|
/// ) that allows imaginary
|
||||||
/// tokens representing rules (
|
/// tokens representing rules (
|
||||||
/// <code><expr></code>
|
/// <code><expr></code>
|
||||||
/// ) to match entire rules. We call
|
/// ) to match entire rules. We call
|
||||||
/// these <em>bypass alternatives</em>.</p>
|
/// these <em>bypass alternatives</em>.</p>
|
||||||
/// <p>Delimiters are
|
/// <p>Delimiters are
|
||||||
|
@ -391,7 +391,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <code>patternTree</code>
|
/// <code>patternTree</code>
|
||||||
/// , filling
|
/// , filling
|
||||||
/// <code>match.</code>
|
/// <code>match.</code>
|
||||||
/// <see cref="ParseTreeMatch#labels">labels</see>
|
/// <see cref="ParseTreeMatch.labels"/>
|
||||||
/// .
|
/// .
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
|
@ -519,7 +519,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// Is
|
/// Is
|
||||||
/// <code>t</code>
|
/// <code>t</code>
|
||||||
///
|
///
|
||||||
/// <code>(expr <expr>)</code>
|
/// <code>(expr <expr>)</code>
|
||||||
/// subtree?
|
/// subtree?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected internal virtual RuleTagToken GetRuleTagToken(IParseTree t)
|
protected internal virtual RuleTagToken GetRuleTagToken(IParseTree t)
|
||||||
|
@ -599,7 +599,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Split
|
/// Split
|
||||||
/// <code><ID> = <e:expr> ;</code>
|
/// <code><ID> = <e:expr> ;</code>
|
||||||
/// into 4 chunks for tokenizing by
|
/// into 4 chunks for tokenizing by
|
||||||
/// <see cref="Tokenize(string)">Tokenize(string)</see>
|
/// <see cref="Tokenize(string)">Tokenize(string)</see>
|
||||||
/// .
|
/// .
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <see cref="Antlr4.Runtime.IToken">Antlr4.Runtime.IToken</see>
|
/// <see cref="Antlr4.Runtime.IToken">Antlr4.Runtime.IToken</see>
|
||||||
/// object representing an entire subtree matched by a parser
|
/// object representing an entire subtree matched by a parser
|
||||||
/// rule; e.g.,
|
/// rule; e.g.,
|
||||||
/// <code><expr></code>
|
/// <code><expr></code>
|
||||||
/// . These tokens are created for
|
/// . These tokens are created for
|
||||||
/// <see cref="TagChunk">TagChunk</see>
|
/// <see cref="TagChunk">TagChunk</see>
|
||||||
/// chunks where the tag corresponds to a parser rule.
|
/// chunks where the tag corresponds to a parser rule.
|
||||||
|
@ -146,7 +146,7 @@ namespace Antlr4.Runtime.Tree.Pattern
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <inheritDoc></inheritDoc>
|
/// <inheritDoc></inheritDoc>
|
||||||
/// <p>Rule tag tokens are always placed on the
|
/// <p>Rule tag tokens are always placed on the
|
||||||
/// <see cref="Antlr4.Runtime.IToken.DefaultChannel">Antlr4.Runtime.IToken.DefaultChannel</see>
|
/// <see cref="TokenConstants.DefaultChannel"/>
|
||||||
/// .</p>
|
/// .</p>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int Channel
|
public virtual int Channel
|
||||||
|
|
Loading…
Reference in New Issue