Enhanced C#
Language of your choice: library documentation
Nested classes | Public static fields | Properties | Public Member Functions | Protected Member Functions | Protected fields | List of all members
Loyc.Ecs.Parser.EcsParser Class Reference

Parses Enhanced C# code into a sequence of Loyc trees (LNode), one per top-level statement. More...


Source files:
Inheritance diagram for Loyc.Ecs.Parser.EcsParser:
Loyc.Syntax.BaseParser< Token >

Remarks

Parses Enhanced C# code into a sequence of Loyc trees (LNode), one per top-level statement.

You can use EcsLanguageService.Value with extension method ParsingService.Parse(IParsingService, UString, IMessageSink, ParsingMode, bool) to easily parse a text string (holding zero or more EC# statements) into a Loyc tree. One does not normally use this class directly.

Nested classes

struct  TentativeResult
 
struct  TentativeState
 

Public static fields

static readonly Precedence StartExpr = new Precedence(-100)
 Below lowest precedence.
 

Properties

IListSource< TokenTokensRoot [get]
 
sealed override int LA0Int [get]
 
TT LA0 [get]
 

Public Member Functions

 EcsParser (IListSource< Token > tokens, ISourceFile file, IMessageSink messageSink)
 
virtual void Reset (IListSource< Token > tokens, ISourceFile file)
 
IListSource< LNodeParseExprs (bool allowTrailingComma=false, bool allowUnassignedVarDecl=false)
 
IListSource< LNodeParseStmtsGreedy ()
 
IEnumerator< LNodeParseStmtsLazy ()
 
IMessageSink CurrentSink (bool incErrorCount)
 
LNode DataType (bool afterAsOrIs=false)
 
LNode ExprStart (bool allowUnassignedVarDecl)
 
LNode ExprStartNNP (bool allowUnassignedVarDecl)
 
LNode LinqQueryExpression ()
 
LNode Stmt ()
 

Protected Member Functions

sealed override int EofInt ()
 
sealed override Token LT (int i)
 
override string ToString (int type_)
 
TT LA (int i)
 
override void Error (int lookaheadIndex, string message)
 
override void Error (int lookaheadIndex, string message, params object[] args)
 
LNode Error (string message, params object[] args)
 
void Error (LNode node, string message, params object[] args)
 
void Error (Token token, string message, params object[] args)
 
int GetTextPosition (int tokenPosition)
 
bool Down (int li)
 
bool Down (IListSource< Token > children)
 
Up< T > (T value)
 
void Up ()
 
LNode SingleExprInside (Token group, string stmtType, bool allowUnassignedVarDecl=false)
 
LNode SingleExprInside (Token group, string stmtType, bool allowUnassignedVarDecl, ref VList< LNode > list)
 
VList< LNodeAppendExprsInside (Token group, VList< LNode > list, bool allowTrailingComma=false, bool allowUnassignedVarDecl=false)
 
void AppendInitializersInside (Token group, ref VList< LNode > list)
 
VList< LNodeExprListInside (Token t, bool allowTrailingComma=false, bool allowUnassignedVarDecl=false)
 

Protected fields

LNodeFactory F
 
IListSource< Token_tokensRoot
 
IListSource< Token_tokens
 
int _startTextIndex = 0
 
LNode _triviaWordAttribute
 
LNode _triviaUseOperatorKeyword
 
LNode _triviaForwardedProperty
 
LNode _filePrivate
 
TentativeState _tentative