GitXplorerGitXplorer
g

antlr4-go-examples

public
8 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
5e8721d5b799dffcfd8e1aec0dfd5739d1887074

moved predicate to left edge so that it can be predictive.

mmillergarym committed 8 years ago
Unverified
877163bf84231ced760c08cfbacf246d0b362a7c

Sydney Go meetup talk

mmillergarym committed 8 years ago
Unverified
28e7228318bed38b83f25ad86881d118f457b29c

+, ^, IF(lazy) and SUM eval working

mmillergarym committed 8 years ago
Unverified
7d1a6b2bd10172bcbb871e903fd3f8db22003b50

Initial commit

mmillergarym committed 8 years ago

README

The README file for this repository.

Antlr4 Go Examples

Getting started

mkdir antlr4test
cd antlr4test
mkdir src
export GOPATH=`pwd`
go get github.com/wxio/antlr4-go
go get github.com/wxio/antlr4-go-examples
cd src/github.com/wxio/antlr4-go-examples
go generate ./...
go test ./...

The go generate command read the source and executes commands specified by in //go:generate xxx lines. The example has such a line, which calls the Antlr4 tool and then sed to replace the import statement in the generated code.

Issues

This only works on OSX as the sed for OSX is different. To get this to work in Linux or Windows, change the sed command or edit the creating and modifying a generate file (eg. gen_linux.go).