Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : proto

Dir     : e17/proto/edje_cc


Modified Files:
        edje.l 


Log Message:

keep track of line no. in c comments
try to handle embedded c comments

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/edje_cc/edje.l,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- edje.l      8 Sep 2004 02:50:29 -0000       1.13
+++ edje.l      8 Sep 2004 03:12:01 -0000       1.14
@@ -8,8 +8,9 @@
     int col = 0;
     static int comment = 0, cpp_comment = 0;
 
-    #define COMMENT_START() comment = 1; 
-    #define COMMENT_END()   comment = 0;
+    #define COMMENT_START() BEGIN(c_comment); comment++; 
+    #define COMMENT_END()   comment--; \
+                            if (comment <= 0) { comment = 0; BEGIN(INITIAL); }
     #define CPP_COMMENT()   comment = 1; cpp_comment = 1;
 
     #define WHITE_SPACE()   col += yyleng;
@@ -137,13 +138,14 @@
 \/\/                           { CPP_COMMENT(); }
 #                   { CPP_COMMENT(); }
 
-"/*"                { BEGIN(c_comment); }
-<c_comment>{
-  [^*]*
+"/*"                { COMMENT_START(); }
 
-  "*"+[^*/\n]*
+<c_comment>{
+  "/*"           { COMMENT_START(); }
+  \n             { NEW_LINE(); }
 
-  "*"+"/"           { BEGIN(INITIAL); }
+  "*/"           { COMMENT_END(); }
+  .
 }
 
 




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to