mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -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 */
|
||||
|
||||
%%
|
||||
|
@ -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 */
|
||||
|
||||
%%
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user