Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | List of all members
Loyc.Syntax.ParserSource< Token > Class Template Reference

Alias for ParserSource{Token, int, IList{Token}}. More...


Source file:
Inheritance diagram for Loyc.Syntax.ParserSource< Token >:
Loyc.Syntax.ParserSource< Token, MatchType > Loyc.Syntax.ParserSource< Token, MatchType, List > Loyc.Syntax.BaseParserForList< Token, MatchType, List > Loyc.Syntax.BaseParser< Token, MatchType >

Remarks

Alias for ParserSource{Token, int, IList{Token}}.

Template Parameters
TokenToken type (one often uses Loyc.Syntax.Lexing.Token).
Type Constraints
Token :ISimpleToken<int> 

Public Member Functions

 ParserSource (IList< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
 ParserSource (IEnumerable< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
 ParserSource (IEnumerator< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
- Public Member Functions inherited from Loyc.Syntax.ParserSource< Token, MatchType >
 ParserSource (IList< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
 ParserSource (IEnumerable< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
 ParserSource (IEnumerator< Token > list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
- Public Member Functions inherited from Loyc.Syntax.ParserSource< Token, MatchType, List >
 ParserSource (List list, Token eofToken, ISourceFile file, int startIndex=0)
 <inheridoc>
 
virtual new void Reset (List source, Token eofToken, ISourceFile file, int startIndex=0)
 Reinitializes the object. This method is called by the constructor.See the constructor for documentation of the parameters.
 
new void Reset ()
 
new Token LT (int i)
 Returns the token at lookahead i (e.g. Source[InputPosition + i] if the tokens come from a list called Source) More...
 
new MatchType LA (int i)
 
new void Skip ()
 
new Token MatchAny ()
 
new Token Match (MatchType a)
 
new Token Match (MatchType a, MatchType b)
 
new Token Match (MatchType a, MatchType b, MatchType c)
 
new Token Match (MatchType a, MatchType b, MatchType c, MatchType d)
 
Token Match (HashSet< MatchType > set)
 
new Token MatchExcept ()
 
new Token MatchExcept (MatchType a)
 
new Token MatchExcept (MatchType a, MatchType b)
 
new Token MatchExcept (MatchType a, MatchType b, MatchType c)
 
new Token MatchExcept (MatchType a, MatchType b, MatchType c, MatchType d)
 
new Token MatchExcept (HashSet< MatchType > set)
 
bool TryMatch (HashSet< MatchType > set)
 
new bool TryMatch (MatchType a)
 
new bool TryMatch (MatchType a, MatchType b)
 
new bool TryMatch (MatchType a, MatchType b, MatchType c)
 
new bool TryMatch (MatchType a, MatchType b, MatchType c, MatchType d)
 
new bool TryMatchExcept ()
 
new bool TryMatchExcept (HashSet< MatchType > set)
 
new bool TryMatchExcept (MatchType a)
 
new bool TryMatchExcept (MatchType a, MatchType b)
 
new bool TryMatchExcept (MatchType a, MatchType b, MatchType c)
 
new bool TryMatchExcept (MatchType a, MatchType b, MatchType c, MatchType d)
 
virtual new void Check (bool expectation, string expectedDescr="")
 
virtual new void Error (int lookaheadIndex, string format, params object[] args)
 

Additional Inherited Members

- Public static fields inherited from Loyc.Syntax.BaseParser< Token, MatchType >
static readonly IMessageSink FormatExceptionErrorSink
 Throws FormatException when it receives an error. Non-errors are sent to MessageSink.Current. More...
 
- Properties inherited from Loyc.Syntax.ParserSource< Token, MatchType, List >
Func< MatchType, string > TokenTypeToString [get, set]
 Converts from MatchType (usually integer) to string (used in error messages). More...
 
new List TokenList [get]
 
new Token LT0 [get]
 
new MatchType LA0 [get]
 
new int InputPosition [get, set]
 
new ISourceFile SourceFile [get]
 
- Properties inherited from Loyc.Syntax.BaseParserForList< Token, MatchType, List >
List TokenList [get]
 The IList{Token} that was provided to the constructor, if any. More...
 
sealed override MatchType LA0Int [get]
 
MatchType LA0 [get]
 
new int InputPosition [get, set]
 
- Properties inherited from Loyc.Syntax.BaseParser< Token, MatchType >
IMessageSink ErrorSink [get, set]
 Gets or sets the object to which error messages are sent. The default object is FormatExceptionErrorSink, which throws FormatException if an error occurs. More...
 
ISourceFile SourceFile [get]
 The ISourceFile object that was provided to the constructor, if any. More...
 
Token LT0 [get]
 Next token to parse (cached; is set to LT(0) whenever InputPosition is changed). More...
 
int InputPosition [get, set]
 Current position of the next token to be parsed. More...
 
abstract MatchType LA0Int [get]
 Returns the token type of _lt0 (normally _lt0.TypeInt) More...
 
- Static Public Member Functions inherited from Loyc.Syntax.ParserSource< Token, MatchType, List >
static new HashSet< MatchType > NewSet (params MatchType[] items)
 
- Protected Member Functions inherited from Loyc.Syntax.ParserSource< Token, MatchType, List >
override string ToString (MatchType tokenType)
 Returns a string representation of the specified token type. These strings are used in error messages. More...
 
- Protected Member Functions inherited from Loyc.Syntax.BaseParserForList< Token, MatchType, List >
 BaseParserForList (List list, Token eofToken, ISourceFile file, int startIndex=0)
 Initializes this object to begin parsing the specified tokens. More...
 
void Reset ()
 
sealed override MatchType EofInt ()
 Returns the value used for EOF (normally 0) More...
 
MatchType LA (int i)
 
bool Down (List children)
 Switches to parsing the specified token list at position zero (typically the value of Loyc.Syntax.Lexing.Token.Children in a token tree produced by TokensToTree.) The original token list and the original InputPosition are placed on a stack, so you can restore the old list by calling Up(). More...
 
void Up ()
 Returns to the old token list saved by Down. More...
 
Up< T > (T value)
 Calls Up() and returns value. More...
 
- Protected Member Functions inherited from Loyc.Syntax.BaseParser< Token, MatchType >
 BaseParser (ISourceFile file=null, int startIndex=0)
 
virtual int LaIndexToCharIndex (int lookaheadIndex)
 Converts a lookahead token index to a character index (used for error reporting). More...
 
virtual object LaIndexToSourcePos (int lookaheadIndex)
 Converts a lookahead token index to a SourcePos object using LaIndexToCharIndex and SourceFile. More...
 
void Skip ()
 
Token MatchAny ()
 
Token Match (HashSet< MatchType > set, bool inverted=false)
 
Token Match (MatchType a)
 
Token Match (MatchType a, MatchType b)
 
Token Match (MatchType a, MatchType b, MatchType c)
 
Token Match (MatchType a, MatchType b, MatchType c, MatchType d)
 
Token MatchExcept ()
 
Token MatchExcept (MatchType a)
 
Token MatchExcept (MatchType a, MatchType b)
 
Token MatchExcept (MatchType a, MatchType b, MatchType c)
 
Token MatchExcept (MatchType a, MatchType b, MatchType c, MatchType d)
 
Token MatchExcept (HashSet< MatchType > set)
 
bool TryMatch (HashSet< MatchType > set, bool inverted=false)
 
bool TryMatch (MatchType a)
 
bool TryMatch (MatchType a, MatchType b)
 
bool TryMatch (MatchType a, MatchType b, MatchType c)
 
bool TryMatch (MatchType a, MatchType b, MatchType c, MatchType d)
 
bool TryMatchExcept ()
 
bool TryMatchExcept (MatchType a)
 
bool TryMatchExcept (MatchType a, MatchType b)
 
bool TryMatchExcept (MatchType a, MatchType b, MatchType c)
 
bool TryMatchExcept (MatchType a, MatchType b, MatchType c, MatchType d)
 
bool TryMatchExcept (HashSet< MatchType > set)
 
void Error (bool inverted, params MatchType[] expected)
 
virtual void Error (bool inverted, IEnumerable< MatchType > expected)
 
virtual string ToString (bool inverted, IEnumerable< MatchType > expected)
 
- Static Protected Member Functions inherited from Loyc.Syntax.BaseParser< Token, MatchType >
static HashSet< MatchType > NewSet (params MatchType[] items)
 
- Protected fields inherited from Loyc.Syntax.BaseParserForList< Token, MatchType, List >
Token EofToken
 
List _tokenList
 
- Protected fields inherited from Loyc.Syntax.BaseParser< Token, MatchType >
ISourceFile _sourceFile
 
Token _lt0
 
int _inputPosition
 
MatchType EOF