From 3b0cd11f980a48b903262c857fde1cd9c784c2e0 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 10 Oct 2013 23:56:05 +0200 Subject: Added support for blocks (parsed as multiline strings) in libconfig - If this doesn't make any sense right now, fear not. It'll make sense in an upcoming update. - Special thanks to Yommy, Ind. Signed-off-by: Haru --- 3rdparty/libconfig/extra/gen/scanner.l | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '3rdparty/libconfig/extra') diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l index bdc57a8d4..a7befd11d 100644 --- a/3rdparty/libconfig/extra/gen/scanner.l +++ b/3rdparty/libconfig/extra/gen/scanner.l @@ -100,7 +100,7 @@ float ([-+]?([0-9]*)?\.[0-9]*([eE][-+]?[0-9]+)?)|([-+]?([0-9]+)(\.[0 comment (#|\/\/).*$ include_open ^[ \t]*@include[ \t]+\" -%x COMMENT STRING INCLUDE +%x COMMENT STRING INCLUDE SCRIPTBLOCK %% @@ -129,6 +129,14 @@ include_open ^[ \t]*@include[ \t]+\" return(TOK_STRING); } +\<\? { BEGIN SCRIPTBLOCK; } +([^\?]|\?[^\>])+ { scanctx_append_string(yyextra, yytext); } +\?\> { + yylval->sval = scanctx_take_string(yyextra); + BEGIN INITIAL; + return(TOK_STRING); + } + {include_open} { BEGIN INCLUDE; } [^\"\\]+ { scanctx_append_string(yyextra, yytext); } \\\\ { scanctx_append_string(yyextra, "\\"); } -- cgit v1.2.3-70-g09d2