Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Note how the definition order matters if patterns overlap (though here they are distinct). Dim t = uc.NewTransformer() '// Define patterns for a simple math language t.FromTo("{d: {@Number}}", "[NUM:{d}]") t.FromTo("{op: + | - | * | / }", "[OP:{op}]") t.FromTo("print", "[CMD:PRINT]") '// Specific keyword Dim code = "print 10 + 20" Console.WriteLine(t.Transform(code)) End Sub End Module