Code review by Sattam
Fix for isse 314: Semicolons treated finicky-ily in CREATE FUNCTION
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_lsm_stabilization@1708 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-aql/src/main/javacc/AQL.jj b/asterix-aql/src/main/javacc/AQL.jj
index 8e3e203..be7d954 100644
--- a/asterix-aql/src/main/javacc/AQL.jj
+++ b/asterix-aql/src/main/javacc/AQL.jj
@@ -1371,7 +1371,7 @@
getCurrentScope().addNewVarSymbolToScope(var);
arity++;
})*)? <RIGHTPAREN> "{" funcBody = Expression() "}"
-
+ (";")?
{
signature = new FunctionSignature(defaultDataverse, functionName, arity);
getCurrentScope().addFunctionDescriptor(signature, false);
@@ -1428,11 +1428,12 @@
beginPos = getToken(0);
}
functionBodyExpr = Expression()
- "}"
+ "}"
{
endPos = getToken(0);
functionBody = extractFragment(beginPos.beginLine, beginPos.beginColumn, endPos.beginLine, endPos.beginColumn);
}
+ (";")?
{
signature = new FunctionSignature(dataverse, functionName, paramList.size());
getCurrentScope().addFunctionDescriptor(signature, false);