C# Class Loyc.LLParserGenerator.StageTwoParser

Parses LNodes such as (x | ("foo", y)) / z into Pred objects.
Exibir arquivo Open project: qwertie/ecsharp Class Usage Examples

Public Methods

Method Description
Parse ( LNode>.IEnumerable rules ) : void

Given Rules paired with LNodes produced by StageOneParser, this method translates each LNode into a Pred and updates Rule.Pred to point to the new Pred.

StageTwoParser ( IPGCodeGenHelper helper, IMessageSink sink ) : System

Private Methods

Method Description
ArgsToSeq ( LNode expr, Context ctx ) : Pred
AutoNodeToPred ( LNode expr, Context ctx ) : object
BranchToPred ( LNode expr, BranchMode &mode, Context ctx ) : Pred
NodeToPred ( LNode expr, Context ctx = Context.Rule ) : Pred
NodeToPredCore ( LNode expr, Context ctx = Context.Rule ) : Pred
RemoveBraces ( LNode expr ) : LNode
Remove_any_in_Labels ( ) : void
TranslateLabeledExpr ( LNode expr, Context ctx ) : Pred
TranslateLoopExpr ( LNode expr, Context ctx ) : Pred
Translate_any_in_Expr ( LNode expr, Context ctx ) : Pred
TryGetRule ( LNode expr ) : Rule

Tries to interpret expr as a reference to an existing rule.

Method Details

Parse() public method

Given Rules paired with LNodes produced by StageOneParser, this method translates each LNode into a Pred and updates Rule.Pred to point to the new Pred.
public Parse ( LNode>.IEnumerable rules ) : void
rules LNode>.IEnumerable
return void

StageTwoParser() public method

public StageTwoParser ( IPGCodeGenHelper helper, IMessageSink sink ) : System
helper IPGCodeGenHelper
sink IMessageSink
return System