Related articles |
---|
If-else and while in yacc smishra@ccd.harris.com (1993-12-03) |
Newsgroups: | comp.compilers |
From: | smishra@ccd.harris.com (Sanjoy Mishra) |
Keywords: | parse, question |
Organization: | Compilers Central |
Date: | Fri, 3 Dec 1993 14:52:51 GMT |
<novice>
Hi:
I am looking for a good illustration and/or document on how
to implement if-then-else and while-loop construct using lex/yacc
type of grammars. Do I need to have stack for nesting these construct ?
I need this for a evaluator I am building. Something like
if a = 5
then
a = a + 1
else
a = a + 2
I want to do this evaluation from within yacc/lex code rather than building
any interpretive or compiling code.
Thanks for all your help.
-Sanjay
__
Sanjay K. Mishra Harris Controls Division
mishra@ccd.harris.com 407 John Rodes Blvd.
Phone: (407)242-4333 Melbourne, FL 32905
Fax: (407)242-4453
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.