Can someone recommend a parser system?

I can program in C or Visual Basic, and I am looking for a simple example for an IF parser. The examples don’t have to be code in any language, but that could be useful also. So pseudo code is fine.

I tried Google and found some discussions, but they are usually to random discussion threads which makes it very disorganized.

I don’t have any experience with this, so I am not sure where to start processing my tokenized words.

Looking for a very easy, gradual incline of information. Please don’t attack me with computer science! :open_mouth:

hi coinop, I have a decent list of parser links you can check out,

mudbytes.net/topic-1838

mudbytes.net/topic-2962

mudbytes.net/topic-2038

mud.co.uk/richard/commpars.htm

groups.google.com/group/rec.arts … ode=source

https://intfiction.org/t/experimental-parser/3475/1

tads.org/t3doc/doc/libref/so … ser.t.html

tads.org/t2doc/doc/prsseq.htm

dnd.utwente.nl/~krimud/Docs/NMAdmin/Parser/

groups.google.com/forum/?fromgr … f5y25xk7MJ

groups.google.com/forum/?fromgr … 5CEQvZCGsJ

ifwiki.org/index.php/Past_raif_t … _2#Parsing

groups.google.com/forum/?fromgr … JPrqQ8l9u0

kotancode.com/2012/02/15/sca … -java-nlp/

groups.google.com/forum/?fromgr … o4Ut4r_qCs

effbot.org/zone/simple-top-down-parsing.htm

skotos.net/articles/dawnof09.shtml

skotos.net/articles/dawnof22.shtml

discworld.starturtle.net/lpc/pla … pts/parser

disinterest.org/resource/MUD-Dev … 10160.html

The skotos articles and the one at Richard Bartle’s homepage itself are very thorough. Also there’s one in rec.arts.int-fiction at google groups that explains it well.

This is a tough question because a simple IF parser is very simple, and a well-developed one is kind of a nightmare! And we usually stick to the well-developed ones in these parts – for obvious reasons. I don’t know what simple ones I’d point you to. (The BASIC parser I wrote as a teenager, maybe… but that’s not posted anywhere useful.)

I guess you could start with the earliest extant Inform 5 library, although I suspect that’s already pretty complicated.

There’s also an annotated reimplementation of the (current) Inform 7 parser: inform7.com/extensions/Ron%20New … index.html

The way all of these things start (at least in English!) is to look at the first word. Boom, that’s your verb. The verb tells you whether the next item is a noun phrase (“take GREEN STONE”), a fixed word (“switch ON lamp”) or a mandatory end-of-input (“inventory”). Work from there.

Once you’ve got that working, you start thinking about accepting different patterns that might come after a particular verb. (“GET UP”, “GET STONE”, “GET IN CAR”)

Thanks, I think that is plenty for me to get started. Since I posted my question, I also found a big list on ifwiki.org.