lp://staging/~psmay/+junk/cyg-ini-reader

Created by Peter S. May and last modified

This project intends to provide an alternative means of accessing the setup.ini parser from Cygwin setup in such a way that new work, such as a new package manager, could be built from the result.

Cygwin's setup.exe (http://sourceware.org/cygwin-apps/setup.html) utilizes a parser built using flex and bison to retrieve package information from a setup.ini (or a compressed form thereof) stored on a package mirror or in a local package directory. The parser source is bound fairly tightly to the guts of setup.exe.

The mission here is to extricate the scanner and parser into a distinct module to be incorporated into new programs. Potential use cases include:

* Exposing a callback-based event API
* Translating into XML, JSON, etc.
* Simplifying into a one-line-per-record format for easier parsing (e.g. by awk or perl)

Something like this would probably be part of a more comprehensive package management library for Cygwin that could either supplement or supplant setup.exe as a package manager.

If you're looking for something that works *right now*, take a look at apt-cyg (http://code.google.com/p/apt-cyg/), which works using a relatively narrow but presently fully functional subset of the setup.ini syntax.

Get this branch:
bzr branch lp://staging/~psmay/+junk/cyg-ini-reader
Only Peter S. May can upload to this branch. If you are Peter S. May please log in for upload directions.

Related bugs

Related blueprints

Branch information

Owner:
Peter S. May
Status:
Experimental

Recent revisions

6. By Peter S. May <http://psmay.com>

* Makefile x-clear target now includes .*ignore.

5. By pmay <pmay@W182VGFS1>

* Added bzr ignore file.
* flex and bison will now output to files built.* in top. This keeps them easy to delete while placing them in the same directory as other C files.
* Makefile figures out some of its own deps now.
* Headers directly in lexer and parser got new names. The existing files may still be necessary later.

4. By pmay <pmay@W182VGFS1>

* Switched from awk to perl for converting parser. Will do the same for the lexer soon.
* Added some option directives on the lexer and parser. The objective is to make it reentrant.
* Changed the general attitude of ini-lex-alt.c.
* Work continues on the .h files.

3. By pmay <pmay@W182VGFS1>

* Added "automatically generated" notice to products of change-lex.awk and change-parse.awk.
* change-parse.awk fleshed out to turn most of its code to macros changeable from outside the parser source.
* Added ini-parse-alt.h to replace the inline headers of the parser.

2. By Peter S. May <http://psmay.com/>

* Added stub for translating and compiling parser.

1. By Peter S. May <http://psmay.com>

Initial.

This project intends to provide an alternate means of accessing the setup.ini parser from Cygwin setup, i.e., in such a way that a new package manager could be built from the product.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers