From 330b3937ebd1d638af23cf2c9cf4871e1a15eae3 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sun, 29 Oct 2006 19:29:10 +0000 Subject: Allow braces to fit on a single line if only one or no argument is used. This allows construct like these: area 0.0.0.1 { interface lo0 interface em1 { passive } } From Pierre-Yves Ritschard --- usr.sbin/ospfd/parse.y | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'usr.sbin/ospfd/parse.y') diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y index 5500b3d2b67..a3aec6f318d 100644 --- a/usr.sbin/ospfd/parse.y +++ b/usr.sbin/ospfd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.36 2006/10/25 12:26:49 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.37 2006/10/29 19:29:09 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby @@ -404,12 +404,12 @@ area : AREA STRING { } ; -areaopts_l : areaopts_l areaoptsl - | areaoptsl +areaopts_l : areaopts_l areaoptsl nl + | areaoptsl optnl ; -areaoptsl : interface nl - | defaults nl +areaoptsl : interface + | defaults ; interface : INTERFACE STRING { @@ -455,12 +455,12 @@ interface_block : '{' optnl interfaceopts_l '}' | ; -interfaceopts_l : interfaceopts_l interfaceoptsl - | interfaceoptsl +interfaceopts_l : interfaceopts_l interfaceoptsl nl + | interfaceoptsl optnl ; -interfaceoptsl : PASSIVE nl { iface->passive = 1; } - | defaults nl +interfaceoptsl : PASSIVE { iface->passive = 1; } + | defaults ; %% -- cgit v1.2.3