summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/extra/gen/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/libconfig/extra/gen/scanner.l')
-rw-r--r--3rdparty/libconfig/extra/gen/scanner.l10
1 files changed, 9 insertions, 1 deletions
diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l
index bdc57a8d4..4b3048fab 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; }
+<SCRIPTBLOCK>([^\"]|\"[^\>])+ { scanctx_append_string(yyextra, yytext); }
+<SCRIPTBLOCK>\"\> {
+ yylval->sval = scanctx_take_string(yyextra);
+ BEGIN INITIAL;
+ return(TOK_STRING);
+ }
+
{include_open} { BEGIN INCLUDE; }
<INCLUDE>[^\"\\]+ { scanctx_append_string(yyextra, yytext); }
<INCLUDE>\\\\ { scanctx_append_string(yyextra, "\\"); }