Changeset 603
- Timestamp:
- 07/22/08 12:40:21 (4 months ago)
- Files:
-
- trunk/rphp/compiler/parser/rphp_parser.cpp (modified) (5 diffs)
- trunk/rphp/compiler/parser/rphp_parser.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/rphp/compiler/parser/rphp_parser.cpp
r561 r603 4 4 #include "rphp_parser.h" 5 5 6 6 #include <unistr.h> 7 7 #include "phplexer.h" 8 8 … … 10 10 { 11 11 12 void parser::tokenize( const std::string& contents )12 void parser::tokenize( const UnicodeString& contents ) 13 13 { 14 14 m_contents = contents; … … 44 44 std::string parser::tokenText(rint64 begin, rint64 end) 45 45 { 46 #ifdef PENDING_THOMAS 46 #ifdef PENDING_THOMAS 47 47 // TODO pending 48 48 return m_contents.mid(begin, end - begin + 1); 49 #endif 49 #endif 50 50 return ""; 51 51 } … … 62 62 } 63 63 64 #ifdef PEDNING_THOMAS65 // TODO pending66 64 // 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) 68 66 { 69 reportProblem( parser::Error,QString("Expected token \"%1\"").arg(name));67 // reportProblem( parser::Error, QString("Expected token \"%1\"").arg(name)); 70 68 } 71 69 72 void parser:: expectedSymbol(int /*expectedSymbol*/, const std::string&name)70 void parser::yy_expected_symbol(int kind, const char* name) 73 71 { 72 #ifdef PEDNING_THOMAS 73 // TODO pending 74 74 75 rint64 line; 75 76 rint64 col; … … 88 89 .arg(line) 89 90 .arg(col)); 91 #endif 90 92 } 91 92 #endif93 93 94 94 void parser::setDebug( bool debug ) trunk/rphp/compiler/parser/rphp_parser.h
r561 r603 9 9 #include <kdev-pg-allocator.h> 10 10 #include <kdev-pg-token-stream.h> 11 #include <unistr.h> 11 12 12 13 namespace rphp … … 233 234 * and any parse*() method can be called. 234 235 */ 235 void tokenize( const std::string& contents );236 void tokenize( const UnicodeString& contents ); 236 237 237 238 enum ProblemType { … … 252 253 OnlyNewObject 253 254 }; 254 std::string m_contents;255 UnicodeString m_contents; 255 256 bool m_debug; 256 257
