Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      '// Structure:
      '// 1. Alternation: "Open" OR "Save"
      '// 2. Inside "Open": Optional "Recent"
      '// 3. Inside "Recent": Alternation "File" OR "Project"
      Dim pattern = "Menu { Open [ Recent {type: File | Project } ] | Save }"
      
      t.FromTo(pattern, "Action Detected")
      
      Console.WriteLine(t.Transform("Menu Save"))                 '// Match (Simple Alternation)
      Console.WriteLine(t.Transform("Menu Open"))                 '// Match (Optional omitted)
      Console.WriteLine(t.Transform("Menu Open Recent File"))     '// Match (Deep nesting)
      Console.WriteLine(t.Transform("Menu Open Recent Project"))  '// Match (Deep nesting alt)
   End Sub
End Module