You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
I wanted to add x[y] operator to the SQL dialect I am parsing using pyparsing.
I have added a small fix to pyparsing infixNotation which allows left-assoc binary operator with opExpr tuple - see example below.
The chage is 5 lines long - is this a usefull addition? should I send a PR?
In the absence of this feature, I've had to push dereferencing of []'s up into the operand itself. In your case, this would have the effect of pushing the []'s "operator" to the very top of the list.
I'm interested in this idea, but not sure it completely works. Is an expr_term always a valid body of []'s? If it is just for numeric indexing into a sequence, you might define a pseudo-operator that only takes an arith expression in the []'s, and then add it as a unary left-assoc operator.
I'll dabble with this and see what I get. Thanks for the interesting idea!
Hi ,
I wanted to add x[y] operator to the SQL dialect I am parsing using pyparsing.
I have added a small fix to pyparsing infixNotation which allows left-assoc binary operator with opExpr tuple - see example below.
The chage is 5 lines long - is this a usefull addition? should I send a PR?
The text was updated successfully, but these errors were encountered: