original_docstring: Parse a describe string.
  
          Parse a @describe 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:
  
              @describe boundary @external as any external system.
              @describe threat @cwe_123_information_disclosure as any disclosure of private \
              or secret data.
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @describe component @external:@user as the user account
  
          Args:
              describe: Describe string to parse.
              source: PTSSource instance for the @describe line.
  
          Returns:
              Nothing.
          
docstring: Parse a describe string.
  Parse a @describe 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.
  
  @describe boundary @external as any external system.
  @describe threat @cwe_123_information_disclosure as any disclosure of private \
  or secret data.
  
  But a component alias must provide the boundary identifier as well as the component
  identifier, for example.
  
  @describe component @external:@user as the user account
docstring_tokens: Parse a describe string . Parse a @describe 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 . @describe boundary @external as any external system . @describe threat @cwe_123_information_disclosure as any disclosure of private \ or secret data . But a component alias must provide the boundary identifier as well as the component identifier for example . @describe component @external : @user as the user account
code: def _parse_describe(self, describe, source):
          """Parse a describe string.
  
          Parse a @describe 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:
  
              @describe boundary @external as any external system.
              @describe threat @cwe_123_information_disclosure as any disclosure of private \
              or secret data.
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @describe component @external:@user as the user account
  
          Args:
              describe: Describe string to parse.
              source: PTSSource instance for the @describe line.
  
          Returns:
              Nothing.
          """
  
          match = re.findall(self.parse_patterns["describe"], describe, re.M | re.I)
          if match:
              pclass = remove_excessive_space(match[0][0].lower())
              if pclass == "component":
                  boundary_id = text_to_identifier(remove_excessive_space(match[0][1]))
                  describe_id = text_to_identifier(remove_excessive_space(match[0][2]))
                  text = remove_excessive_space(match[0][3])
  
                  # TODO consider refactoring into a seperate add_description method
                  if not boundary_id in self.pclass_table[pclass]:
                      raise ValueError("unknown boundary identifier {} in {}".format(boundary_id, source))
  
                  if not describe_id in self.pclass_table[pclass][boundary_id]:
                      raise ValueError("unknown {} identifier {} in {}".format(pclass, describe_id, source))
  
                  self.pclass_table[pclass][boundary_id][describe_id].desc = text
              else:
                  boundary_id = None
                  describe_id = text_to_identifier(remove_excessive_space(match[0][1]))
                  text = remove_excessive_space(match[0][3])
  
                  if not describe_id in self.pclass_table[pclass]:
                      raise ValueError("unknown {} identifier {} in {}".format(pclass, describe_id, source))
  
                  self.pclass_table[pclass][describe_id].desc = text
          else:
              raise ValueError("@describe line contains an invalid pattern: {}".format(source))
code_tokens: def _parse_describe ( self , describe , source ) : match = re . findall ( self . parse_patterns [ "describe" ] , describe , re . M | re . I ) if match : pclass = remove_excessive_space ( match [ 0 ] [ 0 ] . lower ( ) ) if pclass == "component" : boundary_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 1 ] ) ) describe_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 2 ] ) ) text = remove_excessive_space ( match [ 0 ] [ 3 ] ) if not boundary_id in self . pclass_table [ pclass ] : raise ValueError ( "unknown boundary identifier {} in {}" . format ( boundary_id , source ) ) if not describe_id in self . pclass_table [ pclass ] [ boundary_id ] : raise ValueError ( "unknown {} identifier {} in {}" . format ( pclass , describe_id , source ) ) self . pclass_table [ pclass ] [ boundary_id ] [ describe_id ] . desc = text else : boundary_id = None describe_id = text_to_identifier ( remove_excessive_space ( match [ 0 ] [ 1 ] ) ) text = remove_excessive_space ( match [ 0 ] [ 3 ] ) if not describe_id in self . pclass_table [ pclass ] : raise ValueError ( "unknown {} identifier {} in {}" . format ( pclass , describe_id , source ) ) self . pclass_table [ pclass ] [ describe_id ] . desc = text else : raise ValueError ( "@describe line contains an invalid pattern: {}" . format ( source ) )
short_docstring: Parse a describe string.
short_docstring_tokens: Parse a describe string .
comment: """Parse a describe string.
  
          Parse a @describe 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:
  
              @describe boundary @external as any external system.
              @describe threat @cwe_123_information_disclosure as any disclosure of private \
              or secret data.
  
          But a component alias must provide the boundary identifier as well as the component
          identifier, for example:
  
              @describe component @external:@user as the user account
  
          Args:
              describe: Describe string to parse.
              source: PTSSource instance for the @describe line.
  
          Returns:
              Nothing.
          """$SEP$# TODO consider refactoring into a seperate add_description method