Closed afscrome closed 9 years ago
Simplified the parser by rewriting binary expression precedence handling to make use of Antlr4's left recursion handling (See https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Left-recursive+rules).
Also did some further refactoring to combine expression & primary expression rules into a single rule. This makes the parser grammar simpler & easier to understand. Some crude testing also shows 5-10% performance gains in parsing.
Simplified the parser by rewriting binary expression precedence handling to make use of Antlr4's left recursion handling (See https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Left-recursive+rules).
Also did some further refactoring to combine expression & primary expression rules into a single rule. This makes the parser grammar simpler & easier to understand. Some crude testing also shows 5-10% performance gains in parsing.