]> granicus.if.org Git - yasm/commitdiff
Fix #78 further: Support C++ style // comments.
authorPeter Johnson <peter@tortall.net>
Sat, 12 Sep 2009 02:38:35 +0000 (02:38 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 12 Sep 2009 02:38:35 +0000 (02:38 -0000)
svn path=/trunk/yasm/; revision=2232

modules/parsers/gas/gas-token.re
modules/parsers/gas/tests/bin/gas-comment.asm
modules/parsers/gas/tests/bin/gas-comment.errwarn

index a4ce5bba00bc59cfab85aa361a96b905d8b6f1af..b252ab43796517065144eaa6abdb62559777e570 100644 (file)
@@ -480,6 +480,7 @@ scan:
             } else
                 goto line_comment;
         }
+        "//"                    { goto line_comment; }
 
         ws+                     { goto scan; }
 
index ee68e554be8cff827a04c9314e9bdb46d3087f09..0c265f7dd4bb71ee6e0c277c747f7485daa010fc 100644 (file)
@@ -2,6 +2,8 @@
 
 /* So is this */
 
+// and so is this
+
 .byte 0                /* at end of line? */
 
 .byte 0                /* at end of line,
index 1fb55a3053322130cb7eff7a87841dec045dfe90..6a29a1fd93df1224ee1c4d5a29c83c8cb2fa7d56 100644 (file)
@@ -1 +1 @@
--:23: warning: end of file in comment
+-:25: warning: end of file in comment