original_docstring: Parse an alias string.
  
          Parse an @alias tag string using the defined regular expression and add the elements
          to the internal data structure. A boundary and threat string can simply provide the
          identifier and name string, for example:
  
              @alias boundary @external to External System
              @alias threat @cwe_123_information_disclosure to CWE123 Information Disclosure
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @alias component @external:@user to User
  
          Args:
              alias: Alias string to parse.
              source: PTSSource instance for the @alias line.
  
          Returns:
              Nothing.
          
docstring: Parse an alias string.
  Parse an @alias tag string using the defined regular expression and add the elements
  to the internal data structure. A boundary and threat string can simply provide the
  identifier and name string, for example.
  
  @alias boundary @external to External System
  @alias threat @cwe_123_information_disclosure to CWE123 Information Disclosure
  
  But a component alias must provide the boundary identifier as well as the component
  identifier, for example.
  
  @alias component @external:@user to User
docstring_tokens: Parse an alias string . Parse an @alias tag string using the defined regular expression and add the elements to the internal data structure . A boundary and threat string can simply provide the identifier and name string for example . @alias boundary @external to External System @alias threat @cwe_123_information_disclosure to CWE123 Information Disclosure But a component alias must provide the boundary identifier as well as the component identifier for example . @alias component @external : @user to User
code: def _parse_alias(self, alias, source):
          """Parse an alias string.
  
          Parse an @alias tag string using the defined regular expression and add the elements
          to the internal data structure. A boundary and threat string can simply provide the
          identifier and name string, for example:
  
              @alias boundary @external to External System
              @alias threat @cwe_123_information_disclosure to CWE123 Information Disclosure
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @alias component @external:@user to User
  
          Args:
              alias: Alias string to parse.
              source: PTSSource instance for the @alias line.
  
          Returns:
              Nothing.
          """
          # TODO add support for references in aliases. Useful for CWEs etc
          # TODO check multilines works
          match = re.findall(self.parse_patterns["alias"], alias, re.M | re.I)
          if match:
              pclass = remove_excessive_space(match[0][0])
              if pclass == "component":
                  boundary_id = text_to_identifier(remove_excessive_space(match[0][1]))
                  alias_id = text_to_identifier(remove_excessive_space(match[0][2]))
                  text = remove_excessive_space(match[0][3])
                  self.alias_table[pclass](boundary_id, text, alias_id)
              else:
                  alias_id = text_to_identifier(remove_excessive_space(match[0][1]))
                  text = remove_excessive_space(match[0][3])
                  self.alias_table[pclass](text, alias_id)
          else:
              raise ValueError("@alias line contains an invalid pattern {}".format(source))
code_tokens: def _parse_alias ( self , alias , source ) : match = re . findall ( self . parse_patterns [ "alias" ] , alias , re . M | re . I ) if match : pclass = remove_excessive_space ( match [ 0 ] [ 0 ] ) if pclass == "component" : boundary_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 1 ] ) ) alias_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 2 ] ) ) text = remove_excessive_space ( match [ 0 ] [ 3 ] ) self . alias_table [ pclass ] ( boundary_id , text , alias_id ) else : alias_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 1 ] ) ) text = remove_excessive_space ( match [ 0 ] [ 3 ] ) self . alias_table [ pclass ] ( text , alias_id ) else : raise ValueError ( "@alias line contains an invalid pattern {}" . format ( source ) )
short_docstring: Parse an alias string.
short_docstring_tokens: Parse an alias string .
comment: """Parse an alias string.
  
          Parse an @alias tag string using the defined regular expression and add the elements
          to the internal data structure. A boundary and threat string can simply provide the
          identifier and name string, for example:
  
              @alias boundary @external to External System
              @alias threat @cwe_123_information_disclosure to CWE123 Information Disclosure
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @alias component @external:@user to User
  
          Args:
              alias: Alias string to parse.
              source: PTSSource instance for the @alias line.
  
          Returns:
              Nothing.
          """$SEP$# TODO add support for references in aliases. Useful for CWEs etc$SEP$# TODO check multilines works