projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wireless: align some HE capabilities with the spec
[carl9170fw.git]
/
config
/
parser.y
diff --git
a/config/parser.y
b/config/parser.y
index af770bf758ad2b5dc074674090aa3d15ef6c2255..190f1117f35a2e7aa0c3ea4bcb4c98d1e4e96620 100644
(file)
--- a/
config/parser.y
+++ b/
config/parser.y
@@
-119,20
+119,24
@@
mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL
stmt_list:
/* empty */
stmt_list:
/* empty */
- | stmt_list
common
_stmt
+ | stmt_list
assignment
_stmt
| stmt_list choice_stmt
| stmt_list choice_stmt
+ | stmt_list comment_stmt
+ | stmt_list config_stmt
+ | stmt_list if_stmt
| stmt_list menu_stmt
| stmt_list menu_stmt
+ | stmt_list menuconfig_stmt
+ | stmt_list source_stmt
| stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
| stmt_list error T_EOL { zconf_error("invalid statement"); }
;
| stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
| stmt_list error T_EOL { zconf_error("invalid statement"); }
;
-common_stmt:
- if_stmt
- | comment_stmt
- | config_stmt
- | menuconfig_stmt
- | source_stmt
- | assignment_stmt
+stmt_list_in_choice:
+ /* empty */
+ | stmt_list_in_choice comment_stmt
+ | stmt_list_in_choice config_stmt
+ | stmt_list_in_choice if_stmt_in_choice
+ | stmt_list_in_choice error T_EOL { zconf_error("invalid statement"); }
;
/* config/menuconfig entry */
;
/* config/menuconfig entry */
@@
-254,7
+258,7
@@
choice_end: end
}
};
}
};
-choice_stmt: choice_entry
choice_block
choice_end
+choice_stmt: choice_entry
stmt_list_in_choice
choice_end
;
choice_option_list:
;
choice_option_list:
@@
-305,11
+309,6
@@
default:
| T_DEF_BOOL { $$ = S_BOOLEAN; }
| T_DEF_TRISTATE { $$ = S_TRISTATE; }
| T_DEF_BOOL { $$ = S_BOOLEAN; }
| T_DEF_TRISTATE { $$ = S_TRISTATE; }
-choice_block:
- /* empty */
- | choice_block common_stmt
-;
-
/* if entry */
if_entry: T_IF expr T_EOL
/* if entry */
if_entry: T_IF expr T_EOL
@@
-331,6
+330,9
@@
if_end: end
if_stmt: if_entry stmt_list if_end
;
if_stmt: if_entry stmt_list if_end
;
+if_stmt_in_choice: if_entry stmt_list_in_choice if_end
+;
+
/* menu entry */
menu: T_MENU T_WORD_QUOTE T_EOL
/* menu entry */
menu: T_MENU T_WORD_QUOTE T_EOL
@@
-660,7
+662,7
@@
static void print_symbol(FILE *out, struct menu *menu)
break;
case P_SYMBOL:
fputs( " symbol ", out);
break;
case P_SYMBOL:
fputs( " symbol ", out);
- fprintf(out, "%s\n", prop->sym->name);
+ fprintf(out, "%s\n", prop->
menu->
sym->name);
break;
default:
fprintf(out, " unknown prop %d!\n", prop->type);
break;
default:
fprintf(out, " unknown prop %d!\n", prop->type);