@@ -53,14 +53,14 @@ def t_FLOAT(self, t):
5353 return t
5454
5555
56- class ExtentedJsonPathParser (parser .JsonPathParser ):
56+ class ExtendedJsonPathParser (parser .JsonPathParser ):
5757 """Custom LALR-parser for JsonPath"""
5858
5959 tokens = ExtendedJsonPathLexer .tokens
6060
6161 def __init__ (self , debug = False , lexer_class = None ):
6262 lexer_class = lexer_class or ExtendedJsonPathLexer
63- super (ExtentedJsonPathParser , self ).__init__ (debug , lexer_class )
63+ super (ExtendedJsonPathParser , self ).__init__ (debug , lexer_class )
6464
6565 def p_jsonpath_operator_jsonpath (self , p ):
6666 """jsonpath : NUMBER operator NUMBER
@@ -107,7 +107,7 @@ def p_jsonpath_named_operator(self, p):
107107 elif p [1 ].startswith ("str(" ):
108108 p [0 ] = _string .Str (p [1 ])
109109 else :
110- super (ExtentedJsonPathParser , self ).p_jsonpath_named_operator (p )
110+ super (ExtendedJsonPathParser , self ).p_jsonpath_named_operator (p )
111111
112112 def p_expression (self , p ):
113113 """expression : jsonpath
@@ -171,6 +171,8 @@ def p_jsonpath_this(self, p):
171171 ('nonassoc' , 'ID' ),
172172 ]
173173
174+ # XXX This is here for backward compatibility
175+ ExtentedJsonPathParser = ExtendedJsonPathParser
174176
175177def parse (path , debug = False ):
176- return ExtentedJsonPathParser (debug = debug ).parse (path )
178+ return ExtendedJsonPathParser (debug = debug ).parse (path )
0 commit comments