浏览代码

core: allow #! or !! in front of include_file and import_file

- import_file and include_file can have the same syntax as preprocessor
  directives
Daniel-Constantin Mierla 14 年之前
父节点
当前提交
7a2e73a673
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cfg.lex

+ 3 - 0
cfg.lex

@@ -652,7 +652,10 @@ IMPORTFILE      "import_file"
 <INITIAL>{WHILE}	{ count(); yylval.strval=yytext; return WHILE; }
 
 <INITIAL>{INCLUDEFILE}  { count(); BEGIN(INCLF); }
+<INITIAL>{PREP_START}{INCLUDEFILE}  { count(); BEGIN(INCLF); }
+
 <INITIAL>{IMPORTFILE}  { count(); BEGIN(IMPTF); }
+<INITIAL>{PREP_START}{IMPORTFILE}  { count(); BEGIN(IMPTF); }
 
 <INITIAL>{CFG_SELECT}	{ count(); yylval.strval=yytext; return CFG_SELECT; }
 <INITIAL>{CFG_RESET}	{ count(); yylval.strval=yytext; return CFG_RESET; }