1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-11 22:24:13 +01:00
Arduino/build/javadoc/everything/processing/app/preproc/PdeEmitter.html

312 lines
25 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
PdeEmitter
</TITLE>
<META NAME="keywords" CONTENT="processing.app.preproc.PdeEmitter class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="PdeEmitter";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../processing/app/preproc/PdeLexer.html" title="class in processing.app.preproc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?processing/app/preproc/PdeEmitter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PdeEmitter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
processing.app.preproc</FONT>
<BR>
Class PdeEmitter</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>processing.app.preproc.PdeEmitter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../processing/app/preproc/PdeTokenTypes.html" title="interface in processing.app.preproc">PdeTokenTypes</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>PdeEmitter</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../processing/app/preproc/PdeTokenTypes.html" title="interface in processing.app.preproc">PdeTokenTypes</A></DL>
</PRE>
<P>
PDEEmitter: A class that can take an ANTLR Java AST and produce
reasonably formatted Java code from it. To use it, create a
PDEEmitter object, call setOut() if you want to print to something
other than System.out, and then call print(), passing the
AST. Typically, the AST node that you pass would be the root of a
tree - the ROOT_ID node that represents a Java file.
<P>
<P>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_processing.app.preproc.PdeTokenTypes"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from interface processing.app.preproc.<A HREF="../../../processing/app/preproc/PdeTokenTypes.html" title="interface in processing.app.preproc">PdeTokenTypes</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ABSTRACT">ABSTRACT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ARRAY_DECLARATOR">ARRAY_DECLARATOR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ARRAY_INIT">ARRAY_INIT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ASSIGN">ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BAND">BAND</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BAND_ASSIGN">BAND_ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BLOCK">BLOCK</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BNOT">BNOT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BOR">BOR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BOR_ASSIGN">BOR_ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BSR">BSR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BSR_ASSIGN">BSR_ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BXOR">BXOR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#BXOR_ASSIGN">BXOR_ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CASE_GROUP">CASE_GROUP</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CHAR_LITERAL">CHAR_LITERAL</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CLASS_DEF">CLASS_DEF</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#COLON">COLON</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#COMMA">COMMA</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CONSTRUCTOR_CAST">CONSTRUCTOR_CAST</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CTOR_CALL">CTOR_CALL</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#CTOR_DEF">CTOR_DEF</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#DEC">DEC</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#DIV">DIV</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#DIV_ASSIGN">DIV_ASSIGN</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#DOT">DOT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ELIST">ELIST</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EMPTY_FIELD">EMPTY_FIELD</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EMPTY_STAT">EMPTY_STAT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EOF">EOF</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EQUAL">EQUAL</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#ESC">ESC</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EXPONENT">EXPONENT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EXPR">EXPR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#EXTENDS_CLAUSE">EXTENDS_CLAUSE</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#FINAL">FINAL</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#FLOAT_SUFFIX">FLOAT_SUFFIX</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#FOR_CONDITION">FOR_CONDITION</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#FOR_INIT">FOR_INIT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#FOR_ITERATOR">FOR_ITERATOR</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#GE">GE</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#GT">GT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#HEX_DIGIT">HEX_DIGIT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#IDENT">IDENT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#IMPLEMENTS_CLAUSE">IMPLEMENTS_CLAUSE</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#IMPORT">IMPORT</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#INC">INC</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#INDEX_OP">INDEX_OP</A>, <A HREF="../../../processing/app/preproc/PdeTokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</A>, <
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdeEmitter.html#PdeEmitter()">PdeEmitter</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdeEmitter.html#print(antlr.collections.AST)">print</A></B>(antlr.collections.AST&nbsp;ast)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the given AST.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdeEmitter.html#setOut(java.io.PrintStream)">setOut</A></B>(java.io.PrintStream&nbsp;out)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specify a PrintStream to print to.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="PdeEmitter()"><!-- --></A><H3>
PdeEmitter</H3>
<PRE>
public <B>PdeEmitter</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setOut(java.io.PrintStream)"><!-- --></A><H3>
setOut</H3>
<PRE>
public void <B>setOut</B>(java.io.PrintStream&nbsp;out)</PRE>
<DL>
<DD>Specify a PrintStream to print to. System.out is the default.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the PrintStream to print to</DL>
</DD>
</DL>
<HR>
<A NAME="print(antlr.collections.AST)"><!-- --></A><H3>
print</H3>
<PRE>
public void <B>print</B>(antlr.collections.AST&nbsp;ast)
throws <A HREF="../../../processing/app/debug/RunnerException.html" title="class in processing.app.debug">RunnerException</A></PRE>
<DL>
<DD>Print the given AST. Call this function to print your PDE code.
It works by making recursive calls to print children.
So the code below is one big "switch" statement on the passed AST type.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../processing/app/debug/RunnerException.html" title="class in processing.app.debug">RunnerException</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../processing/app/preproc/PdeLexer.html" title="class in processing.app.preproc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?processing/app/preproc/PdeEmitter.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PdeEmitter.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>