From: Andre Noll Date: Wed, 12 Jul 2017 09:43:25 +0000 (+0200) Subject: config_file.l: Instruct flex to create a reentrant scanner. X-Git-Tag: v1.0.1~1 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=427af673591a006e351dcf76e5957ed67d4e0477;hp=427af673591a006e351dcf76e5957ed67d4e0477;p=lopsub.git config_file.l: Instruct flex to create a reentrant scanner. This requires some modifications: * Most functions take an additional yyscan_t argument. * We must call yylex_init and yylex_destroy(). * Accessor methods must be used to get yytext and yylen. We used to set the initial start condition in lls_convert_config(), before the call to yylex(). For reentrant scanners, however, the BEGIN macro can not be used in the user code section where lls_convert_config() is located. But pushing a state works and should be equivalent. The generated scanner is not reentrant yet because it still has global variables. This issue will be addressed in a subsequent patch. ---