antlr/doc/go-target.md

14 lines
351 B
Markdown
Raw Normal View History

2016-11-05 02:36:02 +08:00
# ANTLR4 Language Target, Runtime for Go
### Getting started
1. Get the runtime and install it on your GOPATH: `go get github.com/antlr/antlr4`
2. Generate the parser/lexer code: `antlr MyGrammar.g4 -Dlanguage=Go`
### Referencing in your code
2016-11-06 00:25:15 +08:00
Reference the go runtime package like this:
2016-11-05 02:36:02 +08:00
```go
2016-11-06 04:36:53 +08:00
import "github.com/antlr/antlr4/runtime/Go/antlr"
2016-11-05 02:36:02 +08:00
```