example/nolexer/nolexer.bnf
raw| 1 | << |
| 2 | import ( |
| 3 | "fmt" |
| 4 | |
| 5 | "github.com/goccmack/gocc/example/nolexer/token" |
| 6 | ) |
| 7 | >> |
| 8 | |
| 9 | Hello : Saying name << func() (Attrib, error) { |
| 10 | fmt.Println(string($1.(*token.Token).Lit)) |
| 11 | return nil, nil |
| 12 | }() |
| 13 | >> |
| 14 | ; |
| 15 | |
| 16 | Saying : "hello" << func() (Attrib, error) { |
| 17 | fmt.Print("hello ") |
| 18 | return nil, nil |
| 19 | }() |
| 20 | >> |
| 21 | | "hiya" << func() (Attrib, error) { |
| 22 | fmt.Print("hiya ") |
| 23 | return nil, nil |
| 24 | }() |
| 25 | >> |
| 26 | ; |