tags:

views:

32

answers:

1

Does anyone know what is the general method for turning a stream (or a list) of tokens into a parse tree?

I am dying to know this. I haven't programmed stuff like this and would love to learn it!

Thanks, Boda Cydo.

+2  A: 

The process you're talking about is known as parsing. There is several options to do this. You can either use a tool such as YACC to do the parsing for you or you could implement your own parser. A popular parser that is well used is the Recursive Descent Parser. You will find lots of reading about it on the web and wikipedia has a good code example too.

monoceres