Changeset 603

Show
Ignore:
Timestamp:
07/22/08 12:40:21 (4 months ago)
Author:
moenicke
Message:

* changed m_contents from std::string to unicode

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/rphp/compiler/parser/rphp_parser.cpp

    r561 r603  
    44#include "rphp_parser.h" 
    55 
    6  
     6#include <unistr.h> 
    77#include "phplexer.h" 
    88 
     
    1010  { 
    1111 
    12   void parser::tokenize( const std::string& contents ) 
     12  void parser::tokenize( const UnicodeString& contents ) 
    1313  { 
    1414    m_contents =  contents; 
     
    4444  std::string parser::tokenText(rint64 begin,  rint64 end) 
    4545  { 
    46 #ifdef PENDING_THOMAS  
     46#ifdef PENDING_THOMAS 
    4747    // TODO pending 
    4848    return  m_contents.mid(begin, end - begin + 1); 
    49 #endif  
     49#endif 
    5050    return  ""; 
    5151  } 
     
    6262  } 
    6363 
    64 #ifdef PEDNING_THOMAS  
    65   // TODO pending 
    6664  // custom error recovery 
    67   void parser::expectedToken(int /*expected*/,  rint64 /*where*/,  const std::string& name) 
     65  void parser::yy_expected_token(int kind,  std::size_t token,  const char* name) 
    6866  { 
    69     reportProblem( parser::Error, QString("Expected token \"%1\"").arg(name)); 
     67    //    reportProblem( parser::Error, QString("Expected token \"%1\"").arg(name)); 
    7068  } 
    7169 
    72   void parser::expectedSymbol(int /*expectedSymbol*/,  const std::string& name) 
     70  void parser::yy_expected_symbol(int kind,  const char* name) 
    7371  { 
     72#ifdef PEDNING_THOMAS 
     73    // TODO pending 
     74 
    7475    rint64 line; 
    7576    rint64 col; 
     
    8889                   .arg(line) 
    8990                   .arg(col)); 
     91#endif 
    9092  } 
    91  
    92 #endif 
    9393 
    9494  void parser::setDebug( bool debug ) 
  • trunk/rphp/compiler/parser/rphp_parser.h

    r561 r603  
    99#include <kdev-pg-allocator.h> 
    1010#include <kdev-pg-token-stream.h> 
     11#include <unistr.h> 
    1112 
    1213namespace rphp 
     
    233234       * and any parse*() method can be called. 
    234235       */ 
    235       void tokenize( const std::string& contents ); 
     236      void tokenize( const UnicodeString& contents ); 
    236237 
    237238      enum ProblemType { 
     
    252253        OnlyNewObject 
    253254      }; 
    254       std::string m_contents; 
     255      UnicodeString m_contents; 
    255256      bool m_debug; 
    256257