[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser

Ralf Habacker ralf.habacker at gmail.com
Mon Jun 25 22:44:58 UTC 2012


SVN commit 1303066 by habacker:

Fixed hanging bug because of not supported escape sequences.
There may be more cases because escape sequence handling is still not complete.

CCBUG: 302384

 M  +2 -2      lexer.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp #1303065:1303066
@@ -175,7 +175,7 @@
             main =
                 (!ch_p('L') >> ch_p('\'')
                  >> *((anychar_p - '\'' - '\\')
-                      | (ch_p('\\') >> (ch_p('\'') | '\\')))
+                 | (ch_p('\\') >> (ch_p('\'') | '\\' | 'n' | '0')))
                  >> '\'')
                 [ self.result_ = construct_<Token>(Token_char_literal, arg1, arg2)];
         }
@@ -210,7 +210,7 @@
 };
 
 Lexer::CharRule gr_stringLiteral =
-    ch_p('"') >> *((anychar_p - '"' - '\\') | str_p("\\\"") | "\\\\") >> '"';
+    ch_p('"') >> *((anychar_p - '"' - '\\') | str_p("\\\"") | "\\\\" | "\\n") >> '"';
 Lexer::CharRule gr_whiteSpace = blank_p | (ch_p('\\') >> eol_p);
 Lexer::CharRule gr_lineComment = (str_p("//") >> (*(anychar_p - eol_p)));
 Lexer::CharRule gr_multiLineComment = confix_p("/*", *anychar_p, "*/");




More information about the umbrello-devel mailing list