title: antlr redeclared as imported package name
body: <p>I built a directory src which contains the following:</p>
  <pre><code>src/
    antlr/
     basic_levex.go
     basic_parse.go
     basicparser_base_visitor.go
     basicparser_visitor.go
    example1.go
  </code></pre>
  <p>The antlr files look correct, and built the files called BasicLexer.g4 and BasicParser.g4 .</p>
  <p>My example1.go file looks like:</p>
  <pre><code>package main
  
  // example1.go
  
  import (
      &quot;./antlr&quot;
      &quot;fmt&quot;
      &quot;github.com/antlr/antlr4/runtime/Go/antlr&quot;
  )
  
  func main() {
      // Setup the input
      is := antlr.NewInputStream(&quot;1 + 2 * 3&quot;)
  
      // Create the Lexer
      lexer := antlr.NewBasicLexer(is)
  
      // Read all tokens
      for {
          t := lexer.NextToken()
          if t.GetTokenType() == antlr.TokenEOF {
              break
          }
          fmt.Printf(&quot;%s (%q)\n&quot;,
              lexer.SymbolicNames[t.GetTokenType()], t.GetText())
      }
  }
  </code></pre>
  <p>The error I get on compilation is</p>
  <pre><code># command-line-arguments
  ./example1.go:8:2: antlr redeclared as imported package name
      previous declaration at ./example1.go:6:2
  ./example1.go:16:11: undefined: &quot;github.com/antlr/antlr4/runtime/Go/antlr&quot;.NewBasicLexer
  </code></pre>
  <p>I don't really know what is wrong. How to fix it so it doesn't happen in the future?</p>