--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Reshma,
The translation to Python did not preserve the semantics of certain performance-critical aspects of the Java code. However, since the final result was a correct parse tree, the author of the Python target ruled that any resulting impact on runtime performance did not constitute a bug, and will not be modified. The following issue and pull request contain information about one of these cases, where it was determined that the Python target is known to exhibit exponential complexity (O(k^n), k is a function of the grammar and n is the input size).
https://github.com/antlr/antlr4-python2/issues/23
https://github.com/antlr/antlr4-python2/pull/24
If you are putting your code into production with unknown inputs, you should take one of the following steps to make sure your application does not encounter these performance issues:
1. Use one of the Java releases (either the reference release or my memory-optimized fork)
2. Use the C# release (which is derived from the memory-optimized Java fork)
3. Build your own copy of the Python runtime and manually apply the applicable patches submitted by @bdkearns (this will address some, but not all of the known performance issues in the Python target)
Sam