Skip to content

Commit

Permalink
Change "loadmodule" to "module"
Browse files Browse the repository at this point in the history
More uniform with the "route" and "core" declarations
  • Loading branch information
liviuchircu committed Feb 2, 2016
1 parent 86c0694 commit 7591563
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cfg.lex
Expand Up @@ -287,7 +287,7 @@ LOGOP {EQUAL_T}|{GT}|{LT}|{GTE}|{LTE}|{DIFF}|{MATCH}|{NOTMATCH}|{NOT}|{AND}|{OR
SCRIPTVAR_START "$"

/* loadmodule */
LOADMOD_START "loadmodule"
LOADMOD_START "module"

/* config vars. */
DEBUG debug
Expand Down Expand Up @@ -773,7 +773,7 @@ IMPORTFILE "import_file"
BEGIN(INITIAL);
yylval.strval = s_buf.s;
memset(&s_buf, 0, sizeof(s_buf));
return LOADMOD;
return MODULE;
}
<SCRIPTVARS>{LPAREN} { count(); np++; yymore(); svar_tlen = yyleng; }
<SCRIPTVARS>{RPAREN} {
Expand Down
11 changes: 5 additions & 6 deletions cfg.y
Expand Up @@ -375,7 +375,6 @@ enum parse_state {
%token SERVER_SIGNATURE
%token SERVER_HEADER
%token USER_AGENT_HEADER
%token LOADMODULE
%token MPATH
%token MODPARAM
%token MAXBUFFER
Expand Down Expand Up @@ -447,7 +446,7 @@ enum parse_state {
%token <strval> ID
%token <strval> STRING
%token <strval> SCRIPTVAR
%token <strval> LOADMOD
%token <strval> MODULE
%token <strval> IPV6ADDR

/* other */
Expand Down Expand Up @@ -514,7 +513,7 @@ statements: statements statement {}
;

statement: assign_stm
| loadmodule_stm
| module_stm
| {rt=REQUEST_ROUTE;} route_stm
| {rt=FAILURE_ROUTE;} failure_route_stm
| {rt=ONREPLY_ROUTE;} onreply_route_stm
Expand Down Expand Up @@ -667,7 +666,7 @@ lmod_assigns: lmod_assigns lmod_assign { }
| lmod_assign { }
;

loadmodule_stm: LOADMOD LBRACE lmod_assigns RBRACE {
module_stm: MODULE LBRACE lmod_assigns RBRACE {
if (load_module($1) < 0) {
yyerrorf("failed to load \"%s\" module\n", $1);
YYABORT;
Expand All @@ -677,7 +676,7 @@ loadmodule_stm: LOADMOD LBRACE lmod_assigns RBRACE {
YYABORT;
}
}
| LOADMOD LBRACE RBRACE {
| MODULE LBRACE RBRACE {
if (load_module($1) < 0) {
yyerrorf("failed to load \"%s\" module\n", $1);
YYABORT;
Expand All @@ -687,7 +686,7 @@ loadmodule_stm: LOADMOD LBRACE lmod_assigns RBRACE {
YYABORT;
}
}
| LOADMOD {
| MODULE {
if (load_module($1) < 0) {
yyerrorf("failed to load \"%s\" module\n", $1);
YYABORT;
Expand Down

0 comments on commit 7591563

Please sign in to comment.