|
i fell sick, so i took a break from the assignments
i'm really confused ...
even though i am supposed to generate parser trees, for now, let's suppose i am supposed to create a yes/no parser, meaning it just checks whether the expression is valid or not.
consider the rule below
<compound> ::= begin <stmt-list> end
^^ how would you write code for this particular rule? I believe if you write pseudocode for just one rule, i'll get the idea.
i have the scanner ready, it looks at a stream of text and returns tokens ... please ask me if this is not clear.
also, if you do not want to write the code, then that is totally understandable
(I'm writing a recursive descent parser)
|