コード例 #1
0
ファイル: Terminals.cs プロジェクト: mrfichtn/opal
        public static IReduceExpr[] CreateArgs(this ITerminals terminals, ReduceContext context)
        {
            var result = new IReduceExpr[terminals.Length];

            for (var i = 0; i < result.Length; i++)
            {
                result[i] = terminals[i].Reduce(context);
            }
            return(result);
        }
コード例 #2
0
 public ReduceContext(TypeTable typeTable,
                      ITerminals terminals,
                      ActionExpr action,
                      INoAction noAction,
                      int id)
 {
     this.typeTable = typeTable;
     this.terminals = terminals;
     this.action    = action;
     this.noAction  = noAction;
     Id             = id;
 }
コード例 #3
0
ファイル: Production.cs プロジェクト: mrfichtn/opal
 public Production(ParseTree.Identifier name,
                   int id,
                   int ruleId,
                   ITerminals right,
                   IReduction reduction)
 {
     this.name      = name;
     Id             = id;
     RuleId         = ruleId;
     Right          = right;
     this.reduction = reduction;
 }