<html><body bgcolor="#FFFFFF"><div>Clarification: the "questioning comment" is not mine, it is there in the code. I suspect it is a good question & that the code isn't what it should be.<br><br> - Jay (briefly/pocket-sized-computer-aka-phone)</div><div><br>On Sep 19, 2012, at 7:39 PM, Antony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div><div>On Sep 19, 2012, at 9:31 PM, Jay K <<a href="mailto:jay.krell@cornell.edu"><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a></a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><font face="Calibri, sans-serif">Areas that may need attention in the frontend?</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">TryFinStmt.m3:</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> CG.Start_call_direct (p.handler.cg_proc, p.handler.level, CG.Type.Void);</font></div><div><font face="Calibri, sans-serif"> (* Shouldn't we pass the activation parameter here?</font></div><div><font face="Calibri, sans-serif"> What value do we pass? *)</font></div><div><font face="Calibri, sans-serif"> CG.Call_direct (p.handler.cg_proc, CG.Type.Void);</font></div></div></div></blockquote><div><br></div><div>The level let’s you compute that.</div><br><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><span style="font-family: Calibri, sans-serif; font-size: 12pt; ">I'm wondering this too...like..what is the interface</span></div><div><font face="Calibri, sans-serif">to except/finally blocks?</font></div></div></div></blockquote><div><br></div><div>?</div><br><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><span style="font-family: Calibri, sans-serif; font-size: 12pt; ">It appears they take two, or one, or zero parameters,</span></div><div><span style="font-family: Calibri, sans-serif; ">depending on intepretation and context.</span></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">two parameters:</font></div><div><font face="Calibri, sans-serif"> _static_link</font></div><div><font face="Calibri, sans-serif"> exception stuff</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> </font></div><div><font face="Calibri, sans-serif">one parameter:</font></div><div><font face="Calibri, sans-serif"> _static_link</font></div><div><font face="Calibri, sans-serif"> </font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">zero parameters:</font></div><div><font face="Calibri, sans-serif"> the above</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">I think the right implmentation (assuming no significant</font></div><div><font face="Calibri, sans-serif">change to nested functions, which Tony is thinking about:) )</font></div><div><font face="Calibri, sans-serif">is one parameter:</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> exception stuff</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">and the implied/popped static_link, always.</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">For now, I think I'll not prototype these and use K&R definitions, yuck!</font></div></div></div></blockquote><div><br></div><div>That works.</div><br><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><span style="font-family: Calibri, sans-serif; font-size: 12pt; ">Maybe generating C++ with overloads is a good idea??</span></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">values/Procedure.m3:</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> ELSIF (cur.token = TK.tSEMI) THEN</font></div><div><font face="Calibri, sans-serif"> t.body := NEW (Body, self := t);</font></div><div><font face="Calibri, sans-serif"> ProcBody.Push (t.body);</font></div><div><font face="Calibri, sans-serif"> (* try accepting the Modula-2 syntax *)</font></div><div><font face="Calibri, sans-serif"> Error.ID (id, "expecting \'=\' before procedure body");</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> </font></div><div><font face="Calibri, sans-serif">Probably everything after the error should be removed?</font></div><div><font face="Calibri, sans-serif">Or this is an example trying to recover from parse errors</font></div><div><font face="Calibri, sans-serif">and doing best effort?</font></div></div></div></blockquote><div><br></div><div>Yes.</div><br><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr"><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> - Jay</font></div></div></div></blockquote></div><br></div></blockquote></body></html>