Implement JSONiq scripting 1.1

Bug #1210071 reported by Ghislain Fourny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
High
Nicolae Brinza

Bug Description

The following changes need to be made in zorba to implement version 1.1 of scripting:

- The final expression of a block expression is optional (already done)

- The use of block expressions was generalized to any place where curly braces appear (except direct object constructors).
Expressions and statements can be fully mixed in control flow expressions. Statements are considered to return the empty sequence.

- The void statement (;) was introduced (it has not been yet added to the XQuery parser).

- The semantics of "sequential" was cleaned up but it probably has no consequence in Zorba (one should just check that expressions assigning variables are considered sequential even if the variable is local, because time elapses).

- The else clause is optional in a conditional statement. In case of ambiguity (nested ifs), an else clause is attached to the nearest if.

- The grammar now has conflicts, but this is to make it easier to read and understand. Ambiguities between expression and statement (example: BlockStatement vs. BlockExpression without final expression, or IfStatement vs. IfExpr with only statements) are resolved towards the statement. This is probably very similar to the way Nicolae already implemented BlockExpression vs. BlockStatement conflicts.

Changed in zorba:
assignee: nobody → Nicolae Brinza (nbrinza)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.