This one seems to create a problem, but I don't exactly know why:
../lib/script/script_lexer.l: In function ‘scriptSetInputBuffer’:
../lib/script/script_lexer.l:733: error: invalid lvalue in assignment
The line it means is apparently:
YY_CURRENT_BUFFER = yy_scan_bytes(pBuffer, size);
YY_CURRENT_BUFFER is defined to:
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
Should be fixed in r598.
Looks like some inconsistancies between different FLEX implementations.
GnuWin32 flex defines it as a pointer to a yy_buffer_state structure.
Is there perhaps a function to handle those assignments via a Flex
function?
If I search for YY_CURRENT_BUFFER in the created lex.c file, I also find
YY_CURRENT_BUFFER_LVALUE which is refrenced by several functions which seem
to deal with creation of buffers.
Also it seems as if Flex has a buffer of YY_BUF_SIZE by default and doesn't
need to have the whole file in the buffer... (There seem to be some input
streams used.)
Flex can't use physfs for input. Maybe by rewriting some cryptic macros,
which is probably not worth it. Just setting FLEX buffer size to YY_BUF_SIZE
would result in a crash, since it is not FLEX that is taking care of the
input in our case.
Troman
--Dennis
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev