ifconfig(8) refactoring -- YACC grammar now online

From: Bruce M Simpson (bms_at_spc.org)
Date: 11/30/03

  • Next message: Andre Oppermann: "Re: ifconfig(8) refactoring -- YACC grammar now online"
    Date: Sun, 30 Nov 2003 09:23:01 +0000
    To: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org
    
    
    

    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

    
    



  • Next message: Andre Oppermann: "Re: ifconfig(8) refactoring -- YACC grammar now online"