Module Name: src Committed By: rillig Date: Sun Feb 7 12:05:36 UTC 2021
Modified Files: src/tests/lib/libcurses/director: testlang_conf.l Log Message: tests/libcurses: allow end-of-line comments in data lines as well This makes it possible to write small remarks directly in the affected line, which not only makes for a clean visual appearance but also shows up prominently in "cvs annotate" or "git blame", showing when such a remark has been modified. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libcurses/director/testlang_conf.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libcurses/director/testlang_conf.l diff -u src/tests/lib/libcurses/director/testlang_conf.l:1.10 src/tests/lib/libcurses/director/testlang_conf.l:1.11 --- src/tests/lib/libcurses/director/testlang_conf.l:1.10 Sun Feb 7 11:52:43 2021 +++ src/tests/lib/libcurses/director/testlang_conf.l Sun Feb 7 12:05:36 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: testlang_conf.l,v 1.10 2021/02/07 11:52:43 rillig Exp $ */ +/* $NetBSD: testlang_conf.l,v 1.11 2021/02/07 12:05:36 rillig Exp $ */ /*- * Copyright 2009 Brett Lymn <bl...@netbsd.org> @@ -364,15 +364,16 @@ include BEGIN(incl); return VARIABLE; } - /* comments, white-outs */ + /* whitespace, comments */ [ \t\r] | #.* ; -^#.*\n | -#.*\n | + +^[ \t\r]*#.*\n | \\\n | ^\n line++; /* eol on a line with data. need to process, return eol */ +#.*\n | \n { line++; return EOL;