Package src :: Package com :: Package deviceatlas :: Package device :: Module identifier_match_result :: Class IdentifierMatchResult
[frames] | no frames]

Class IdentifierMatchResult

Collects the MatchCandidates found during the token trie walk along with their token position. Positions for dynamic properties are also recorded for later use.

@author DeviceAtlas Limited

Instance Methods
 
__init__(self, identifier)
 
add_match_candidates(self, token_position, match_candidates_found)
Store a MatchCandidate along with it's token position.
 
add_dynamic_property_position(self, component, position_before_dynamic_value)
The component and character position are stored in a map with the component as the key as it will later be accessed.
Properties
  identifier
  match_candidates
  dynamic_property_positions
Method Details

add_match_candidates(self, token_position, match_candidates_found)

 

Store a MatchCandidate along with it's token position. The token position is used by the lookaround constraints.

:param component: :param position_before_dynamic_value: :return:

add_dynamic_property_position(self, component, position_before_dynamic_value)

 

The component and character position are stored in a map with the component as the key as it will later be accessed.

If the same token appears multiple times in an Identifier then only the last position will be stored with it. It may appear sensible to store all positions for a component to avoid losing the first position but it is more efficient to only store one position and to use rule constraints to prevent more than one of the same component being added.

:param component: :param position_before_dynamic_value: :return:


Property Details

identifier

Get Method:
unreachable.identifier(self)

match_candidates

Get Method:
unreachable.match_candidates(self)

dynamic_property_positions

Get Method:
unreachable.dynamic_property_positions(self)