Ken Domino
Ken Domino
I would think displaying only the sub-tree should be the default, only because there may be an issue of speed and memory in displaying the entire tree. But, it's up...
> Copying an insightful comment from Stackoverflow: > > > profiling your bench it appears that this package spends a great amount of time within some internals `github.com/antlr/antlr4/runtime/Go/antlr.(*ParserATNSimulator).closureWork:1091`. Doing that,...
I changed test to use a larger example boolean expression, and redid the run--which gives wildly different results every time--and only this one run outputted more useful results: ``` (pprof)...
I think the problem is that the there is excessive pressure on the heap and stack. This is because the definitions for many of the Antlr data structures are actually...
I should note, for strings of `(1 EQ 2 OR)* 1 EQ 2`, the runtime climbs exponentially per each "1 EQ 2 OR" sub-string added, just as what @movelazar says....
It's *likely* caused by a bug in the Go Antlr runtime. Turning on debug for the runtime (and cleaning out the Go runtime where we get a core dump because...
The problem is [here](https://github.com/antlr/antlr4/blob/8b0cc382067fcb7e011215b8e231535a09c041e2/runtime/Go/antlr/dfa.go#L121) and it goes to how DFAState objects are kept in a hash table. Let's compare the CSharp and Go target code side by side: | CSharp...
The Dictionary implementation for C# is [here](https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs). I think it's actually being used more like a HashSet because the state number is not used in the hash computation, but [that's...
> So, in your collection implementation, are you not using the Equals() in atn_config_set.go? @jimidle [I think I just call the DFAState equals comparison](https://github.com/kaby76/gohack/blob/c76f8d0210704a6d3af0259005fcda96b903c97a/hashtable.go#L82), which is [defined in DFAState](https://github.com/kaby76/gohack/blob/c76f8d0210704a6d3af0259005fcda96b903c97a/dfa_state.go#L144). That...
@jimidle You're right! This didn't fix the bug. I am both surprised and not. Seriously this is an excellent problem at so many levels. The grammar I tested was ***refactored***...