On 15 May 2019, at 22:33, Imeev Mergen <imeevma@tarantool.org> wrote:
On 5/15/19 10:28 PM, n.pettik wrote:

diff --git a/extra/lempar.c b/extra/lempar.c
index d043e39..595f89e 100644
--- a/extra/lempar.c
+++ b/extra/lempar.c
@@ -935,7 +935,8 @@ void Parse(
      yymajor = YYNOCODE;
#endif
    }
-  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
+  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack
+         PARSER_ERROR_CHECK);
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y
index 3a443a0..f241b8d 100644
--- a/src/box/sql/parse.y
+++ b/src/box/sql/parse.y
@@ -80,6 +80,13 @@
#define YYMALLOCARGTYPE  u64

/*
+ * Stop the parser if an error occurs. This macro adds an
+ * additional check that allows the parser to be stopped if any
+ * error was noticed.
+ */
+#define PARSER_ERROR_CHECK && ! pParse->is_aborted

Any arguments in favour of using macro in this case?
Why don’t simply inline this condition?
The rest is OK as obvious.

Currently, pParse is not used directly in a template (lempar.c).
I tried to keep this practice.

OK, then LGTM.