cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/7] gfs2l: Add hash comments
Date: Mon, 20 May 2013 12:37:13 +0100	[thread overview]
Message-ID: <1369049836-8204-4-git-send-email-anprice@redhat.com> (raw)
In-Reply-To: <1369049836-8204-1-git-send-email-anprice@redhat.com>

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



  parent reply	other threads:[~2013-05-20 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 11:37 [Cluster-devel] [PATCH 1/7] gfs2-utils build: Fix reporting lack of check Andrew Price
2013-05-20 11:37 ` [Cluster-devel] [PATCH 2/7] gfs2l: Improve usage message and opt handling Andrew Price
2013-05-20 11:37 ` [Cluster-devel] [PATCH 3/7] gfs2l: Enable setting the type of a block Andrew Price
2013-05-20 11:37 ` Andrew Price [this message]
2013-05-20 11:37 ` [Cluster-devel] [PATCH 5/7] gfs2l: Add options to print block types and fields Andrew Price
2013-05-20 11:37 ` [Cluster-devel] [PATCH 6/7] gfs2l: Read from stdin by default Andrew Price
2013-05-20 11:37 ` [Cluster-devel] [PATCH 7/7] gfs2l: Improve grammar layout and path parsing Andrew Price
2013-05-20 12:08 ` [Cluster-devel] [PATCH 1/7] gfs2-utils build: Fix reporting lack of check Steven Whitehouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369049836-8204-4-git-send-email-anprice@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).