Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to parse tok!="..." when used in the AQL short form #494

Closed
thomaskrause opened this issue Feb 12, 2016 · 1 comment
Closed

fails to parse tok!="..." when used in the AQL short form #494

thomaskrause opened this issue Feb 12, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@thomaskrause
Copy link
Member

E.g. this does not work

ZH1Diff="INS"
. tok!=""

will result in a line 2:7-8 variable "3" not bound (use linguistic operators) error but

ZH1Diff="INS"
& tok!=""
& #1 . #2

works as expected. Using something different than tokalso works.

@thomaskrause thomaskrause self-assigned this Feb 12, 2016
@thomaskrause thomaskrause added this to the 3.4.0 milestone Feb 12, 2016
@thomaskrause thomaskrause changed the title AQL fails to parse tok!="..." when used in the short form fails to parse tok!="..." when used in the AQL short form Feb 12, 2016
@thomaskrause
Copy link
Member Author

This is caused by an ambiguity of the "!=" token. This token can be used as comparison operator in the variable expression or as an an AQL operator between two nodes/references. Since the operators "==" (same value) and "!=" (different value) are non-binding they only make sense as additional constraints, not as primary ones. So they should not be used directly between nodes in the short form.

The fix should clarify this ambiguity and make sure "==" and "!=" as AQL operators can only occur between references, not directly between the nodes.

thomaskrause added a commit that referenced this issue Feb 15, 2016
… node definitions.

This removes an ambiquity for the "!=" token. E.g.

tok!="the"

could be interpreted as "All token which don't have "the" as value" or as

tok & "the" & #1 != #2

The latter one is semantically invalid (no binding) so the ambiquity is solved by not allowing the AQL operator "!=" and "==" in short AQL definitions.

This fixes #494.
@thomaskrause thomaskrause modified the milestones: 3.4.0, 3.4.0-rc4 Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant