@@ -155,6 +155,9 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner);
155155 * <xus> quoted string with Unicode escapes
156156 * <xusend> end of a quoted string with Unicode escapes, UESCAPE can follow
157157 * <xeu> Unicode surrogate pair in extended quoted string
158+ *
159+ * Remember to add an <<EOF>> case whenever you add a new exclusive state!
160+ * The default one is probably not the right thing.
158161 */
159162
160163%x xb
@@ -545,12 +548,13 @@ other.
545548<xus >{quotefail } {
546549/* throw back all but the quote */
547550yyless (1 );
548- /*handle possible UESCAPE in xusend mode */
551+ /*xusend state looks for possible UESCAPE */
549552BEGIN (xusend);
550553}
551- <xusend >{whitespace }
554+ <xusend >{whitespace } { /* stay in xusend state over whitespace */ }
552555<xusend >{other } |
553- <xusend >{xustop1 } {
556+ <xusend >{xustop1 } |
557+ <xusend ><<EOF>> {
554558/* no UESCAPE after the quote, throw back everything */
555559yyless (0 );
556560BEGIN (INITIAL);
@@ -725,12 +729,13 @@ other.
725729}
726730<xui >{dquote } {
727731yyless (1 );
728- /*handle possible UESCAPE in xuiend mode */
732+ /*xuiend state looks for possible UESCAPE */
729733BEGIN (xuiend);
730734}
731- <xuiend >{whitespace } { }
735+ <xuiend >{whitespace } {/* stay in xuiend state over whitespace */ }
732736<xuiend >{other } |
733- <xuiend >{xustop1 } {
737+ <xuiend >{xustop1 } |
738+ <xuiend ><<EOF>> {
734739/* no UESCAPE after the quote, throw back everything */
735740char *ident;
736741