Allow zero or more actions in an action list, rather than requiring
one or more actions in the list. This makes constructs like: attach 10 { // echo "Driver $device_name attached" }; to be accepted by the parser. It will be treated as if the user had entered: // attach 10 { // echo "Driver $device_name attached" // }; (eg totally ignored). Approved by: re@ (rwatson)
This commit is contained in:
parent
7bbf05a2c3
commit
18e8d6d786
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115011
@ -100,16 +100,19 @@ set_option
|
|||||||
attach_block
|
attach_block
|
||||||
: ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
: ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
||||||
{ add_attach($2, $4); }
|
{ add_attach($2, $4); }
|
||||||
|
| ATTACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
|
||||||
;
|
;
|
||||||
|
|
||||||
detach_block
|
detach_block
|
||||||
: DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
: DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
||||||
{ add_detach($2, $4); }
|
{ add_detach($2, $4); }
|
||||||
|
| DETACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
|
||||||
;
|
;
|
||||||
|
|
||||||
nomatch_block
|
nomatch_block
|
||||||
: NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
: NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
|
||||||
{ add_nomatch($2, $4); }
|
{ add_nomatch($2, $4); }
|
||||||
|
| NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
|
||||||
;
|
;
|
||||||
|
|
||||||
match_or_action_list
|
match_or_action_list
|
||||||
|
Loading…
Reference in New Issue
Block a user