summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter-parser.ypp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-13 16:25:50 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-14 16:18:22 -0800
commit069f39e8a1ebee3e4a4ce8302d0099842876782b (patch)
tree57d8de5f57d65878f8ef560e2884b9dee08e9323 /src/map/magic-interpreter-parser.ypp
parentf9563edf69f083287630f4b17db70d97524196d6 (diff)
downloadtmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.gz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.bz2
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.tar.xz
tmwa-069f39e8a1ebee3e4a4ce8302d0099842876782b.zip
Some formatting fixes before I go insane
Also delete the French translation from ladmin.
Diffstat (limited to 'src/map/magic-interpreter-parser.ypp')
-rw-r--r--src/map/magic-interpreter-parser.ypp468
1 files changed, 234 insertions, 234 deletions
diff --git a/src/map/magic-interpreter-parser.ypp b/src/map/magic-interpreter-parser.ypp
index 5fe2646..274819c 100644
--- a/src/map/magic-interpreter-parser.ypp
+++ b/src/map/magic-interpreter-parser.ypp
@@ -211,41 +211,41 @@ find_constant(char *name);
%%
-spellconf : /* empty */
+spellconf : /* empty */
{}
| spellconf_option semicolons spellconf
{}
- ;
+ ;
-semicolons : /* empty */
- {}
+semicolons : /* empty */
+ {}
| semicolons ';'
{}
- ;
+ ;
-proc_formals_list : /* empty */
- { CREATE ($$, proc_t, 1); }
- | proc_formals_list_ne
+proc_formals_list : /* empty */
+ { CREATE($$, proc_t, 1); }
+ | proc_formals_list_ne
{ $$ = $1; }
- ;
+ ;
-proc_formals_list_ne : ID
- { CREATE ($$, proc_t, 1);
+proc_formals_list_ne : ID
+ { CREATE($$, proc_t, 1);
$$->args_nr = 1;
$$->args = (int*)malloc(sizeof(int));
$$->args[0] = intern_id($1);
}
- | proc_formals_list_ne ',' ID
+ | proc_formals_list_ne ',' ID
{ $$ = $1;
$$->args = (int*)realloc($$->args, sizeof(int) * (1 + $$->args_nr));
$$->args[$$->args_nr++] = intern_id($3);
}
- ;
+ ;
-spellconf_option : ID '=' expr
- {
+spellconf_option : ID '=' expr
+ {
int var_id;
if (find_constant($1)) {
fail(@1.first_line, 0, "Attempt to redefine constant `%s' as global\n", $1);
@@ -255,8 +255,8 @@ spellconf_option : ID '=' expr
magic_eval(&magic_default_env, &magic_conf.vars[var_id], $3);
}
}
- | CONST ID '=' expr
- {
+ | CONST ID '=' expr
+ {
val_t var;
magic_eval(&magic_default_env, &var, $4);
bind_constant($2, &var, @1.first_line);
@@ -264,7 +264,7 @@ spellconf_option : ID '=' expr
| TELEPORT_ANCHOR ID ':' expr '=' expr
{
teleport_anchor_t *anchor;
- CREATE (anchor, teleport_anchor_t, 1);
+ CREATE(anchor, teleport_anchor_t, 1);
anchor->name = $2;
anchor->invocation = magic_eval_str(&magic_default_env, $4);
anchor->location = $6;
@@ -275,7 +275,7 @@ spellconf_option : ID '=' expr
free(anchor);
failed_flag = 0;
}
- | PROCEDURE ID '(' proc_formals_list ')' '=' effect_list
+ | PROCEDURE ID '(' proc_formals_list ')' '=' effect_list
{
proc_t *proc = $4;
proc->name = $2;
@@ -296,26 +296,26 @@ spellconf_option : ID '=' expr
failed_flag = 0;
}
-spell_flags : /* empty */
- { $$ = 0; }
- | LOCAL spell_flags
- { if ($2 & SPELL_FLAG_LOCAL)
+spell_flags : /* empty */
+ { $$ = 0; }
+ | LOCAL spell_flags
+ { if ($2 & SPELL_FLAG_LOCAL)
fail(@1.first_line, @1.first_column, "`LOCAL' specified more than once");
$$ = $2 | SPELL_FLAG_LOCAL;
}
- | NONMAGIC spell_flags
- { if ($2 & SPELL_FLAG_NONMAGIC)
+ | NONMAGIC spell_flags
+ { if ($2 & SPELL_FLAG_NONMAGIC)
fail(@1.first_line, @1.first_column, "`NONMAGIC' specified more than once");
$$ = $2 | SPELL_FLAG_NONMAGIC;
}
- | SILENT spell_flags
- { if ($2 & SPELL_FLAG_SILENT)
+ | SILENT spell_flags
+ { if ($2 & SPELL_FLAG_SILENT)
fail(@1.first_line, @1.first_column, "`SILENT' specified more than once");
$$ = $2 | SPELL_FLAG_SILENT;
}
-argopt : /* empty */
+argopt : /* empty */
{ $$.ty = SPELLARG_NONE; }
| '(' ID ':' arg_ty ')'
{ $$.id = intern_id($2);
@@ -330,23 +330,23 @@ arg_ty : PC_F
;
-value : DIR
- { $$.ty = TY_DIR;
+value : DIR
+ { $$.ty = TY_DIR;
$$.v.v_int = $1; }
- | INT
- { $$.ty = TY_INT;
+ | INT
+ { $$.ty = TY_INT;
$$.v.v_int = $1; }
- | STRING
- { $$.ty = TY_STRING;
+ | STRING
+ { $$.ty = TY_STRING;
$$.v.v_string = $1; }
- ;
+ ;
-expr : value
- { $$ = magic_new_expr(EXPR_VAL);
+expr : value
+ { $$ = magic_new_expr(EXPR_VAL);
$$->e.e_val = $1; }
- | ID
- {
+ | ID
+ {
val_t *val;
if ((val = find_constant($1))) {
$$ = magic_new_expr(EXPR_VAL);
@@ -356,128 +356,128 @@ expr : value
$$->e.e_id = intern_id($1);
}
}
- | area
- { $$ = magic_new_expr(EXPR_AREA);
+ | area
+ { $$ = magic_new_expr(EXPR_AREA);
$$->e.e_area = $1; }
- | expr '+' expr
- { BIN_EXPR($$, "+", $1, $3, @1.first_line, @1.first_column); }
- | expr '-' expr
- { BIN_EXPR($$, "-", $1, $3, @1.first_line, @1.first_column); }
- | expr '*' expr
- { BIN_EXPR($$, "*", $1, $3, @1.first_line, @1.first_column); }
- | expr '%' expr
- { BIN_EXPR($$, "%", $1, $3, @1.first_line, @1.first_column); }
- | expr '/' expr
- { BIN_EXPR($$, "/", $1, $3, @1.first_line, @1.first_column); }
- | expr '<' expr
- { BIN_EXPR($$, ">", $3, $1, @1.first_line, @1.first_column); }
- | expr '>' expr
- { BIN_EXPR($$, ">", $1, $3, @1.first_line, @1.first_column); }
- | expr '&' expr
- { BIN_EXPR($$, "&", $1, $3, @1.first_line, @1.first_column); }
- | expr '^' expr
- { BIN_EXPR($$, "^", $1, $3, @1.first_line, @1.first_column); }
- | expr '|' expr
- { BIN_EXPR($$, "|", $1, $3, @1.first_line, @1.first_column); }
- | expr SHL expr
- { BIN_EXPR($$, "<<", $1, $3, @1.first_line, @1.first_column); }
- | expr SHR expr
- { BIN_EXPR($$, ">>", $1, $3, @1.first_line, @1.first_column); }
- | expr LTE expr
- { BIN_EXPR($$, ">=", $3, $1, @1.first_line, @1.first_column); }
- | expr GTE expr
- { BIN_EXPR($$, ">=", $1, $3, @1.first_line, @1.first_column); }
- | expr ANDAND expr
- { BIN_EXPR($$, "&&", $1, $3, @1.first_line, @1.first_column); }
- | expr OROR expr
- { BIN_EXPR($$, "||", $1, $3, @1.first_line, @1.first_column); }
- | expr EQ expr
- { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column); }
- | expr '=' expr
- { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column); }
- | expr NEQ expr
- { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column);
+ | expr '+' expr
+ { BIN_EXPR($$, "+", $1, $3, @1.first_line, @1.first_column); }
+ | expr '-' expr
+ { BIN_EXPR($$, "-", $1, $3, @1.first_line, @1.first_column); }
+ | expr '*' expr
+ { BIN_EXPR($$, "*", $1, $3, @1.first_line, @1.first_column); }
+ | expr '%' expr
+ { BIN_EXPR($$, "%", $1, $3, @1.first_line, @1.first_column); }
+ | expr '/' expr
+ { BIN_EXPR($$, "/", $1, $3, @1.first_line, @1.first_column); }
+ | expr '<' expr
+ { BIN_EXPR($$, ">", $3, $1, @1.first_line, @1.first_column); }
+ | expr '>' expr
+ { BIN_EXPR($$, ">", $1, $3, @1.first_line, @1.first_column); }
+ | expr '&' expr
+ { BIN_EXPR($$, "&", $1, $3, @1.first_line, @1.first_column); }
+ | expr '^' expr
+ { BIN_EXPR($$, "^", $1, $3, @1.first_line, @1.first_column); }
+ | expr '|' expr
+ { BIN_EXPR($$, "|", $1, $3, @1.first_line, @1.first_column); }
+ | expr SHL expr
+ { BIN_EXPR($$, "<<", $1, $3, @1.first_line, @1.first_column); }
+ | expr SHR expr
+ { BIN_EXPR($$, ">>", $1, $3, @1.first_line, @1.first_column); }
+ | expr LTE expr
+ { BIN_EXPR($$, ">=", $3, $1, @1.first_line, @1.first_column); }
+ | expr GTE expr
+ { BIN_EXPR($$, ">=", $1, $3, @1.first_line, @1.first_column); }
+ | expr ANDAND expr
+ { BIN_EXPR($$, "&&", $1, $3, @1.first_line, @1.first_column); }
+ | expr OROR expr
+ { BIN_EXPR($$, "||", $1, $3, @1.first_line, @1.first_column); }
+ | expr EQ expr
+ { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column); }
+ | expr '=' expr
+ { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column); }
+ | expr NEQ expr
+ { BIN_EXPR($$, "=", $1, $3, @1.first_line, @1.first_column);
$$ = fun_expr("not", 1, &$$, @1.first_line, @1.first_column); }
- | ID '(' arg_list ')'
- { $$ = fun_expr($1, $3.args_nr, $3.args, @1.first_line, @1.first_column);
+ | ID '(' arg_list ')'
+ { $$ = fun_expr($1, $3.args_nr, $3.args, @1.first_line, @1.first_column);
if ($3.args)
free($3.args);
free($1); }
- | '(' expr ')'
- { $$ = $2; }
- | expr '.' ID
- { $$ = dot_expr($1, intern_id($3)); }
- ;
+ | '(' expr ')'
+ { $$ = $2; }
+ | expr '.' ID
+ { $$ = dot_expr($1, intern_id($3)); }
+ ;
-arg_list : /* empty */
- { $$.args_nr = 0; }
- | arg_list_ne
- { $$ = $1; }
- ;
+arg_list : /* empty */
+ { $$.args_nr = 0; }
+ | arg_list_ne
+ { $$ = $1; }
+ ;
-arg_list_ne : expr
- { CREATE($$.args, expr_t *, 1);
+arg_list_ne : expr
+ { CREATE($$.args, expr_t *, 1);
$$.args_nr = 1;
$$.args[0] = $1;
}
- | arg_list_ne ',' expr
- { RECREATE($$.args, expr_t *, 1 + $$.args_nr);
+ | arg_list_ne ',' expr
+ { RECREATE($$.args, expr_t *, 1 + $$.args_nr);
$$.args[$$.args_nr++] = $3;
}
- ;
+ ;
-location : '@' '(' expr ',' expr ',' expr ')'
- { $$.m = $3; $$.x = $5; $$.y = $7; }
- ;
+location : '@' '(' expr ',' expr ',' expr ')'
+ { $$.m = $3; $$.x = $5; $$.y = $7; }
+ ;
-area : location
- { $$.ty = AREA_LOCATION;
+area : location
+ { $$.ty = AREA_LOCATION;
$$.a.a_loc = $1;
- }
- | location '@' '+' '(' expr ',' expr ')'
- { $$.ty = AREA_RECT;
+ }
+ | location '@' '+' '(' expr ',' expr ')'
+ { $$.ty = AREA_RECT;
$$.a.a_rect.loc = $1;
$$.a.a_rect.width = $5;
$$.a.a_rect.height = $7;
}
- | location TOWARDS expr ':' '(' expr ',' expr ')'
- { $$.ty = AREA_BAR;
+ | location TOWARDS expr ':' '(' expr ',' expr ')'
+ { $$.ty = AREA_BAR;
$$.a.a_bar.loc = $1;
$$.a.a_bar.width = $6;
$$.a.a_bar.depth = $8;
$$.a.a_bar.dir = $3;
}
- ;
+ ;
-spelldef : spellbody_list
+spelldef : spellbody_list
{ $$ = new_spell($1); }
- | LET defs IN spellbody_list
+ | LET defs IN spellbody_list
{ $$ = new_spell($4);
$$->letdefs_nr = $2.letdefs_nr;
$$->letdefs = $2.letdefs;
$$->spellguard = $4;
}
- ;
+ ;
-defs : semicolons
- { $$.letdefs_nr = 0;
+defs : semicolons
+ { $$.letdefs_nr = 0;
CREATE($$.letdefs, letdef_t, 1);
}
- | defs def semicolons
- { $$ = $1;
+ | defs def semicolons
+ { $$ = $1;
$$.letdefs_nr++;
- RECREATE ($$.letdefs, letdef_t, $$.letdefs_nr);
+ RECREATE($$.letdefs, letdef_t, $$.letdefs_nr);
$$.letdefs[$1.letdefs_nr] = $2;
}
;
-def : ID '=' expr
- {
+def : ID '=' expr
+ {
if (find_constant($1)) {
fail(@1.first_line, @1.first_column, "Attempt to re-define constant `%s' as LET-bound variable.\n", $1);
free($1);
@@ -486,155 +486,155 @@ def : ID '=' expr
$$.expr = $3;
}
}
- ;
+ ;
-spellbody_list : spellbody
- { $$ = $1; }
- | spellbody '|' spellbody_list
- { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE);
+spellbody_list : spellbody
+ { $$ = $1; }
+ | spellbody '|' spellbody_list
+ { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE);
sg->next = $1;
sg->s.s_alt = $3;
$$ = sg;
}
- ;
+ ;
-spellbody : spellguard DARROW spellbody
- { $$ = spellguard_implication($1, $3); }
- | '(' spellbody_list ')'
- { $$ = $2; }
- | EFFECT effect_list maybe_trigger maybe_end
- { spellguard_t *sg = new_spellguard(SPELLGUARD_EFFECT);
+spellbody : spellguard DARROW spellbody
+ { $$ = spellguard_implication($1, $3); }
+ | '(' spellbody_list ')'
+ { $$ = $2; }
+ | EFFECT effect_list maybe_trigger maybe_end
+ { spellguard_t *sg = new_spellguard(SPELLGUARD_EFFECT);
sg->s.s_effect.effect = $2;
sg->s.s_effect.at_trigger = $3;
sg->s.s_effect.at_end = $4;
$$ = sg;
}
- ;
+ ;
-maybe_trigger : /* empty */
- { $$ = NULL; }
- | ATTRIGGER effect_list
- { $$ = $2; }
- ;
+maybe_trigger : /* empty */
+ { $$ = NULL; }
+ | ATTRIGGER effect_list
+ { $$ = $2; }
+ ;
-maybe_end : /* empty */
- { $$ = NULL; }
- | ATEND effect_list
- { $$ = $2; }
- ;
+maybe_end : /* empty */
+ { $$ = NULL; }
+ | ATEND effect_list
+ { $$ = $2; }
+ ;
-spellguard : prereq
- { $$ = $1; }
- | spellguard OR spellguard
- { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE);
+spellguard : prereq
+ { $$ = $1; }
+ | spellguard OR spellguard
+ { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE);
sg->next = $1;
sg->s.s_alt = $3;
$$ = sg;
}
- | '(' spellguard_list ')'
- { $$ = $2; }
- ;
+ | '(' spellguard_list ')'
+ { $$ = $2; }
+ ;
-spellguard_list : spellguard
- { $$ = $1; }
- | spellguard ',' spellguard_list
- { $$ = spellguard_implication ($1, $3); }
- ;
+spellguard_list : spellguard
+ { $$ = $1; }
+ | spellguard ',' spellguard_list
+ { $$ = spellguard_implication($1, $3); }
+ ;
-prereq : REQUIRE expr
- { $$ = new_spellguard(SPELLGUARD_CONDITION);
+prereq : REQUIRE expr
+ { $$ = new_spellguard(SPELLGUARD_CONDITION);
$$->s.s_condition = $2;
}
- | CATALYSTS items
- { $$ = new_spellguard(SPELLGUARD_CATALYSTS);
+ | CATALYSTS items
+ { $$ = new_spellguard(SPELLGUARD_CATALYSTS);
$$->s.s_catalysts = $2;
}
- | COMPONENTS items
- { $$ = new_spellguard(SPELLGUARD_COMPONENTS);
+ | COMPONENTS items
+ { $$ = new_spellguard(SPELLGUARD_COMPONENTS);
$$->s.s_components = $2;
}
- | MANA expr
- { $$ = new_spellguard(SPELLGUARD_MANA);
+ | MANA expr
+ { $$ = new_spellguard(SPELLGUARD_MANA);
$$->s.s_mana = $2;
}
- | CASTTIME expr
- { $$ = new_spellguard(SPELLGUARD_CASTTIME);
+ | CASTTIME expr
+ { $$ = new_spellguard(SPELLGUARD_CASTTIME);
$$->s.s_casttime = $2;
}
- ;
+ ;
-items : '[' item_list ']'
- { $$ = $2; }
- ;
+items : '[' item_list ']'
+ { $$ = $2; }
+ ;
-item_list : item
- { $$ = NULL;
+item_list : item
+ { $$ = NULL;
magic_add_component(&$$, $1.id, $1.count);
}
- | item_list ',' item
- { $$ = $1;
+ | item_list ',' item
+ { $$ = $1;
magic_add_component(&$$, $3.id, $3.count);
}
- ;
+ ;
-item : INT '*' item_name
- { $$.id = $3; $$.count = $1; }
- | item_name
- { $$.id = $1; $$.count = 1; }
- ;
+item : INT '*' item_name
+ { $$.id = $3; $$.count = $1; }
+ | item_name
+ { $$.id = $1; $$.count = 1; }
+ ;
-item_name : STRING
- { struct item_data *item = itemdb_searchname($1);
+item_name : STRING
+ { struct item_data *item = itemdb_searchname($1);
if (!item) {
- fail (@1.first_line, @1.first_column, "Unknown item `%s'\n", $1);
+ fail(@1.first_line, @1.first_column, "Unknown item `%s'\n", $1);
$$ = 0;
} else
$$ = item->nameid;
- free ($1);
+ free($1);
}
- | INT
- { $$ = $1; }
- ;
-
-
-selection : PC_F
- { $$ = FOREACH_FILTER_PC; }
- | MOB_F
- { $$ = FOREACH_FILTER_MOB; }
- | ENTITY_F
- { $$ = FOREACH_FILTER_ENTITY; }
- | SPELL
- { $$ = FOREACH_FILTER_SPELL; }
- | TARGET_F
- { $$ = FOREACH_FILTER_TARGET; }
- | NPC_F
- { $$ = FOREACH_FILTER_NPC; }
- ;
-
-
-effect : '(' effect_list ')'
- { $$ = $2; }
- | SKIP ';'
- { $$ = new_effect(EFFECT_SKIP); }
- | ABORT ';'
- { $$ = new_effect(EFFECT_ABORT); }
- | END ';'
- { $$ = new_effect(EFFECT_END); }
- | BREAK ';'
- { $$ = new_effect(EFFECT_BREAK); }
- | ID '=' expr ';'
- {
+ | INT
+ { $$ = $1; }
+ ;
+
+
+selection : PC_F
+ { $$ = FOREACH_FILTER_PC; }
+ | MOB_F
+ { $$ = FOREACH_FILTER_MOB; }
+ | ENTITY_F
+ { $$ = FOREACH_FILTER_ENTITY; }
+ | SPELL
+ { $$ = FOREACH_FILTER_SPELL; }
+ | TARGET_F
+ { $$ = FOREACH_FILTER_TARGET; }
+ | NPC_F
+ { $$ = FOREACH_FILTER_NPC; }
+ ;
+
+
+effect : '(' effect_list ')'
+ { $$ = $2; }
+ | SKIP ';'
+ { $$ = new_effect(EFFECT_SKIP); }
+ | ABORT ';'
+ { $$ = new_effect(EFFECT_ABORT); }
+ | END ';'
+ { $$ = new_effect(EFFECT_END); }
+ | BREAK ';'
+ { $$ = new_effect(EFFECT_BREAK); }
+ | ID '=' expr ';'
+ {
if (find_constant($1)) {
fail(@1.first_line, @1.first_column, "Attempt to re-define constant `%s' in assignment.", $1);
free($1);
@@ -644,58 +644,58 @@ effect : '(' effect_list ')'
$$->e.e_assign.expr = $3;
}
}
- | FOREACH selection ID IN expr DO effect
- { $$ = new_effect(EFFECT_FOREACH);
+ | FOREACH selection ID IN expr DO effect
+ { $$ = new_effect(EFFECT_FOREACH);
$$->e.e_foreach.id = intern_id($3);
$$->e.e_foreach.area = $5;
$$->e.e_foreach.body = $7;
$$->e.e_foreach.filter = $2;
}
- | FOR ID '=' expr TO expr DO effect
- { $$ = new_effect(EFFECT_FOR);
+ | FOR ID '=' expr TO expr DO effect
+ { $$ = new_effect(EFFECT_FOR);
$$->e.e_for.id = intern_id($2);
$$->e.e_for.start = $4;
$$->e.e_for.stop = $6;
$$->e.e_for.body = $8;
}
- | IF expr THEN effect ELSE effect
- { $$ = new_effect(EFFECT_IF);
+ | IF expr THEN effect ELSE effect
+ { $$ = new_effect(EFFECT_IF);
$$->e.e_if.cond = $2;
$$->e.e_if.true_branch = $4;
$$->e.e_if.false_branch = $6;
}
- | IF expr THEN effect
- { $$ = new_effect(EFFECT_IF);
+ | IF expr THEN effect
+ { $$ = new_effect(EFFECT_IF);
$$->e.e_if.cond = $2;
$$->e.e_if.true_branch = $4;
$$->e.e_if.false_branch = new_effect(EFFECT_SKIP);
}
- | SLEEP expr ';'
- { $$ = new_effect(EFFECT_SLEEP);
+ | SLEEP expr ';'
+ { $$ = new_effect(EFFECT_SLEEP);
$$->e.e_sleep = $2;
}
- | ID '(' arg_list ')' ';'
+ | ID '(' arg_list ')' ';'
{ $$ = op_effect($1, $3.args_nr, $3.args, @1.first_line, @1.first_column);
free($1);
}
- | SCRIPT_DATA
- { $$ = new_effect(EFFECT_SCRIPT);
+ | SCRIPT_DATA
+ { $$ = new_effect(EFFECT_SCRIPT);
$$->e.e_script = parse_script($1, @1.first_line);
free($1);
if ($$->e.e_script == NULL)
fail(@1.first_line, @1.first_column, "Failed to compile script\n");
}
- | CALL ID '(' arg_list ')' ';'
- { $$ = call_proc($2, $4.args_nr, $4.args, @1.first_line, @1.first_column);
+ | CALL ID '(' arg_list ')' ';'
+ { $$ = call_proc($2, $4.args_nr, $4.args, @1.first_line, @1.first_column);
free($2);
}
- ;
+ ;
-effect_list : /* empty */
- { $$ = new_effect(EFFECT_SKIP); }
- | effect semicolons effect_list
- { $$ = set_effect_continuation($1, $3); }
- ;
+effect_list : /* empty */
+ { $$ = new_effect(EFFECT_SKIP); }
+ | effect semicolons effect_list
+ { $$ = set_effect_continuation($1, $3); }
+ ;
%%
@@ -949,7 +949,7 @@ install_proc(proc_t *proc)
procs = proc;
procs_nr = 1;
} else {
- RECREATE (procs, proc_t, 1 + procs_nr);
+ RECREATE(procs, proc_t, 1 + procs_nr);
procs[procs_nr++] = *proc;
}
}