tags:

views:

66

answers:

2

hello, i am an student need to implement an top down parser for my mini project i confident understand the concept and i read the Wikipedia article but still i have some doubts can any one explain about top down parsing and how to implement it with a small example...

+7  A: 

One of the things that students sometimes forget is that their professors are there to help them learn. If you've made a good attempt to understand top-down parsing and you haven't succeeded, then go and ask your professor to explain it. This is not an admission of weakness, and will not lose you marks. This is in fact what your professors are paid for. It's also what they like doing, or they wouldn't be in the job.

I didn't understand this when I was a student, and it cost me a whole lot of time and effort because I thought I would be penalized in some way if I admitted to not understanding something.

By "professor" I also mean teaching assistants or anyone else whose purpose is to help you learn.

DJClayworth
A: 

top down parsing is parsing the way a normal human would do it. You describe high level terms in terms of lower level ones, until you get down to the basics. Here's a highly oversimplified example

 public void parseSentence() {
     parseNoun();
     parseVerb();
 }

MeBigFatGuy