diff options
author | John Millaway <john43@users.sourceforge.net> | 2006-03-28 17:56:31 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2006-03-28 17:56:31 +0000 |
commit | f6faf861a7f39e893f502107a6c767aadc82ac49 (patch) | |
tree | 2e9dca2026811200b37ff974a12ec6232aac2f65 /tests | |
parent | f1f579a3b404e67c0c4410676330294bb6c22e7e (diff) |
Extended syntax excluded for lex/posix compat mode.
Comments discarded inside (?x:) patterns.
Added test in test suite for comments in extended patterns.
Documented syntax additions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-extended/scanner.l | 16 | ||||
-rw-r--r-- | tests/test-extended/test.input | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/test-extended/scanner.l b/tests/test-extended/scanner.l index e027ec5..222c7dd 100644 --- a/tests/test-extended/scanner.l +++ b/tests/test-extended/scanner.l @@ -1,20 +1,20 @@ /* * This file is part of flex. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR @@ -31,7 +31,7 @@ %} %option 8bit outfile="scanner.c" prefix="test" -%option nounput nomain noyywrap +%option nounput nomain noyywrap %option warn @@ -41,7 +41,7 @@ abc(?# Single Line Comment )def ECHO; ghi(?# - multi-line + multi-line comment )jkl ECHO; @@ -53,6 +53,10 @@ mno(?# )pqr ECHO; (?# Start of a rule.)stu ECHO; vwxyz(?#End of a rule.) ECHO; +A(?x: B + /* comment */ + C D) ECHO; + \n ECHO; %% diff --git a/tests/test-extended/test.input b/tests/test-extended/test.input index b0883f3..829e23d 100644 --- a/tests/test-extended/test.input +++ b/tests/test-extended/test.input @@ -1 +1,2 @@ abcdefghijklmnopqrstuvwxyz +ABCD |