Re: [Boost-bugs] [Boost C++ Libraries] #2860: misdetected unexpected character

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2860: misdetected unexpected character
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-24 08:34:23


#2860: misdetected unexpected character
--------------------------------------+-------------------------------------
  Reporter: jgresula_at_[hidden] | Owner: danieljames
      Type: Bugs | Status: assigned
 Milestone: Boost 1.39.0 | Component: quickbook
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment(by danieljames):

 (In [51949]) 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2860#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC