Simplified the grammar and fixed several minor bugs (e.g., `INTERFACE "eth0" };'

was a valid entry).
This commit is contained in:
Martin Mares 2000-06-05 18:32:51 +00:00
parent 44fc1888cf
commit f8032bbdb1

View file

@ -39,9 +39,13 @@ ospf_proto_start: proto_start OSPF {
ospf_proto:
ospf_proto_start proto_name '{'
| ospf_proto proto_item ';'
| ospf_proto RFC1583COMPAT bool ';' { OSPF_CFG->rfc1583 = $3; }
| ospf_proto ospf_area '}'
| ospf_proto ospf_proto_item ';'
;
ospf_proto_item:
proto_item
| RFC1583COMPAT bool ';' { OSPF_CFG->rfc1583 = $2; }
| ospf_area '}'
;
ospf_area_start: AREA idval '{' {
@ -58,12 +62,14 @@ ospf_area: ospf_area_start ospf_area_opts
;
ospf_area_opts:
| ospf_area_opts ospf_area_item
/* empty */
| ospf_area_opts ospf_area_item ';'
;
ospf_area_item:
STUB bool ';' { this_area->stub = $2 ; }
| TICK NUM ';' { this_area->tick = $2 ; }
| ospf_iface_list '}'
STUB bool { this_area->stub = $2 ; }
| TICK NUM { this_area->tick = $2 ; }
| INTERFACE ospf_iface_list
;
ospf_iface_item:
@ -96,11 +102,13 @@ ospf_iface_start:
;
ospf_iface_opts:
'{'
/* empty */
| ospf_iface_opts ospf_iface_item ';'
;
ospf_iface_opt_list: /* EMPTY */ | ospf_iface_opts
ospf_iface_opt_list:
/* empty */
| '{' ospf_iface_opts '}'
;
ospf_iface:
@ -108,7 +116,7 @@ ospf_iface:
;
ospf_iface_list:
INTERFACE ospf_iface
ospf_iface
| ospf_iface_list ',' ospf_iface
;