|
4 | 4 | * procedural language
|
5 | 5 | *
|
6 | 6 | * IDENTIFICATION
|
7 |
| - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.26 2003/05/29 22:30:02 tgl Exp $ |
| 7 | + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.27 2003/06/17 04:35:03 tgl Exp $ |
8 | 8 | *
|
9 | 9 | * This software is copyrighted by Jan Wieck - Hamburg.
|
10 | 10 | *
|
@@ -168,25 +168,59 @@ dump{ return O_DUMP;}
|
168 | 168 |
|
169 | 169 | /* ----------
|
170 | 170 | * Special word rules
|
| 171 | + * |
| 172 | + * We set plpgsql_error_lineno in each rule so that errors reported |
| 173 | + * in the pl_comp.c subroutines will point to the right place. |
171 | 174 | * ----------
|
172 | 175 | */
|
173 |
| -{identifier}{returnplpgsql_parse_word(yytext);} |
174 |
| -{identifier}{space}*\.{space}*{identifier}{returnplpgsql_parse_dblword(yytext);} |
175 |
| -{identifier}{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{returnplpgsql_parse_tripword(yytext); } |
176 |
| -{identifier}{space}*%TYPE{returnplpgsql_parse_wordtype(yytext);} |
177 |
| -{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{returnplpgsql_parse_dblwordtype(yytext); } |
178 |
| -{identifier}{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{returnplpgsql_parse_tripwordtype(yytext); } |
179 |
| -{identifier}{space}*%ROWTYPE{returnplpgsql_parse_wordrowtype(yytext);} |
180 |
| -{identifier}{space}*\.{space}*{identifier}{space}*%ROWTYPE{returnplpgsql_parse_dblwordrowtype(yytext);} |
181 |
| - |
182 |
| -\${digit}+{returnplpgsql_parse_word(yytext);} |
183 |
| -\${digit}+{space}*\.{space}*{identifier}{returnplpgsql_parse_dblword(yytext);} |
184 |
| -\${digit}+{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{returnplpgsql_parse_tripword(yytext); } |
185 |
| -\${digit}+{space}*%TYPE{returnplpgsql_parse_wordtype(yytext);} |
186 |
| -\${digit}+{space}*\.{space}*{identifier}{space}*%TYPE{returnplpgsql_parse_dblwordtype(yytext); } |
187 |
| -\${digit}+{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{returnplpgsql_parse_tripwordtype(yytext); } |
188 |
| -\${digit}+{space}*%ROWTYPE{returnplpgsql_parse_wordrowtype(yytext);} |
189 |
| -\${digit}+{space}*\.{space}*{identifier}{space}*%ROWTYPE{returnplpgsql_parse_dblwordrowtype(yytext);} |
| 176 | +{identifier}{ |
| 177 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 178 | +returnplpgsql_parse_word(yytext); } |
| 179 | +{identifier}{space}*\.{space}*{identifier}{ |
| 180 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 181 | +returnplpgsql_parse_dblword(yytext); } |
| 182 | +{identifier}{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{ |
| 183 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 184 | +returnplpgsql_parse_tripword(yytext); } |
| 185 | +{identifier}{space}*%TYPE{ |
| 186 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 187 | +returnplpgsql_parse_wordtype(yytext); } |
| 188 | +{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{ |
| 189 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 190 | +returnplpgsql_parse_dblwordtype(yytext); } |
| 191 | +{identifier}{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{ |
| 192 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 193 | +returnplpgsql_parse_tripwordtype(yytext); } |
| 194 | +{identifier}{space}*%ROWTYPE{ |
| 195 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 196 | +returnplpgsql_parse_wordrowtype(yytext); } |
| 197 | +{identifier}{space}*\.{space}*{identifier}{space}*%ROWTYPE{ |
| 198 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 199 | +returnplpgsql_parse_dblwordrowtype(yytext); } |
| 200 | +\${digit}+{ |
| 201 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 202 | +returnplpgsql_parse_word(yytext); } |
| 203 | +\${digit}+{space}*\.{space}*{identifier}{ |
| 204 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 205 | +returnplpgsql_parse_dblword(yytext); } |
| 206 | +\${digit}+{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{ |
| 207 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 208 | +returnplpgsql_parse_tripword(yytext); } |
| 209 | +\${digit}+{space}*%TYPE{ |
| 210 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 211 | +returnplpgsql_parse_wordtype(yytext); } |
| 212 | +\${digit}+{space}*\.{space}*{identifier}{space}*%TYPE{ |
| 213 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 214 | +returnplpgsql_parse_dblwordtype(yytext); } |
| 215 | +\${digit}+{space}*\.{space}*{identifier}{space}*\.{space}*{identifier}{space}*%TYPE{ |
| 216 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 217 | +returnplpgsql_parse_tripwordtype(yytext); } |
| 218 | +\${digit}+{space}*%ROWTYPE{ |
| 219 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 220 | +returnplpgsql_parse_wordrowtype(yytext); } |
| 221 | +\${digit}+{space}*\.{space}*{identifier}{space}*%ROWTYPE{ |
| 222 | +plpgsql_error_lineno =plpgsql_scanner_lineno(); |
| 223 | +returnplpgsql_parse_dblwordrowtype(yytext); } |
190 | 224 |
|
191 | 225 | {digit}+{return T_NUMBER;}
|
192 | 226 |
|
|