Am Dienstag, 2. Januar 2007 21:12 schrieb Roman:
> Author: troman
> Date: Tue Jan  2 21:12:14 2007
> New Revision: 592
>
> URL: http://svn.gna.org/viewcvs/warzone?rev=592&view=rev
> Log:
> -Implemented C-like #include preprocessor directive for the scripting
> engine, can be used up to depth of MAX_SCR_INCLUDE_DEPTH. Unlike C
> counterpart main purpose is to reuse executable and non-executable code.
>
> Example:
> #include "multiplay/skirmish/my_include.slo"
>
> -Implemented C-like #define preprocessor directive. Nested macros allowed
> with up to depth of MAX_SCR_MACRO_DEPTH. -Added a script function for a
> fast feature iteration (returns burning as well as non-burning oil
> resources) -Replaced some custom Pumpkin routines with default FLEX
> routines
> -Some cleanups
>
> Modified:
>     trunk/lib/script/chat_parser.y
>     trunk/lib/script/parse.h
>     trunk/lib/script/script_lexer.l
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)


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.)

--Dennis

Attachment: pgp6eOyjADOMr.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to