Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
5f47c4c1
Commit
5f47c4c1
authored
Feb 02, 2010
by
Ondřej Zajíček
Browse files
Changes right-recursion to left-recursion in a filter grammar.
Because we don't want to have a limit on a function/filter length.
parent
1a7a4e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
filter/config.Y
View file @
5f47c4c1
...
...
@@ -43,7 +43,7 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
%nonassoc THEN
%nonassoc ELSE
%type <x> term block cmds cmd function_body constant print_one print_list var_list var_listn dynamic_attr static_attr function_call symbol dpair bgp_path_expr
%type <x> term block cmds
cmds_int
cmd function_body constant print_one print_list var_list var_listn dynamic_attr static_attr function_call symbol dpair bgp_path_expr
%type <f> filter filter_body where_filter
%type <i> type break_command cpair
%type <e> set_item set_items switch_body
...
...
@@ -191,15 +191,15 @@ function_def:
/* Programs */
/* Hack: $$ of cmds_int is the last node.
$$->next of cmds_int is temporary used for the first node */
cmds: /* EMPTY */ { $$ = NULL; }
| cmd cmds {
if ($1) {
if ($1->next)
bug("Command has next already set");
$1->next = $2;
$$ = $1;
} else $$ = $2;
}
| cmds_int { $$ = $1->next; $1->next = NULL; }
;
cmds_int: cmd { $$ = $1; $1->next = $1; }
| cmds_int cmd { $$ = $2; $2->next = $1->next ; $1->next = $2; }
;
block:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment