--- cfg_syn_scan.l 2002/07/17 14:48:08 1.9
+++ cfg_syn_scan.l 2002/07/17 18:47:09 1.10
@@ -77,6 +77,12 @@
%x SS_PT
%x SS_CO_C
+/* the delimiting character for flexible quoting has to one a
+ special character c, i.e., one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ or
+ in C code: isprint(c) && !isspace(c) && !iscntrl(c) && !isalpha(i) && !isdigit(i) */
+FQDEL [\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~]
+FQDELN [^\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~]
+
%%
/* local variables */
@@ -209,19 +215,15 @@
return 0;
}
- /* flexible-quoted word (q(.)[^\1]\1)
- the delimiting character has to one a special character c, i.e.,
- one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ or in C code:
- isprint(c) && !isspace(c) && !iscntrl(c) && !isalpha(i) && !isdigit(i)
- */
-"q"[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~] {
+ /* flexible-quoted word (q(.)[^\1]\1) */
+"q"{FQDEL} {
cpStr = caStr;
nQuoteOpen = 1;
cQuoteOpen = yytext[1];
cQuoteClose = closing_brace(yytext[1]);
BEGIN(SS_FQ);
}
-<SS_FQ>\\[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~] {
+<SS_FQ>\\{FQDEL} {
if (yytext[1] == cQuoteOpen || yytext[1] == cQuoteClose) {
*cpStr++ = yytext[1];
}
@@ -233,7 +235,7 @@
<SS_FQ>\\\n[ \t]* {
/* no-op */
}
-<SS_FQ>[^\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~] {
+<SS_FQ>{FQDELN} {
char *cp = yytext;
while (*cp != '\0')
*cpStr++ = *cp++;
|