]> git.saurik.com Git - cycript.git/blobdiff - Cycript.l.in
Updated todo list with some random exception-related thoughts.
[cycript.git] / Cycript.l.in
index cb2871d9d57f0d91b80d0e58b9610ae2709e3839..7323e251cb9b95c920346be8fbba69842af36c4e 100644 (file)
@@ -37,7 +37,7 @@
 */
 /* }}} */
 
-// XXX: supposedly I will be screwed on very very long multi-line comments and need to replace these with a manual lexer. http://websrv.cs.fsu.edu/~engelen/courses/COP5621/Pr2.pdf
+/* XXX: supposedly I will be screwed on very very long multi-line comments and need to replace these with a manual lexer. http://websrv.cs.fsu.edu/~engelen/courses/COP5621/Pr2.pdf */
 
 %{
 #define YYLTYPE cy::location
@@ -107,7 +107,8 @@ int H(char c) {
     } else if (yyextra->size_ == 0) \
         value = YY_NULL; \
     else { \
-        size_t copy(std::min(size, yyextra->size_)); \
+        size_t copy(size); \
+        copy = (std::min(copy, yyextra->size_)); \
         memcpy(data, yyextra->data_, copy); \
         yyextra->data_ += copy; \
         yyextra->size_ -= copy; \
@@ -188,11 +189,14 @@ XMLName {XMLNameStart}{XMLNamePart}*
 @end
 
 @begin E4X
-"@"    L C return tk::At;
 "::"   L C return tk::ColonColon;
 ".."   L C return tk::PeriodPeriod;
 @end
 
+@begin E4X ObjectiveC
+"@"    L C return tk::At;
+@end
+
 "&"    L C return tk::Ampersand;
 "&&"   L C return tk::AmpersandAmpersand;
 "&="   L C return tk::AmpersandEqual;