|
4 | 4 | * procedural language
|
5 | 5 | *
|
6 | 6 | * IDENTIFICATION
|
7 |
| - * $PostgreSQL: pgsql/src/pl/plpgsql/src/scan.l,v 1.30 2003/11/29 19:52:12 pgsql Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/pl/plpgsql/src/scan.l,v 1.31 2004/02/24 22:06:32 tgl Exp $ |
8 | 8 | *
|
9 | 9 | * This software is copyrighted by Jan Wieck - Hamburg.
|
10 | 10 | *
|
@@ -63,6 +63,7 @@ intplpgsql_SpaceScanned = 0;
|
63 | 63 |
|
64 | 64 | %option8bit
|
65 | 65 | %optionnever-interactive
|
| 66 | +%optionnodefault |
66 | 67 | %optionnounput
|
67 | 68 | %optionnoyywrap
|
68 | 69 |
|
@@ -272,20 +273,21 @@ dump{ return O_DUMP;}
|
272 | 273 | BEGIN IN_STRING;
|
273 | 274 | }
|
274 | 275 | <IN_STRING>\\.{ }
|
| 276 | +<IN_STRING>\\{/* can only happen with \ at EOF */ } |
275 | 277 | <IN_STRING>''{ }
|
276 | 278 | <IN_STRING>'{
|
277 | 279 | yyleng -= (yytext - start_charpos);
|
278 | 280 | yytext = start_charpos;
|
279 | 281 | BEGIN INITIAL;
|
280 | 282 | return T_STRING;
|
281 | 283 | }
|
| 284 | +<IN_STRING>[^'\\]+{ } |
282 | 285 | <IN_STRING><<EOF>>{
|
283 | 286 | plpgsql_error_lineno = start_lineno;
|
284 | 287 | ereport(ERROR,
|
285 | 288 | (errcode(ERRCODE_DATATYPE_MISMATCH),
|
286 | 289 | errmsg("unterminated string")));
|
287 | 290 | }
|
288 |
| -<IN_STRING>[^'\\]*{ } |
289 | 291 |
|
290 | 292 | /* ----------
|
291 | 293 | * Any unmatched character is returned as is
|
|