[sr-dev] git:master: core: allow #! or !! in front of include_file and import_file

Daniel-Constantin Mierla miconda at gmail.com
Tue Jul 5 09:25:13 CEST 2011


Module: sip-router
Branch: master
Commit: 7a2e73a673a723dff90910642cd618f5f4c63d4e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7a2e73a673a723dff90910642cd618f5f4c63d4e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Jul  5 09:20:59 2011 +0200

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

- import_file and include_file can have the same syntax as preprocessor
  directives

---

 cfg.lex |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/cfg.lex b/cfg.lex
index 0518fea..97e2f52 100644
--- a/cfg.lex
+++ b/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; }




More information about the sr-dev mailing list