How to profile an Antlr grammar
问题 I have an Antlr grammar that is currently about 1200 lines. It parses the language that I want, but for at least one construct it is prohibitively slow even for smaller input files. The execution time seems to be growing exponentially for each added element of the construct. I want to know if there are any good guidelines for debugging/profiling such performance problems. I have already tried with VisualVM and that gave be the name of the two methods closureCheckingStopState and closure_, but