diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2002-06-19 13:26:43 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2002-06-19 13:26:43 +0000 |
commit | 5916310e885f01716646b84bd6eecdb9a7d502ae (patch) | |
tree | 9bef35b96f2dfc5792ee4b261a0bfc465029b435 /scan.l | |
parent | d9b7016720d0406396beeac6d957c15b72651132 (diff) |
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" ) ); |