diff options
-rw-r--r-- | usr.sbin/config/config.y | 6 | ||||
-rw-r--r-- | usr.sbin/config/lang.l | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 8eef64c..9aa89e5 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -31,6 +31,7 @@ %type <str> Save_id %type <str> Opt_value %type <str> Dev +%token <str> PATH %{ @@ -128,6 +129,11 @@ Spec: | Config_spec SEMICOLON | + INCLUDE PATH SEMICOLON { + if (incignore == 0) + include($2, 0); + }; + | INCLUDE ID SEMICOLON { if (incignore == 0) include($2, 0); diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 2f2886e..b89c6c4 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -96,6 +96,7 @@ int yyerror(const char *); %} ID [A-Za-z_][-A-Za-z_0-9]* +PATH [./][-/.%^A-Za-z_0-9]+ %START TOEOL %% {ID} { @@ -165,6 +166,11 @@ ID [A-Za-z_][-A-Za-z_0-9]* return tok; /* otherwise continue scanning */ } +{PATH} { + BEGIN 0; + yylval.str = strdup(yytext); + return PATH; + } . { return yytext[0]; } %% |