示例#1
0
 private static void PrintSequenceBacktrack(SequenceBacktrack seqBack, Sequence parent, PrintSequenceContext context)
 {
     Console.Write("<<");
     PrintSequence(seqBack.Rule, seqBack, context);
     Console.Write(";;");
     PrintSequence(seqBack.Seq, seqBack, context);
     Console.Write(">>");
 }
        public SequenceBacktrackGenerator(SequenceBacktrack seq, SequenceExpressionGenerator seqExprGen, SequenceGeneratorHelper seqHelper)
        {
            this.seq        = seq;
            this.seqExprGen = seqExprGen;
            this.seqHelper  = seqHelper;

            seqRule                  = seq.Rule;
            ArgumentExpressions      = seqRule.ArgumentExpressions;
            ReturnVars               = seqRule.ReturnVars;
            specialStr               = seqRule.Special ? "true" : "false";
            matchingPatternClassName = "GRGEN_ACTIONS." + TypesHelper.GetPackagePrefixDot(seqRule.Package) + "Rule_" + seqRule.Name;
            patternName              = seqRule.Name;
            ruleName                 = "rule_" + TypesHelper.PackagePrefixedNameUnderscore(seqRule.Package, seqRule.Name);
            matchType                = matchingPatternClassName + "." + NamesOfEntities.MatchInterfaceName(patternName);
            matchName                = "match_" + seq.Id;
            matchesType              = "GRGEN_LIBGR.IMatchesExact<" + matchType + ">";
            matchesName              = "matches_" + seq.Id;
        }