2014-12-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	Fix compile error with flex version 2.5.38 and above.
	* src/scan-gram.l (YY_USER_INIT): Define twice, first for flex
	version up to 2.5.37, then again for version 2.5.38 and above.

diff --git a/src/scan-gram.l b/src/scan-gram.l
index 555e695..121ac8f 100644
--- a/src/scan-gram.l
+++ b/src/scan-gram.l
@@ -46,7 +46,7 @@
 #define YY_DECL GRAM_LEX_DECL
 
 #define YY_USER_INIT                                    \
-   code_start = scanner_cursor = loc->start;            \
+   scanner_cursor = loc->start;                         \
 
 /* Location of scanner cursor.  */
 static boundary scanner_cursor;
@@ -148,6 +148,11 @@ eqopt    ([[:space:]]*=)?
 
 %%
 %{
+/* Flex versions before 2.5.38 execute YY_USER_INIT before this block.  */
+#undef YY_USER_INIT
+#define YY_USER_INIT                                    \
+   code_start = scanner_cursor = loc->start;            \
+
   /* Nesting level.  Either for nested braces, or nested angle brackets
      (but not mixed).  */
   int nesting PACIFY_CC (= 0);
