diff options
author | Haru <haru@dotalux.com> | 2013-10-10 23:56:05 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-11-03 20:45:36 +0100 |
commit | 3b0cd11f980a48b903262c857fde1cd9c784c2e0 (patch) | |
tree | 2882d9e0958b57544e3135f928e4df2328958d0a /3rdparty/libconfig/extra/gen | |
parent | 6728c0fa88b84fccb6f179ae13cf8a15c1ea23a4 (diff) | |
download | hercules-3b0cd11f980a48b903262c857fde1cd9c784c2e0.tar.gz hercules-3b0cd11f980a48b903262c857fde1cd9c784c2e0.tar.bz2 hercules-3b0cd11f980a48b903262c857fde1cd9c784c2e0.tar.xz hercules-3b0cd11f980a48b903262c857fde1cd9c784c2e0.zip |
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 <haru@dotalux.com>
Diffstat (limited to '3rdparty/libconfig/extra/gen')
-rw-r--r-- | 3rdparty/libconfig/extra/gen/scanner.l | 10 |
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..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; } +<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, "\\"); } |