diffjson.searchpath package

Submodules

diffjson.searchpath.exceptions module

exception diffjson.searchpath.exceptions.LocationPathFormatError[source]

Bases: Exception

exception diffjson.searchpath.exceptions.LocationStepFormatError[source]

Bases: Exception

exception diffjson.searchpath.exceptions.NodenameFormatError[source]

Bases: Exception

exception diffjson.searchpath.exceptions.PredicateFormatError[source]

Bases: Exception

exception diffjson.searchpath.exceptions.PredicatesFormatError[source]

Bases: Exception

diffjson.searchpath.lex module

diffjson.searchpath.lex.t_error(t)[source]

diffjson.searchpath.parse module

diffjson.searchpath.parse.p_error(p)[source]
diffjson.searchpath.parse.p_indexlocationstep_index(p)[source]

indexlocationstep : nodenameindex

diffjson.searchpath.parse.p_indexlocationstep_indexwithpredicates(p)[source]

indexlocationstep : nodenameindex ‘[‘ predicates ‘]’

diffjson.searchpath.parse.p_locationpath_endwithdslash(p)[source]

locationpath : locationsteps separator

diffjson.searchpath.parse.p_locationpath_forpredicates(p)[source]

locationpath : locationsteps

diffjson.searchpath.parse.p_locationpath_separator(p)[source]

locationpath : separator locationsteps

diffjson.searchpath.parse.p_locationpath_separatorhonly(p)[source]

locationpath : separator

diffjson.searchpath.parse.p_locationstep_indexlocationstep(p)[source]

locationstep : indexlocationstep

diffjson.searchpath.parse.p_locationstep_nodename(p)[source]

locationstep : nodename

diffjson.searchpath.parse.p_locationstep_nodenamewithpredicates(p)[source]

locationstep : nodename ‘[‘ predicates ‘]’

diffjson.searchpath.parse.p_locationsteps_indexlocationstep(p)[source]

locationsteps : locationsteps indexlocationstep

diffjson.searchpath.parse.p_locationsteps_separator(p)[source]

locationsteps : locationsteps separator locationstep

diffjson.searchpath.parse.p_locationsteps_single(p)[source]

locationsteps : locationstep

diffjson.searchpath.parse.p_nodename_nodenameasterisk(p)[source]

nodename : NODENAMEASTERISK

diffjson.searchpath.parse.p_nodename_nodenamekey(p)[source]

nodename : NODENAMEKEY

diffjson.searchpath.parse.p_nodename_nodenameparent(p)[source]

nodename : NODENAMEPARENT

diffjson.searchpath.parse.p_nodename_nodenameself(p)[source]

nodename : NODENAMESELF

diffjson.searchpath.parse.p_nodenameindex(p)[source]

nodenameindex : NODENAMEINDEX

diffjson.searchpath.parse.p_predicate(p)[source]

predicate : locationpath ‘=’ VALUE

diffjson.searchpath.parse.p_predicates(p)[source]

predicates : predicate | predicate ‘,’ predicates

diffjson.searchpath.parse.p_separator_dslash(p)[source]

separator : DSLASH | DSLASH ‘[‘ predicates ‘]’ separator

diffjson.searchpath.parse.p_separator_slash(p)[source]

separator : SLASH

diffjson.searchpath.parse.parse(pathstring, debug=False)[source]

diffjson.searchpath.pathtypes module

class diffjson.searchpath.pathtypes.LocationPath(locationsteps)[source]

Bases: object

LocationPath Class.

Args:

locationsteps(list): List of LocationStep instance.

Attributes:

_locationsteps(list): List of locationsteps.

branch()[source]

Get branch locationpath.

Returns:
LocationPath: Branch locationpath.

[] for last locationstep.

current()[source]

Get top locationstep.

Returns:

LocationStep

class diffjson.searchpath.pathtypes.LocationStep(nodename, predicates=None)[source]

Bases: object

set_predicates(predicates)[source]
class diffjson.searchpath.pathtypes.NodenameAsterisk[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameBase(branchkey=None)[source]

Bases: object

class diffjson.searchpath.pathtypes.NodenameDescendant[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameIndex(branchkey)[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameKey(branchkey)[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameParent[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameRoot[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.NodenameSelf[source]

Bases: diffjson.searchpath.pathtypes.NodenameBase

class diffjson.searchpath.pathtypes.Predicate(locationpath, value)[source]

Bases: object

class diffjson.searchpath.pathtypes.Predicates(predicates=[])[source]

Bases: object

sorted()[source]

Module contents