Adding ArrayConstructorNode and correct format
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/39328ab0 Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/39328ab0 Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/39328ab0 Branch: refs/heads/master Commit: 39328ab0e51a7455b793f51c4be60f6214a18979 Parents: 609930e Author: Christina Pavlopoulou <[email protected]> Authored: Thu Jun 2 17:00:25 2016 -0700 Committer: Christina Pavlopoulou <[email protected]> Committed: Thu Jun 2 17:00:25 2016 -0700 ---------------------------------------------------------------------- vxquery-core/src/main/javacc/xquery-grammar.jj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/39328ab0/vxquery-core/src/main/javacc/xquery-grammar.jj ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/javacc/xquery-grammar.jj b/vxquery-core/src/main/javacc/xquery-grammar.jj index a1d9de9..115531d 100644 --- a/vxquery-core/src/main/javacc/xquery-grammar.jj +++ b/vxquery-core/src/main/javacc/xquery-grammar.jj @@ -97,7 +97,7 @@ public class XMLQuery { PARSER_END(XMLQuery) - + TOKEN_MGR_DECLS : { public Stack<Integer> stateStack = new Stack<Integer>(); @@ -105,7 +105,7 @@ TOKEN_MGR_DECLS : { public int offset = 0; - void CommonTokenAction(Token t) {} + void CommonTokenAction(Token t) {} /** @@ -148,13 +148,13 @@ TOKEN_MGR_DECLS : { */ private boolean isState(int state) { - for (int i = 0; i < stateStack.size(); i++) { + for (int i = 0; i < stateStack.size(); i++) { if(stateStack.elementAt(i) == state) { - return true; + return true; } - } - return false; + } + return false; } /** @@ -2450,8 +2450,8 @@ ASTNode JsonConstructor() : { result = ArrayConstructor() { - return result; - } + return result; + } } ASTNode ArrayConstructor() : @@ -2463,7 +2463,7 @@ ASTNode ArrayConstructor() : (start="[") expr=Expr() "]" { ArrayConstructorNode an = new ArrayConstructorNode(createSourceLocation(start)); an.setExpression(expr); - return an; + return an; } } @@ -2825,7 +2825,7 @@ void FTSelection() : void FTOrExpr() : {} { - FTOr() + FTOr() } void FTOr() :
