← Back to team overview

kicad-developers team mailing list archive

Re: TokenList2DsnLexer.cmake

 

On 6/15/2010 2:52 AM, Dick Hollenbeck wrote:
> Wayne,
> 
> Attached is a patch against TokenList2DsnLexer.cmake that I would like
> to commit.
> 
> The script takes an additional *optional* parameter named "enum" which
> if provided will give the name of the enum which is declared.  It seemed
> like if multiple generated headers were included into a single source
> file then you would have a collision on the formerly hard coded enum
> name.  This lets the invoker name the enum anything he/she wants.

I missed that one.  Letting the user define the enum name makes sense to me.

> 
> Also changed the use case documentation to show the *.cpp file as an
> OUTPUT.  This is required for the calling CMake script to be happy WRT
> how that *.cpp file comes into being.
> 
> OK to commit, or something very similar to it?

Thanks for asking.  I can commit it this afternoon if this patch is what
you want committed.  If you have it already queued up in your repo, feel
free to commit it.

> 
> I thought I'd actually use it to hold the template fieldnames into a DSN
> single line record that goes into the eeschema config file.  It was a
> way to handle variable length quantities of template fields, yet still
> have them in the master config file.

This is an interesting use case that I hadn't thought of when I wrote
the macro.  This sounds like it might be useful elsewhere.

> 
> Each record now holds fieldname, visibility and an optional initial
> value, times an unlimited number of fields.  wxConfig may break after a
> few gillion fields, but this is my first plan.  I will check the source
> to wxConfig before I settle on this idea. I wanted an actual small use
> case to use DSNLEXER and richio showing how to use them efficiently and
> unobtrusively.

I suspect that I won't be around when we hit a few gillion fields in a
configuration file so someone else will have to fix that bug :)

I apologize for being absent from the dev list recently.  I have been
swamped both at work and at home.  Hopefully, in the next couple of
weeks things will settle down and I'll have some more time to commit to
the project.

Wayne

> 
> Dick
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References