[Cluster-devel] [PATCH 4/7] gfs2l: Add hash comments
Andrew Price
anprice at redhat.com
Mon May 20 11:37:13 UTC 2013
gfs2l now recognises # as a line comment. This was added in order to
enable writing executable scripts with "#!gfs2l -f" at the top of the
file.
Signed-off-by: Andrew Price <anprice at redhat.com>
---
gfs2/libgfs2/lexer.l | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gfs2/libgfs2/lexer.l b/gfs2/libgfs2/lexer.l
index 36e1c2d..7fe1aba 100644
--- a/gfs2/libgfs2/lexer.l
+++ b/gfs2/libgfs2/lexer.l
@@ -32,7 +32,9 @@ number ({decnumber}|{hexnumber})
offset \+{number}
id {letter}({letter}|{decdigit}|\.)*
string \'([^\']|\\\')*\'
-comment \/\/.*\n
+ccomment \/\/.*\n
+shcomment \#.*\n
+comment ({ccomment}|{shcomment})
whitespace [ \t\r]+
%%
--
1.8.1.4
More information about the Cluster-devel
mailing list