From d9e4f1bc19ef0b55d1694ad3bee4cfdb6bcbfd8e Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 12 Sep 2009 02:38:35 +0000 Subject: [PATCH] Fix #78 further: Support C++ style // comments. svn path=/trunk/yasm/; revision=2232 --- modules/parsers/gas/gas-token.re | 1 + modules/parsers/gas/tests/bin/gas-comment.asm | 2 ++ modules/parsers/gas/tests/bin/gas-comment.errwarn | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/parsers/gas/gas-token.re b/modules/parsers/gas/gas-token.re index a4ce5bba..b252ab43 100644 --- a/modules/parsers/gas/gas-token.re +++ b/modules/parsers/gas/gas-token.re @@ -480,6 +480,7 @@ scan: } else goto line_comment; } + "//" { goto line_comment; } ws+ { goto scan; } diff --git a/modules/parsers/gas/tests/bin/gas-comment.asm b/modules/parsers/gas/tests/bin/gas-comment.asm index ee68e554..0c265f7d 100644 --- a/modules/parsers/gas/tests/bin/gas-comment.asm +++ b/modules/parsers/gas/tests/bin/gas-comment.asm @@ -2,6 +2,8 @@ /* So is this */ +// and so is this + .byte 0 /* at end of line? */ .byte 0 /* at end of line, diff --git a/modules/parsers/gas/tests/bin/gas-comment.errwarn b/modules/parsers/gas/tests/bin/gas-comment.errwarn index 1fb55a30..6a29a1fd 100644 --- a/modules/parsers/gas/tests/bin/gas-comment.errwarn +++ b/modules/parsers/gas/tests/bin/gas-comment.errwarn @@ -1 +1 @@ --:23: warning: end of file in comment +-:25: warning: end of file in comment