[ https://issues.apache.org/jira/browse/LUCENE-9528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200069#comment-17200069 ]
Robert Muir commented on LUCENE-9528: ------------------------------------- My only comment on antlr is that newer versions are a bit trappy: they happily (but very slowly) parse stuff when there are crazy ambiguities, which older versions would not allow and detect statically. With painless the only way I found to prevent such performance traps was to write unit tests for everything, and setup some special antlr magic to fail tests rather than do something slow. This way you know the grammar needs to be fixed instead of having performance issues: https://github.com/elastic/elasticsearch/blob/9497f66aacef7193d343259ff3c1273b9c07456a/modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/Walker.java#L211-L227 > Clean up obsolete and commented-out cruft from StandardSyntaxParser.jj > ---------------------------------------------------------------------- > > Key: LUCENE-9528 > URL: https://issues.apache.org/jira/browse/LUCENE-9528 > Project: Lucene - Core > Issue Type: Sub-task > Reporter: Dawid Weiss > Assignee: Dawid Weiss > Priority: Minor > Fix For: master (9.0) > > Time Spent: 20m > Remaining Estimate: 0h > > The indentation in that file is crazy. So are micro-optimizations which make > reading the syntax parser much more difficult than it actually is. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org