[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 4/7] gfs2l: Add hash comments



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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]