--- cfg_syn_scan.l 2002/07/06 18:44:46 1.6
+++ cfg_syn_scan.l 2002/07/08 13:45:13 1.7
@@ -101,6 +101,10 @@
<SS_CO_C>(.|\n) {
/* no-op */
}
+<SS_CO_C><<EOF>> {
+ cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated C-style block comment");
+ return 0;
+}
/* C++-style EOL comment */
"//"[^\n]* {
@@ -159,6 +163,10 @@
<SS_DQ>(.|\n) {
*cpStr++ = yytext[1];
}
+<SS_DQ><<EOF>> {
+ cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated double-quoted string");
+ return 0;
+}
/* single-quoted word ('...') */
\' {
@@ -189,6 +197,10 @@
<SS_SQ>(.|\n) {
*cpStr++ = yytext[1];
}
+<SS_SQ><<EOF>> {
+ cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated single-quoted string");
+ return 0;
+}
/* flexible-quoted word (q(.)[^\1]\1)
the delimiting character has to one a special character c, i.e.,
@@ -235,6 +247,10 @@
else
*cpStr++ = yytext[0];
}
+<SS_FQ><<EOF>> {
+ cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated flexible-quoted string");
+ return 0;
+}
/* special tokens */
";" { return T_SEP; }
|