The function Parseyou are calling is right. When you call fmt.Println(p), the parse tree is converted to a string, so the output you see is just the equivalent regular expression.
Parse syntax.Regexp. , Sub , ( syntax.Regexp structs). :
func printSummary(r *syntax.Regexp) {
fmt.Printf("%v has %d sub expressions\n", r, len(r.Sub))
for i, s := range r.Sub {
fmt.Printf("Child %d:\n", i)
printSummary(s)
}
}
. : Op Rune .