From 7b577e8a23f522d51fef4c2f60edf1a25e2923a4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 23 May 2016 20:47:36 -0700 Subject: Allow whitespace between @ and ; in comments. * parser.l (grammar): Recognize {WS}* between @ and ; (or the legacy #) in comments. * txr.1: Documentation updated. --- parser.l | 4 ++-- txr.1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.l b/parser.l index 9ac79228..e1cfe82f 100644 --- a/parser.l +++ b/parser.l @@ -908,12 +908,12 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} yy_push_state(SPECIAL, yyscanner); } -^@[#;].*{NL} { +^@{WS}*[#;].*{NL} { /* eat whole line comment */ yyextra->lineno++; } -@[#;].* { +@{WS}*[#;].* { /* comment to end of line */ } diff --git a/txr.1 b/txr.1 index b7fa864c..91520a8e 100644 --- a/txr.1 +++ b/txr.1 @@ -909,7 +909,7 @@ are output on standard output. .SS* Comments A query may contain comments which are delimited by the sequence .code @; -and extend to the end of the line. No whitespace can occur between the +and extend to the end of the line. Whitespace can occur between the .code @ and .codn ; . -- cgit v1.2.3