Пример #1
0
 /// <summary>The translation of this syntax tree into NFA instruction code.</summary>
 /// <param name="builder">Data needed to construct an NFA.</param>
 /// <returns>The <see cref="NFA.Instruction"/> implementing this AST.</returns>
 public override NFA.Instruction ToInstruction(NFABuilder builder)
 {
     return new NFA.Instruction
     {
         test = NFA.TestCode.And,
         arg1 = builder.AddInstructions(Left),
         arg2 = builder.AddInstructions(Right),
     };
 }
Пример #2
0
 /// <summary>The translation of this syntax tree into NFA instruction code.</summary>
 /// <param name="builder">Data needed to construct an NFA.</param>
 /// <returns>The <see cref="NFA.Instruction"/> implementing this AST.</returns>
 public override NFA.Instruction ToInstruction(NFABuilder builder)
 {
     return new NFA.Instruction
     {
         test = NFA.TestCode.Not,
         arg1 = builder.AddInstructions(Argument),
     };
 }