Language parsing

Just starting out? Need help? Post your questions and find answers here.
los
New User
New User
Posts: 6
Joined: Sun Apr 05, 2009 4:28 am
Location: USA

Language parsing

Post by los »

Greetings to all! I am playing around with the PB 4.3 demo, and I just joined the forums... So far I'm very impressed with both Purebasic, and its devoted community!

In your experience, what would be a good direction to consider for parsing programming languages in PB? Should I look to convert an existing parser-generator, for instance some existing code in C? Or are there library routines that could help to build a parser in PB from scratch?

I think the language is robust enough (with structure and regexp etc) to be able to handle this task. And it would be lots of fun. But just looking for other opinions. Thanks.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

You mean to make a scripting language? If so, PB has everything you need, no problem. A few of the forum members have made them and they're quite good.
BERESHEIT
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Well, you definitely won't find a parser-generator that outputs Purebasic code.
So you propably will have to write your parser from scratch (which is one of the
most complicated things I've ever tried :P). Like netmaestro already said, there's
nothing that could stop you from doing this in Purebasic - so good luck...
Windows 7 & PureBasic 4.4
Post Reply