vnadgir-ft / sparkle-g

Automatically exported from code.google.com/p/sparkle-g
Apache License 2.0
0 stars 0 forks source link

Looks like parentheses in filter expression are dropped #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  FILTER ( (?a || ?b) && (?c || ?d))

What is the expected output? What do you see instead?

FILTER (?a || ?b && ?c || ?d)

What version of the product are you using? On what operating system?

OSX. v4.

Please provide any additional information below.

Maybe here?

/* ANTLR V4 branded expressions */
expression
    : primaryExpression                                     # baseExpression
    | op=('*'|'/') expression                               # unaryMultiplicativeExpression
    | op=('+'|'-') expression                               # unaryAdditiveExpression
    | '!' expression                                        # unaryNegationExpression
    | expression op=('*'|'/') expression                    # multiplicativeExpression
    | expression op=('+'|'-') expression                    # additiveExpression
    | expression unaryLiteralExpression                     # unarySignedLiteralExpression   
    | expression NOT? IN '(' expressionList? ')'            # relationalSetExpression
    | expression op=('='|'!='|'<'|'>'|'<='|'>=') expression # relationalExpression
    | expression ('&&' expression)                          # conditionalAndExpression
    | expression ('||' expression)                          # conditionalOrExpression
    ;

SPARQL spec:
[119]   PrimaryExpression     ::=   BrackettedExpression | BuiltInCall | 
iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var
[120]   BrackettedExpression      ::=   '(' Expression ')'
...

I understand you are not maintaining this but thought you would like to know. 
I'd love to use this if the bug can be repaired.

Original issue reported on code.google.com by alanruttenberg@gmail.com on 9 May 2015 at 3:51