J
.gitignore
doc: Generate the documentation and caution notes for using this repo
antlrdoc.go
feat: Update go version.
atn_config_set.go
feat: Latest dev version of the Go runtime
atn_config.go
feat: Update go version.
atn_deserialization_options.go
feat: Latest dev version of the Go runtime
atn_deserializer.go
feat: Latest dev version of the Go runtime
atn_simulator.go
feat: Latest dev version of the Go runtime
atn_state.go
feat: Latest dev version of the Go runtime
atn_type.go
feat: Latest dev version of the Go runtime
atn.go
feat: Update go version.
char_stream.go
feat: Latest dev version of the Go runtime
common_token_factory.go
feat: Latest dev version of the Go runtime
common_token_stream.go
feat: Latest dev version of the Go runtime
comparators.go
feat: Bring in final changes for release 4.13.0
configuration.go
feat: Latest dev version of the Go runtime
dfa_serializer.go
feat: Latest dev version of the Go runtime
dfa_state.go
feat: Latest dev version of the Go runtime
dfa.go
feat: Latest dev version of the Go runtime
diagnostic_error_listener.go
feat: Latest dev version of the Go runtime
error_listener.go
feat: Latest dev version of the Go runtime
error_strategy.go
feat: Latest dev version of the Go runtime
errors.go
feat: Latest dev version of the Go runtime
file_stream.go
feat: Latest dev version of the Go runtime
go.mod
feat: Update go version.
go.sum
feat: Update go version.
input_stream.go
feat: Update go version.
int_stream.go
feat: Latest dev version of the Go runtime
interval_set.go
feat: Latest dev version of the Go runtime
jcollect.go
feat: Update go version.
lexer_action_executor.go
feat: Latest dev version of the Go runtime
lexer_action.go
feat: Latest dev version of the Go runtime
lexer_atn_simulator.go
feat: Latest dev version of the Go runtime
lexer.go
feat: Update go version.
LICENSE
Update LICENSE
ll1_analyzer.go
feat: Update go version.
mutex_nomutex.go
feat: Update go version.
mutex.go
feat: Update go version.
nostatistics.go
feat: Latest dev version of the Go runtime
parser_atn_simulator.go
feat: Update go version.
parser_rule_context.go
feat: Latest dev version of the Go runtime
parser.go
feat: Latest dev version of the Go runtime
prediction_context_cache.go
feat: Latest dev version of the Go runtime
prediction_context.go
feat: Update go version.
prediction_mode.go
feat: Latest dev version of the Go runtime
README.md
feat: Bring in final changes for release 4.13.0
recognizer.go
feat: Update go version.
rule_context.go
feat: Latest dev version of the Go runtime
semantic_context.go
feat: Latest dev version of the Go runtime
statistics.go
feat: Update go version.
stats_data.go
feat: Latest dev version of the Go runtime
token_source.go
feat: Latest dev version of the Go runtime
token_stream.go
feat: Latest dev version of the Go runtime
token.go
feat: Update go version.
tokenstream_rewriter.go
feat: Latest dev version of the Go runtime
trace_listener.go
feat: Latest dev version of the Go runtime
transition.go
feat: Latest dev version of the Go runtime
tree.go
feat: Latest dev version of the Go runtime
trees.go
feat: Latest dev version of the Go runtime
utils.go
feat: Update go version.

ANTLR4 Go Runtime Module Repo

IMPORTANT: Please submit PRs via a clone of the https://github.com/antlr/antlr4 repo, and not here.

  • Do not submit PRs or any change requests to this repo
  • This repo is read only and is updated by the ANTLR team to create a new release of the Go Runtime for ANTLR
  • This repo contains the Go runtime that your generated projects should import

Introduction

This repo contains the official modules for the Go Runtime for ANTLR. It is a copy of the runtime maintained at: https://github.com/antlr/antlr4/tree/master/runtime/Go/antlr and is automatically updated by the ANTLR team to create the official Go runtime release only. No development work is carried out in this repo and PRs are not accepted here.

The dev branch of this repo is kept in sync with the dev branch of the main ANTLR repo and is updated periodically.

Why?

The go get command is unable to retrieve the Go runtime when it is embedded so deeply in the main repo. A go get against the antlr/antlr4 repo, while retrieving the correct source code for the runtime, does not correctly resolve tags and will create a reference in your go.mod file that is unclear, will not upgrade smoothly and causes confusion.

For instance, the current Go runtime release, which is tagged with v4.13.0 in antlr/antlr4 is retrieved by go get as:

require (
	github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230219212500-1f9a474cc2dc
)

Where you would expect to see:

require (
    github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.13.0
)

The decision was taken to create a separate org in a separate repo to hold the official Go runtime for ANTLR and from whence users can expect go get to behave as expected.

Documentation

Please read the official documentation at: https://github.com/antlr/antlr4/blob/master/doc/index.md for tips on migrating existing projects to use the new module location and for information on how to use the Go runtime in general.