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, … ode=source … ser.t.html … f5y25xk7MJ … 5CEQvZCGsJ … _2#Parsing … JPrqQ8l9u0 … -java-nlp/ … o4Ut4r_qCs … pts/parser … 10160.html

The skotos articles and the one at Richard Bartle’s homepage itself are very thorough. Also there’s one in 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: … 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