diff options
author | wlestes <wlestes> | 2002-06-19 13:26:43 +0000 |
---|---|---|
committer | wlestes <wlestes> | 2002-06-19 13:26:43 +0000 |
commit | fe1f0bacbd35cd11f491f85a5c0f54c88b470bea (patch) | |
tree | 863df7e3bb417fce35eda41356ca9370f7ceb781 /scan.l | |
parent | 161cd091bd115813a91adcef369b459f8fca83d2 (diff) | |
download | flex-fe1f0bacbd35cd11f491f85a5c0f54c88b470bea.tar.gz |
address typos in NEWS; add --posix option for ERE parsing the way posix wants it; update the TODO file
Diffstat (limited to 'scan.l')
-rw-r--r-- | scan.l | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -246,6 +246,7 @@ LEXOPT [aceknopr] input ACTION_IFDEF("YY_NO_INPUT", ! option_sense); interactive interactive = option_sense; lex-compat lex_compat = option_sense; + posix-compat posix_compat = option_sense; main { action_define( "YY_MAIN", option_sense ); /* Override yywrap */ @@ -362,7 +363,13 @@ LEXOPT [aceknopr] ^{OPTWS}"<" BEGIN(SC); return '<'; ^{OPTWS}"^" return '^'; \" BEGIN(QUOTE); return '"'; - "{"/[[:digit:]] BEGIN(NUM); return '{'; + "{"/[[:digit:]] { + BEGIN(NUM); + if ( lex_compat || posix_compat ) + return BEGIN_REPEAT_POSIX; + else + return BEGIN_REPEAT_FLEX; + } "$"/([[:blank:]]|{NL}) return '$'; {WS}"%{" { @@ -573,7 +580,13 @@ LEXOPT [aceknopr] } "," return ','; - "}" BEGIN(SECT2); return '}'; + "}" { + BEGIN(SECT2); + if ( lex_compat || posix_compat ) + return END_REPEAT_POSIX; + else + return END_REPEAT_FLEX; + } . { synerr( _( "bad character inside {}'s" ) ); |