Giter Club home page Giter Club logo

goantlr's Introduction

Antlr4 Go runtime

The intention of this repository is to make it easier to get up a running with Antlr4 in Go. This is Go gettable and contains a build Antlr4 jar file, an example grammar, Go test file and of course the runtime source. The test file contain a go:generate comment, so the go tool can be used to call the antlr4 tool.

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).

Notes

Go runtime package for Antlr4. Also contains Antlr4 jar file and examples.

This is simply a split of the Go runtime from the main github repository. See https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/ regarding split a repo

goantlr's People

Contributors

gmwxio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.