single quote. To include a single quote into such an argument,
precede it by a backslash. Anything contained in single quotes is
furthermore subject to C-like substitutions for
- <literal>\n</literal> (new line), <literal>\t</literal> (tab), and
- <literal>\</literal><replaceable>digits</replaceable> (octal).
+ <literal>\n</literal> (new line), <literal>\t</literal> (tab),
+ <literal>\</literal><replaceable>digits</replaceable> (octal),
+ <literal>\x</literal><replaceable>digits</replaceable> (hexadecimal).
</para>
<para>
xqstart {quote}
xqdouble {quote}{quote}
xqinside [^\\']+
-xqescape [\\][^0-7]
+xqescape [\\][^0-7x]
xqoctesc [\\][0-7]{1,3}
+xqhexesc [\\]x[0-9A-Fa-f]{1,2}
/* $foo$ style quotes ("dollar quoting")
* The quoted string starts with $foo$ where "foo" is an optional string
<xq>{xqoctesc} {
ECHO;
}
+<xq>{xqhexesc} {
+ ECHO;
+ }
<xq>{quotecontinue} {
ECHO;
}
(char) strtol(yytext + 1, NULL, 8));
}
+{xqhexesc} {
+ /* hex case */
+ appendPQExpBufferChar(output_buf,
+ (char) strtol(yytext + 2, NULL, 16));
+ }
+
"\\". { emit(yytext + 1, 1); }
{other}|\n { ECHO; }