aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_file.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfg_file.l')
-rw-r--r--src/cfg_file.l8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cfg_file.l b/src/cfg_file.l
index 48cf18c44..fd83be66c 100644
--- a/src/cfg_file.l
+++ b/src/cfg_file.l
@@ -130,6 +130,14 @@ yes|YES|no|NO|[yY]|[nN] yylval.flag=parse_flag(yytext); return FLAG;
<incl>[ \t]* /* eat the whitespace */
<incl>[^ \t\n]+ { /* got the include file name */
/* got the include file name */
+ /* Handle XML case */
+ int len = strlen (yytext);
+ if (strcmp (yytext + len - 4, ".xml") == 0) {
+ if (!read_xml_config (cfg, yytext)) {
+ yyerror ("invalid xml detected");
+ }
+ BEGIN(INITIAL);
+ }
if ( include_stack_ptr >= MAX_INCLUDE_DEPTH ) {
yyerror ("yylex: includes nested too deeply" );
return -1;