Răsfoiți Sursa

Fix bug handling python and C++ strings.

Fixes #2860.

Merged revisions 51949 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r51949 | danieljames | 2009-03-24 08:34:09 +0000 (Tue, 24 Mar 2009) | 21 lines
  
  Use our own escape character parser.
  
  We're currently using the spirit escaped character parser. This is a
  strict C parser and causes parse errors for code that we probably should
  accept, such as any hexadecimal encoded characters with a value greater
  than the maximum value of the current platform's 'char'.  This is \x7F
  on some platforms so it rejects '\x80' upwards. As well as rejecting
  characters that might be valid, it also means that quickbook will act
  differently on different platforms.
  
  In python strings, '\xaaa' is equivalent to '\xaa' + 'a', but the spirit
  parser interprets this as a character with value '0xaaa'. So we probably
  should accept these.
  
  I also think we should be liberal about what we accept. IMO it isn't our
  job to enforce correct C++/python, just to create a reasonable
  rendering of our input. So rather than write a parser which understands
  the various types of escapes, I just wrote one that ignores any
  character following a backslash.
  
  Refs #2860.
........


[SVN r52064]
Daniel James 17 ani în urmă
părinte
comite
4f6ffb6105
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      tools/quickbook

+ 1 - 1
tools/quickbook

@@ -1 +1 @@
-Subproject commit 02d3e8e5e8829f4d42530e5c0e3c679d46195c31
+Subproject commit ed6ff64dcc634f17f9369cb6bd71df22b430cac8

粤ICP备19079148号