From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,23f63e0900ada727,start X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,23f63e0900ada727,start X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,23f63e0900ada727,start X-Google-Attributes: gid103376,public X-Google-Thread: 1111a3,23f63e0900ada727,start X-Google-Attributes: gid1111a3,public X-Google-ArrivalTime: 1994-11-12 13:47:19 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!gumby!wmichgw!x91nikorawal From: x91nikorawal@wmich.edu (HACKER) Newsgroups: comp.lang.objective-c,comp.lang.c++,comp.lang.ada,comp.lang.c Subject: <> Message-ID: <1994Nov12.132726.23824@wmichgw> Date: 12 Nov 94 13:27:26 EDT Organization: World's greatest Genius Xref: nntp.gmd.de comp.lang.objective-c:2827 comp.lang.c++:78662 comp.lang.ada:16670 comp.lang.c:68341 Date: 1994-11-12T13:27:26-04:00 List-Id: Hi, The Recursive Descent procedure I have, takes care of all cases except one, the number + (expression) case. Ex 2 + (3 * 4). The grammar I am following is... E ==> E + T E ==> T T ==> T * F T ==> F F ==> (E) F ==> NUMBER i.e Only taking care of addition and multiplication Here are the pseudo-codes for my procedures... Procedure F Begin Symbol := lex(); If symbol == number then return TRUE If symbol == Lpar then do begin /* lpar is Left paranthesis */ If E() == TRUE then do begin symbol := lex(); If symbol == Rpar then return TRUE end; else return FALSE Procedure T Begin If F() == TRUE then return TRUE else begin If T()==TRUE the do begin Symbol := lex(); If symbol == '*' then If F() == TRUE return TRUE else return FALSE Procedure E Begin If T() == TRUE then return TRUE else begin If E()== TRUE then symbol = lex(); If symbol == '+' then If T() == TRUE then return TRUE else return FALSE; Any help/suggestion will be appreciated Thanks Percy