www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Ini parsing library in D ?

reply Tarun Ramakrishna <lenkite gmail.com> writes:
Hi,

Do we have a ini parser in D somewhere ? If not, is there some
documentation anywhere that tells one how to wrap a simple C++ library
like simple ini ? (Of course it isn't difficult to build a quick
parser, just that someone would done this already)

Thanks,
Tarun
Feb 27 2011
next sibling parent reply Bekenn <leaveme alone.com> writes:
On 2/27/2011 11:04 PM, Tarun Ramakrishna wrote:
 Hi,

 Do we have a ini parser in D somewhere ? If not, is there some
 documentation anywhere that tells one how to wrap a simple C++ library
 like simple ini ? (Of course it isn't difficult to build a quick
 parser, just that someone would done this already)

 Thanks,
 Tarun
You can give htod a try: http://www.digitalmars.com/d/2.0/htod.html It's not perfect, but it may give you a decent starting point to work from.
Feb 27 2011
parent Tarun Ramakrishna <lenkite gmail.com> writes:
Thanks Bekenn!

On Mon, Feb 28, 2011 at 12:53 PM, Bekenn <leaveme alone.com> wrote:
 On 2/27/2011 11:04 PM, Tarun Ramakrishna wrote:
 Hi,

 Do we have a ini parser in D somewhere ? If not, is there some
 documentation anywhere that tells one how to wrap a simple C++ library
 like simple ini ? (Of course it isn't difficult to build a quick
 parser, just that someone would done this already)

 Thanks,
 Tarun
You can give htod a try: http://www.digitalmars.com/d/2.0/htod.html It's not perfect, but it may give you a decent starting point to work from.
Feb 27 2011
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2011-02-28 08:04, Tarun Ramakrishna wrote:
 Hi,

 Do we have a ini parser in D somewhere ? If not, is there some
 documentation anywhere that tells one how to wrap a simple C++ library
 like simple ini ? (Of course it isn't difficult to build a quick
 parser, just that someone would done this already)

 Thanks,
 Tarun
There is one in Tango, tango.io.stream.Map. -- /Jacob Carlborg
Feb 28 2011
prev sibling next sibling parent reply Trass3r <un known.com> writes:
http://www.dprogramming.com/ini.php
Feb 28 2011
next sibling parent Tarun Ramakrishna <lenkite gmail.com> writes:
Hi Trass,

Wow! A pure, plain simple D module for ini parsing. Nice :))

Thanks!
Tarun


On Mon, Feb 28, 2011 at 3:34 PM, Trass3r <un known.com> wrote:
 http://www.dprogramming.com/ini.php
Feb 28 2011
prev sibling parent reply Tarun Ramakrishna <lenkite gmail.com> writes:
Err ok, I got excited too soon. That seems to be a D1 module..anyways
I am already halfway through writing my D2 Ini parser, so I guess its
fine

On Mon, Feb 28, 2011 at 6:07 PM, Tarun Ramakrishna <lenkite gmail.com> wrote:
 Hi Trass,

 Wow! A pure, plain simple D module for ini parsing. Nice :))

 Thanks!
 Tarun


 On Mon, Feb 28, 2011 at 3:34 PM, Trass3r <un known.com> wrote:
 http://www.dprogramming.com/ini.php
Feb 28 2011
parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Tarun Ramakrishna Wrote:

 Err ok, I got excited too soon. That seems to be a D1 module..anyways
 I am already halfway through writing my D2 Ini parser, so I guess its
 fine
 
 On Mon, Feb 28, 2011 at 6:07 PM, Tarun Ramakrishna <lenkite gmail.com> wrote:
 Hi Trass,

 Wow! A pure, plain simple D module for ini parsing. Nice :))

 Thanks!
 Tarun


 On Mon, Feb 28, 2011 at 3:34 PM, Trass3r <un known.com> wrote:
 http://www.dprogramming.com/ini.php
It doesn't take much to make it work with D2. I have a working one, and has mention of what I changed so I should be able to redistribute it. I'll double check though.
Feb 28 2011
parent reply Jesse Phillips <jessekphillips+D gmail.com> writes:
Jesse Phillips Wrote:

 It doesn't take much to make it work with D2. I have a working one, and has
mention of what I changed so I should be able to redistribute it. I'll double
check though.
Here it is: https://github.com/he-the-great/ini.d/tree/D2 The master branch should also work with D1 and D2 compilers before 2.052. Maybe I should just update the catch block to capture Throwable there. The D2 branch has annotations too.
Feb 28 2011
parent Tarun Ramakrishna <lenkite gmail.com> writes:
Hi Jesse,

This list is filled with terrific people and you are one of them :)

Thanks!
Tarun

On Tue, Mar 1, 2011 at 12:01 AM, Jesse Phillips
<jessekphillips+D gmail.com> wrote:
 Jesse Phillips Wrote:

 It doesn't take much to make it work with D2. I have a working one, and has
mention of what I changed so I should be able to redistribute it. I'll double
check though.
Here it is: https://github.com/he-the-great/ini.d/tree/D2 The master branch should also work with D1 and D2 compilers before 2.052. Maybe I should just update the catch block to capture Throwable there. The D2 branch has annotations too.
Feb 28 2011
prev sibling parent =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= <jeberger free.fr> writes:
Tarun Ramakrishna wrote:
 Hi,
=20
 Do we have a ini parser in D somewhere ? If not, is there some
 documentation anywhere that tells one how to wrap a simple C++ library
 like simple ini ? (Of course it isn't difficult to build a quick
 parser, just that someone would done this already)
=20
Here (D1+phobos): https://bitbucket.org/jmb/spacecuted/src/tip/src/scd/settings.d Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Feb 28 2011