parameters: (self, base)
docstring: Convert a BOOST_METAPARSE_STRING mode document into one with
          this mode
docstring_summary: Convert a BOOST_METAPARSE_STRING mode document into one with
          this mode
docstring_tokens: Convert a BOOST_METAPARSE_STRING mode document into one with this mode
function: def convert_from(self, base):
          """Convert a BOOST_METAPARSE_STRING mode document into one with
          this mode"""
          if self.identifier == 'bmp':
              return base
          elif self.identifier == 'man':
              result = []
              prefix = 'BOOST_METAPARSE_STRING("'
              while True:
                  bmp_at = base.find(prefix)
                  if bmp_at == -1:
                      return ''.join(result) + base
                  else:
                      result.append(
                          base[0:bmp_at] + '::boost::metaparse::string<'
                      )
                      new_base = ''
                      was_backslash = False
                      comma = ''
                      for i in xrange(bmp_at + len(prefix), len(base)):
                          if was_backslash:
                              result.append(
                                  '{0}\'\\{1}\''.format(comma, base[i])
                              )
                              was_backslash = False
                              comma = ','
                          elif base[i] == '"':
                              new_base = base[i+2:]
                              break
                          elif base[i] == '\\':
                              was_backslash = True
                          else:
                              result.append('{0}\'{1}\''.format(comma, base[i]))
                              comma = ','
                      base = new_base
                      result.append('>')
function_tokens: def convert_from ( self , base ) : if self . identifier == 'bmp' : return base elif self . identifier == 'man' : result = [ ] prefix = 'BOOST_METAPARSE_STRING("' while True : bmp_at = base . find ( prefix ) if bmp_at == - 1 : return '' . join ( result ) + base else : result . append ( base [ 0 : bmp_at ] + '::boost::metaparse::string<' ) new_base = '' was_backslash = False comma = '' for i in xrange ( bmp_at + len ( prefix ) , len ( base ) ) : if was_backslash : result . append ( '{0}\'\\{1}\'' . format ( comma , base [ i ] ) ) was_backslash = False comma = ',' elif base [ i ] == '"' : new_base = base [ i + 2 : ] break elif base [ i ] == '\\' : was_backslash = True else : result . append ( '{0}\'{1}\'' . format ( comma , base [ i ] ) ) comma = ',' base = new_base result . append ( '>' )