S - Intranet - Department of Computer Science: Login
S - Intranet - Department of Computer Science: Login
S - Intranet - Department of Computer Science: Login
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Syntax Tree Classes for Prog<br />
For each production, SableCC generates a class, for example:<br />
class AAssignStm extends PStm<br />
{<br />
PTerm _left_;<br />
PTerm _right_;<br />
}<br />
public void apply(Switch sw)<br />
{<br />
((Analysis) sw).caseAAssignStm(this);<br />
}<br />
There are also set and get methods for _left_ and _right_,<br />
constructors, and other housekeeping methods which we won’t<br />
use.<br />
71