def p_jsonpath_named_operator(self, p):
        "jsonpath : NAMED_OPERATOR"
        if p[1] == 'len':
            p[0] = _iterable.Len()
        elif p[1] == 'sorted':
            p[0] = _iterable.SortedThis()
        elif p[1].startswith("split("):
            p[0] = _string.Split(p[1])
        elif p[1].startswith("sub("):
            p[0] = _string.Sub(p[1])
        else:
            super(ExtentedJsonPathParser, self).p_jsonpath_named_operator(p)
def p_jsonpath_named_operator ( self , p ) : if p [ 1 ] == 'len' : p [ 0 ] = _iterable . Len ( ) elif p [ 1 ] == 'sorted' : p [ 0 ] = _iterable . SortedThis ( ) elif p [ 1 ] . startswith ( "split(" ) : p [ 0 ] = _string . Split ( p [ 1 ] ) elif p [ 1 ] . startswith ( "sub(" ) : p [ 0 ] = _string . Sub ( p [ 1 ] ) else : super ( ExtentedJsonPathParser , self ) . p_jsonpath_named_operator ( p )
jsonpath : NAMED_OPERATOR