[dundee] Parser howto... possibly including bisons so watch out!

Nistur nistur at googlemail.com
Tue Feb 12 12:07:16 GMT 2008


Thanks for your advice, unfortunately the packages on the PS2 are 
somewhat limited and even though I could theoretically install such libs 
as xerces or something onto my playstation (although I may have a little 
difficulty finding ancient enough versions for compatibility, the system 
it's running is based on Red Hat 6 with a 2.2.1 kernel) I then have the 
problem it doesn't compile on the Uni PS2s.
If I'm writing my own config file layout I probably won't stick with XML 
as I'm not too keen on the look of it :P. From what I've seen of bison 
(and lex and yacc) it's not too complicated, just very cryptic. I'll 
have a look at the links in depth now and I have a PS2 lab in an hour's 
time, when I will probably look into the feasibility of writing my own 
parser and comparing it with bison.

Thanks for the help
Nistur

Barry Carr wrote:
>
> Nistur wrote:
>> Hey, I was just wandering whether anyone had any experience making 
>> parsers. I am currently trying to make a PS2 game (using the PS2 
>> Linux Devkit) and want to start creating config files for various 
>> things (maybe XML, maybe custom layout, yet to be decided) and have 
>> tried looking into writing my own parser function. I can't seem to 
>> find anything anywhere in the form of a guide or tutorial to give me 
>> directions. Everywhere I look says Bison.
>> I have tried looking for Bison tutorials and come up with very little 
>> too.
>> Does anyone have any experience with Bison or even have any knowledge 
>> on the writing of parsers?
>
> Hi Nistur,
>
> I'll admit I know absolutely nothing about Bison but it sounds a bit 
> heavy-weight just to parse some config files. If you want to save 
> config data as XML then get an XML lib do the work for you. Other than 
> that, you can do a great deal by just reading the file and parsing the 
> contents with regular expressions.
>
> Another config format you might want to consider is JSON (JavaScript 
> Object Notation). IMHO, is much easier to deal with than XML and 
> directly executable by JavaScript (not that you'll want that, I 
> suppose). You can get open-source JSON parsers for C++ (I'm assuming 
> you're working with C++).
>
> HTH
>
> Cheers
> Barry
>
>>
>> Thanks
>> Nistur
>>
>> ------------------------------------------
>> http://nistur.chaosnet.org
>>
>>
>> _______________________________________________
>> dundee GNU/Linux Users Group mailing list
>> dundee at lists.lug.org.uk  http://dundee.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/dundee
>> Chat on IRC, #tlug on dundee.lug.org.uk
>>
>
> _______________________________________________
> dundee GNU/Linux Users Group mailing list
> dundee at lists.lug.org.uk  http://dundee.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/dundee
> Chat on IRC, #tlug on dundee.lug.org.uk
>


-- 
------------------------------------------
http://nistur.chaosnet.org




More information about the dundee mailing list