News for hackers. Stuff that matters.
Re:So you want to write your own language? by joe_the_user on Tuesday February 04, 2014 @03:58PM (#7180213)
I would point out that a recursive descent parsing does not have to return an AST or any particular tree, and often it doesn't.

Instead, when you create a recursive descent parser, you create a series of functions called whenever a syntax element is discover. In these functions, you construct whatever your final data structures are going to be.

Of course, you still can create and return a full abstract syntax tree but one nice thing about recursive descent is that if you are only going to do a few things, you can just have those few operations in your parser and be done with it.

There are no comments on this comment yet.