Enhanced C#
Language of your choice: library documentation
|
Parses LES (Loyc Expression Syntax) code into a sequence of Loyc trees (LNode), one per top-level statement. More...
Parses LES (Loyc Expression Syntax) code into a sequence of Loyc trees (LNode), one per top-level statement.
You can use Les2LanguageService.Value with ParsingService.Parse to easily parse a text string (holding zero or more LES statements) into a Loyc tree.
This class expects to receive tokens from Les2Lexer that have been preprocessed by TokensToTree, with whitespace tokens filtered out.
Public static fields | |
static readonly Precedence | StartStmt = Precedence.MinValue |
Public Member Functions | |
Les2Parser (IListAndListSource< Token > tokens, ISourceFile file, IMessageSink messageSink) | |
Les2Parser (IListSource< Token > tokens, ISourceFile file, IMessageSink messageSink) | |
Les2Parser (IList< Token > tokens, ISourceFile file, IMessageSink messageSink, int startIndex=0) | |
void | Reset (IList< Token > list, ISourceFile file, int startIndex=0) |
IEnumerable< LNode > | Start (Holder< TokenType > separator) |
Top-level rule: expects a sequence of statements followed by EOF More... | |
LNodeList | ExprList (LNodeList list=default(LNodeList)) |
LNodeList | StmtList () |
virtual LNodeList | ExprList (ref TokenType endMarker, LNodeList list=default(LNodeList)) |
virtual IEnumerable< LNode > | ExprListLazy (Holder< TokenType > endMarker) |
Protected Member Functions | |
override void | Reset (IList< Token > list, Func< Token, Token > getEofToken, int eof, ISourceFile file, int startIndex=0) |
override string | ToString (int type) |
LNode | MissingExpr (Token tok) |
Symbol | ToSuffixOpName (object symbol) |
Precedence | PrefixPrecedenceOf (Token t) |
Precedence | SuffixPrecedenceOf (Token t) |
Precedence | InfixPrecedenceOf (Token t) |
virtual LNode | MarkSpecial (LNode n) |
virtual LNode | MarkCall (LNode n) |
override void | MatchError (bool inverted, IEnumerable< int > expected_) |
LNode | TopExpr () |
Protected fields | |
LNodeFactory | F |
Les2PrecedenceMap | _prec = Les2PrecedenceMap.Default |
Top-level rule: expects a sequence of statements followed by EOF
Referenced by Loyc.Syntax.Les.Les2LanguageService.Parse().