Pattern directive to skip nested pattern matching
ID: 213
See: Verbatim Capture ~
using uCalcSoftware;
var uc = new uCalc();
var t = uc.NewTransformer();
t.FromTo("start {etc} end", "<{@Self}>");
t.FromTo("start2 {etc~} end", "<{@Self}>");
Console.WriteLine(t.Transform("start start2 a b c end end"));
Console.WriteLine(t.Transform("start2 start a b c end end"));
<start start2 a b c end end>
<start2 start a b c end> end using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); t.FromTo("start {etc} end", "<{@Self}>"); t.FromTo("start2 {etc~} end", "<{@Self}>"); Console.WriteLine(t.Transform("start start2 a b c end end")); Console.WriteLine(t.Transform("start2 start a b c end end"));
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
auto t = uc.NewTransformer();
t.FromTo("start {etc} end", "<{@Self}>");
t.FromTo("start2 {etc~} end", "<{@Self}>");
cout << t.Transform("start start2 a b c end end") << endl;
cout << t.Transform("start2 start a b c end end") << endl;
}
<start start2 a b c end end>
<start2 start a b c end> end #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); t.FromTo("start {etc} end", "<{@Self}>"); t.FromTo("start2 {etc~} end", "<{@Self}>"); cout << t.Transform("start start2 a b c end end") << endl; cout << t.Transform("start2 start a b c end end") << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t = uc.NewTransformer()
t.FromTo("start {etc} end", "<{@Self}>")
t.FromTo("start2 {etc~} end", "<{@Self}>")
Console.WriteLine(t.Transform("start start2 a b c end end"))
Console.WriteLine(t.Transform("start2 start a b c end end"))
End Sub
End Module
<start start2 a b c end end>
<start2 start a b c end> end Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() t.FromTo("start {etc} end", "<{@Self}>") t.FromTo("start2 {etc~} end", "<{@Self}>") Console.WriteLine(t.Transform("start start2 a b c end end")) Console.WriteLine(t.Transform("start2 start a b c end end")) End Sub End Module