diff options
| author | Tom Lane | 2004-02-24 22:06:32 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-02-24 22:06:32 +0000 |
| commit | fa96a5e15b69707c2e05aa04bc73fa88b9a85f7a (patch) | |
| tree | f96b6765fbef3523cd5e323153b298be26a66add /contrib | |
| parent | 58e705320e0c9e691a3fd2bd544f375ee0ca23d6 (diff) | |
Add %option nodefault to all our flex lexers. Fix a couple of rule gaps
exposed thereby. AFAICT these would not lead to any worse problems than
junk emitted on the backend's stdout, but we should have the option to
catch possible worse errors in future.
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/cube/cubescan.l | 3 | ||||
| -rw-r--r-- | contrib/seg/segscan.l | 3 | ||||
| -rw-r--r-- | contrib/tsearch/parser.l | 1 | ||||
| -rw-r--r-- | contrib/tsearch2/wordparser/parser.l | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/contrib/cube/cubescan.l b/contrib/cube/cubescan.l index c5e1a20f6b1..a47dc4334aa 100644 --- a/contrib/cube/cubescan.l +++ b/contrib/cube/cubescan.l @@ -26,6 +26,7 @@ void cube_scanner_finish(void); %option 8bit %option never-interactive +%option nodefault %option nounput %option noyywrap %option prefix="cube_yy" @@ -44,7 +45,7 @@ float ({integer}|{real})([eE]{integer})? \( yylval = "("; return O_PAREN; \) yylval = ")"; return C_PAREN; \, yylval = ")"; return COMMA; -[ ]+ /* discard spaces */ +[ \t\n\r\f]+ /* discard spaces */ . return yytext[0]; /* alert parser of the garbage */ %% diff --git a/contrib/seg/segscan.l b/contrib/seg/segscan.l index 21eb5fa0207..b2a3bbe6845 100644 --- a/contrib/seg/segscan.l +++ b/contrib/seg/segscan.l @@ -25,6 +25,7 @@ void seg_scanner_finish(void); %option 8bit %option never-interactive +%option nodefault %option nounput %option noyywrap %option prefix="seg_yy" @@ -44,7 +45,7 @@ float ({integer}|{real})([eE]{integer})? \< yylval.text = "<"; return EXTENSION; \> yylval.text = ">"; return EXTENSION; \~ yylval.text = "~"; return EXTENSION; -[ ]+ /* discard spaces */ +[ \t\n\r\f]+ /* discard spaces */ . return yytext[0]; /* alert parser of the garbage */ %% diff --git a/contrib/tsearch/parser.l b/contrib/tsearch/parser.l index 17ac21dcd1c..3eb411dded3 100644 --- a/contrib/tsearch/parser.l +++ b/contrib/tsearch/parser.l @@ -16,6 +16,7 @@ YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */ %option 8bit %option never-interactive +%option nodefault %option nounput %option noyywrap diff --git a/contrib/tsearch2/wordparser/parser.l b/contrib/tsearch2/wordparser/parser.l index e36c19355c5..e80f5fea903 100644 --- a/contrib/tsearch2/wordparser/parser.l +++ b/contrib/tsearch2/wordparser/parser.l @@ -18,6 +18,7 @@ YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */ %option 8bit %option never-interactive +%option nodefault %option nounput %option noyywrap |
