pboyer / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
Other
26 stars 1 forks source link

Missing ctx initialization #42

Closed sridharxp closed 8 years ago

sridharxp commented 8 years ago

Missing stmt

pboyer commented 8 years ago

Hi @sridharxp,

This seems to fail with:

./atn.go:135: no new variables on left side of :=
./atn.go:135: undefined: context

Also, the diff makes your change (a single line, if I'm not mistaken) very hard to read. Presumably this is due to whitespace changes. Can you fix that?

Maybe you can also give some additional information here about what you're trying to fix?

sridharxp commented 8 years ago

Hi Corrected whitespace change and code. This change is more similar to java code. Sorry if this is a spurious change. file atn.go line 130 func (a ATN) getExpectedTokens(stateNumber int, context RuleContext) IntervalSet { if stateNumber < 0 || stateNumber >= len(a.states) { panic("Invalid state number.") }

    ctx := context               

How to test go runtime? Thanks for the help

sridharxp commented 8 years ago

Hi Corrected whitespace change and code. This change is more similar to java code. Sorry if this is a spurious change. file atn.go line 130 func (a ATN) getExpectedTokens(stateNumber int, context RuleContext) IntervalSet { if stateNumber < 0 || stateNumber >= len(a.states) { panic("Invalid state number.") }

    ctx := context               

How to test go runtime? Thanks for the help