Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #895
| From | Jens Kallup <jkallup@web.de> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | interpreter: how is it possible to interpret nested IF ELSE ENDIF ???? |
| Date | 2013-05-15 07:42 +0200 |
| Organization | 1&1 Internet AG |
| Message-ID | <13-05-009@comp.compilers> (permalink) |
Hello,
like the topic says:
a give construct should be interpret through a single pass???:
IF 2 == 3
print "not print"
IF 2 == 3
print "not"
ELSE
print "wrong1"
ENDIF
print "3"
ELSE
print "this"
ENDIF
Thanks for helping
Jens
[My usual advice is to translate the source to something easy to
interpret like an AST, then run your interpreter on that. Trying
to jump around in the source code and remember when to parse what
and to avoid side effects when parsing through code you're supposed
to skip is miserable. -John]
Back to comp.compilers | Previous | Next — Next in thread | Find similar | Unroll thread
interpreter: how is it possible to interpret nested IF ELSE ENDIF ???? Jens Kallup <jkallup@web.de> - 2013-05-15 07:42 +0200 Re: interpreter: how is it possible to interpret nested IF ELSE ENDIF ???? Aleksey Demakov <ademakov@gmail.com> - 2013-05-31 16:07 +0400 Re: interpreter: how is it possible to interpret nested IF ELSE ENDIF ???? mertesthomas@gmail.com - 2013-06-19 03:43 -0700
csiph-web