Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-01

complex ini like syntax parser

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

I'm looking for a setting parser for something like this: ------- snips -----
[foo](!)
bar => 1
baz = fff ; comment

; comment
#include "file"
#include => "section"

------- snips --------

Before I'll do this the hard way and write something for myself, is there something like that existed already, or even something that implement part of it, so I could based my code on it instead of writing one for myself ?

Thanks,

Ido

LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il

Reply by email

ik

2011/1/5 Zaher Dirkey

Show quoted text 14 lines
2011/1/5 ik Before I'll do this the hard way and write something for myself, is there > something like that existed already, or even something that implement part > of it, so I could based my code on it instead of writing one for myself ? > In project http://sourceforge.net/projects/minilib/ You can port Apache syn Highlighter and modify it to highlight your config file Lazarus\lib\SynHighlighterApache.pas

Thanks Zaher, but I'm looking for a parser to read the keys and values, and not syntax highlighter.

Show quoted text 16 lines
It is old for me i committed it today, if there is any bug, confirm me please. Best regards -- Zaher Dirkey -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Ido

Reply by email

Jorge Aldo G. de F. Junior
to leledumbo

i have a small parser called PON Compiler that stores objects into a file using the following syntax :

Instance <nameofinstance> Of <classofinstance> ( <propertiesofsuchinstance> )
Begin
<other instances here> etc
End.

properties can itself point to instances wich can be declared in place.

with this setup and a bunch of RTTI etc you can have a very rich config file.

2011/1/6 leledumbo :

Show quoted text 11 lines
If you want something fast, pyacc and plex distributed with fpc can be an option. But I suggest writing your own since that way you'll have a full control of its features. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/complex-ini-like-syntax-parser-tp3329069p3330004.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Gene Buckle
to leledumbo: If you want something fast, pyacc and plex distributed with fpc can be an option. But I…
leledumbo wrote 5 lines
If you want something fast, pyacc and plex distributed with fpc can be an option. But I suggest writing your own since that way you'll have a full control of its features.

Is there an fpc version of TIniFile?

g.

Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end.

Reply by email

Howard Page-Clark
to Gene Buckle
Gene Buckle wrote 11 lines
On Wed, 5 Jan 2011, leledumbo wrote: > > If you want something fast, pyacc and plex distributed with fpc can be an > option. But I suggest writing your own since that way you'll have a full > control of its features. > Is there an fpc version of TIniFile? g.

look in
..fpc\version_number\source\packages\fcl-base\src\inifiles.pp

H

Reply by email

Gene Buckle
to Howard Page-Clark
Howard Page-Clark wrote 15 lines
On 06/1/11 2:49, Gene Buckle wrote: > On Wed, 5 Jan 2011, leledumbo wrote: > >> >> If you want something fast, pyacc and plex distributed with fpc can be an >> option. But I suggest writing your own since that way you'll have a full >> control of its features. >> > Is there an fpc version of TIniFile? > > g. > look in ..fpc\version_number\source\packages\fcl-base\src\inifiles.pp

Thanks. I suspect this might work for the person that was looking for something like this. :)

g.

Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end.

Reply by email

ik
to Gene Buckle
Gene Buckle wrote 21 lines
On Thu, 6 Jan 2011, Howard Page-Clark wrote: On 06/1/11 2:49, Gene Buckle wrote: > >> On Wed, 5 Jan 2011, leledumbo wrote: >> >> >>> If you want something fast, pyacc and plex distributed with fpc can be >>> an >>> option. But I suggest writing your own since that way you'll have a full >>> control of its features. >>> >>> Is there an fpc version of TIniFile? >> >> g. >> >> look in > ..fpc\version_number\source\packages\fcl-base\src\inifiles.pp > > Thanks. I suspect this might work for the person that was looking for something like this. :)

Yes, indeed.

Thank you all for your replay.

Show quoted text 20 lines
g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Ido

Reply by email