* quoted string with Unicode escapes
* end of a quoted string with Unicode escapes, UESCAPE can follow
* Unicode surrogate pair in extended quoted string
+ *
+ * Remember to add an <> case whenever you add a new exclusive state!
+ * The default one is probably not the right thing.
*/
%x xb
{quotefail} {
/* throw back all but the quote */
yyless(1);
- /* handle possible UESCAPE in xusend mode */
+ /* xusend state looks for possible UESCAPE */
BEGIN(xusend);
}
-{whitespace}
+{whitespace} { /* stay in xusend state over whitespace */ }
{other} |
-{xustop1} {
+{xustop1} |
+<> {
/* no UESCAPE after the quote, throw back everything */
yyless(0);
BEGIN(INITIAL);
}
{dquote} {
yyless(1);
- /* handle possible UESCAPE in xuiend mode */
+ /* xuiend state looks for possible UESCAPE */
BEGIN(xuiend);
}
-{whitespace} { }
+{whitespace} { /* stay in xuiend state over whitespace */ }
{other} |
-{xustop1} {
+{xustop1} |
+<> {
/* no UESCAPE after the quote, throw back everything */
char *ident;
* extended quoted strings (support backslash escape sequences)
* $foo$ quoted strings
* quoted identifier with Unicode escapes
- * end of a quoted identifier with Unicode escapes, UESCAPE can follow * quoted string with Unicode escapes
+ * end of a quoted identifier with Unicode escapes, UESCAPE can follow
+ * quoted string with Unicode escapes
* end of a quoted string with Unicode escapes, UESCAPE can follow
*
* Note: we intentionally don't mimic the backend's state; we have