From owner-freebsd-arch@FreeBSD.ORG Sun Nov 30 01:23:09 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1187916A4CE; Sun, 30 Nov 2003 01:23:09 -0800 (PST) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E5F743F93; Sun, 30 Nov 2003 01:23:05 -0800 (PST) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 2B32365319; Sun, 30 Nov 2003 09:23:04 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07868-01-2; Sun, 30 Nov 2003 09:23:03 +0000 (GMT) Received: from saboteur.dek.spc.org (unknown [82.147.19.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 73A2D6530D; Sun, 30 Nov 2003 09:23:03 +0000 (GMT) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 2F3D3C8; Sun, 30 Nov 2003 09:23:01 +0000 (GMT) Date: Sun, 30 Nov 2003 09:23:01 +0000 From: Bruce M Simpson To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20031130092301.GA98871@saboteur.dek.spc.org> Mail-Followup-To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, sam@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline cc: sam@freebsd.org Subject: ifconfig(8) refactoring -- YACC grammar now online X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2003 09:23:09 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, As per Sam's suggestion, I've been working on refactoring ifconfig(8), which has grown increasingly large and unwieldy. Part of the effort has been to get a handle on all of the options we currently support; so I've written a YACC grammar for it. This is my first serious bit of work with YACC so I'd appreciate any feedback you can give. I've uploaded the grammar, makefile, and all the EPS files, here:- http://people.freebsd.org/~bms/dump/nifconfig/ (for browsing) http://people.freebsd.org/~bms/dump/nifconfig.tgz (tarball) I've also generated a PDF file you can view which shows you syntax diagrams for each part of the parse tree. This is here:- http://people.freebsd.org/~bms/dump/nifconfig/all.pdf I can't quite seem to persuade Ebnf2ps to generate a recursive unfolding of all productions from argv downwards, though, that would be most helpful. This involved rolling two ports, epsmerge and Ebnf2ps, to visualize the syntax graphically. I will commit these ports once the freeze as over as they're likely to be useful to a lot of people. Please let me know your thoughts on this. Thanks, BMS --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQE/ybb0ueUpAYYNtTsRAnr4AJ0cZTHuRjo+R2E8FRmi0avsjMemPQCdGMNw unxO7VBNq6BLgQJtO5ERFJQ= =O7CL -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--