ASTERIXDB-1529: remove "not" from reserved keywords in AQL.

Change-Id: Ib79fee208acc7ae28f8e082eebb26ed728b39723
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1062
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql
index 573c38c..b6f302d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tinysocial/tinysocial-suite/tinysocial-suite.13.query.aql
@@ -24,6 +24,6 @@
 
 
 for $fbu in dataset FacebookUsers
-where (every $e in $fbu.employment satisfies "not"(is-missing($e.end-date)))
+where (every $e in $fbu.employment satisfies not(is-missing($e.end-date)))
 order by $fbu.id
 return $fbu;
diff --git a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
index b3f6200..b690f03 100644
--- a/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
+++ b/asterixdb/asterix-lang-aql/src/main/javacc/AQL.jj
@@ -769,7 +769,19 @@
 {
 }
 {
-  ( <IF> <NOT> <EXISTS>
+  (
+    LOOKAHEAD(1)
+    <IF>
+    <IDENTIFIER>
+    (
+      {
+        if(!token.image.equals("not")){
+           throw new ParseException("Expect word \"not\" at line " + token.beginLine + ", column "
+                         + token.beginColumn +"!");
+        }
+      }
+    )
+    <EXISTS>
     {
       return true;
     }
@@ -900,7 +912,9 @@
 {
 }
 {
-  ( <IF> <EXISTS>
+  (
+    LOOKAHEAD(1)
+    <IF> <EXISTS>
     {
       return true;
     }
@@ -2621,7 +2635,6 @@
   | <LOAD : "load">
   | <NGRAM : "ngram">
   | <NODEGROUP : "nodegroup">
-  | <NOT : "not">
   | <OFFSET : "offset">
   | <ON : "on">
   | <OPEN : "open">