commit | dd27f0f1548257366ac2c995f7f6512ca9bc6478 | [log] [tgz] |
---|---|---|
author | ggalvizo <ggalvizo@uci.edu> | Mon Dec 27 06:58:51 2021 -0700 |
committer | Glenn Galvizo <ggalvizo@uci.edu> | Tue Jan 04 19:32:46 2022 +0000 |
tree | 590fe68baa024f3c843c33e6f812d53da205b601 | |
parent | 5710394a27dae6287aeea27ef618d2009097446e [diff] |
[ASTERIXDB-3001][MVN] Grammarix not finding all productions - user model changes: no - storage format changes: no - interface changes: no Grammarix was mishandling the '"' case for quotes, making nearly all productions after LiteralExpression not extensible. Change-Id: Ib5d840237ee1224a4225cb67c795f3ac08452a76 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/14663 Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
diff --git a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/main/java/org/apache/asterix/extension/grammar/GrammarExtensionMojo.java b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/main/java/org/apache/asterix/extension/grammar/GrammarExtensionMojo.java index d47e9a6..19bfe1d 100644 --- a/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/main/java/org/apache/asterix/extension/grammar/GrammarExtensionMojo.java +++ b/asterixdb/asterix-maven-plugins/asterix-grammar-extension-maven-plugin/src/main/java/org/apache/asterix/extension/grammar/GrammarExtensionMojo.java
@@ -459,7 +459,9 @@ prevCharEscape = chars[bufferPosn] == ExternalDataConstants.ESCAPE; } } else { - if (chars[bufferPosn] == ExternalDataConstants.QUOTE) { + if (chars[bufferPosn] == ExternalDataConstants.QUOTE && chars[bufferPosn] != start + && chars[bufferPosn - 1] != '\'') { + // If we see a quote that is not preceded by an apostrophe, then we are inside a string. inString = true; } else if (chars[bufferPosn] == start) { depth += 1;