File: PdePreprocessor.html

package info (click to toggle)
arduino 1%3A1.0.1%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 22,476 kB
  • sloc: java: 56,088; cpp: 10,050; ansic: 9,904; makefile: 1,721; xml: 468; perl: 198; sh: 153; python: 62
file content (519 lines) | stat: -rw-r--r-- 20,075 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
PdePreprocessor
</TITLE>

<META NAME="keywords" CONTENT="processing.app.preproc.PdePreprocessor class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="PdePreprocessor";
}
</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;<A HREF="../../../processing/app/preproc/PdePartialTokenTypes.html" title="interface in processing.app.preproc"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../processing/app/preproc/PdeRecognizer.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/PdePreprocessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PdePreprocessor.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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 PdePreprocessor</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>processing.app.preproc.PdePreprocessor</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>PdePreprocessor</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Class that orchestrates preprocessing p5 syntax into straight Java.
 <P/>
 <B>Current Preprocessor Subsitutions:</B>
 <UL>
 <LI>any function not specified as being protected or private will
 be made 'public'. this means that <TT>void setup()</TT> becomes
 <TT>public void setup()</TT>. This is important to note when
 coding with core.jar outside of the PDE.
 <LI><TT>compiler.substitute_floats</TT> (currently "substitute_f")
 treat doubles as floats, i.e. 12.3 becomes 12.3f so that people
 don't have to add f after their numbers all the time since it's
 confusing for beginners.
 <LI><TT>compiler.enhanced_casting</TT> byte(), char(), int(), float()
 works for casting. this is basic in the current implementation, but
 should be expanded as described above. color() works similarly to int(),
 however there is also a *function* called color(r, g, b) in p5.
 <LI><TT>compiler.color_datatype</TT> 'color' is aliased to 'int'
 as a datatype to represent ARGB packed into a single int, commonly
 used in p5 for pixels[] and other color operations. this is just a
 search/replace type thing, and it can be used interchangeably with int.
 <LI><TT>compiler.web_colors</TT> (currently "inline_web_colors")
 color c = #cc0080; should unpack to 0xffcc0080 (the ff at the top is
 so that the color is opaque), which is just an int.
 </UL>
 <B>Other preprocessor functionality</B>
 <UL>
 <LI>detects what 'mode' the program is in: static (no function
 brackets at all, just assumes everything is in draw), active
 (setup plus draw or loop), and java mode (full java support).
 http://processing.org/reference/environment/
 </UL>
 <P/>
 The PDE Preprocessor is based on the Java Grammar that comes with
 ANTLR 2.7.2.  Moving it forward to a new version of the grammar
 shouldn't be too difficult.
 <P/>
 Here's some info about the various files in this directory:
 <P/>
 <TT>java.g:</TT> this is the ANTLR grammar for Java 1.3/1.4 from the
 ANTLR distribution.  It is in the public domain.  The only change to
 this file from the original this file is the uncommenting of the
 clauses required to support assert().
 <P/>
 <TT>java.tree.g:</TT> this describes the Abstract Syntax Tree (AST)
 generated by java.g.  It is only here as a reference for coders hacking
 on the preprocessor, it is not built or used at all.  Note that pde.g
 overrides some of the java.g rules so that in PDE ASTs, there are a
 few minor differences.  Also in the public domain.
 <P/>
 <TT>pde.g:</TT> this is the grammar and lexer for the PDE language
 itself. It subclasses the java.g grammar and lexer.  There are a couple
 of overrides to java.g that I hope to convince the ANTLR folks to fold
 back into their grammar, but most of this file is highly specific to
 PDE itself.
 <TT>PdeEmitter.java:</TT> this class traverses the AST generated by
 the PDE Recognizer, and emits it as Java code, doing any necessary
 transformations along the way.  It is based on JavaEmitter.java,
 available from antlr.org, written by Andy Tripp <atripp@comcast.net>,
 who has given permission for it to be distributed under the GPL.
 <P/>
 <TT>ExtendedCommonASTWithHiddenTokens.java:</TT> this adds a necessary
 initialize() method, as well as a number of methods to allow for XML
 serialization of the parse tree in a such a way that the hidden tokens
 are visible.  Much of the code is taken from the original
 CommonASTWithHiddenTokens class.  I hope to convince the ANTLR folks
 to fold these changes back into that class so that this file will be
 unnecessary.
 <P/>
 <TT>TokenStreamCopyingHiddenTokenFilter.java:</TT> this class provides
 TokenStreamHiddenTokenFilters with the concept of tokens which can be
 copied so that they are seen by both the hidden token stream as well
 as the parser itself.  This is useful when one wants to use an
 existing parser (like the Java parser included with ANTLR) that throws
 away some tokens to create a parse tree which can be used to spit out
 a copy of the code with only minor modifications.  Partially derived
 from ANTLR code.  I hope to convince the ANTLR folks to fold this
 functionality back into ANTLR proper as well.
 <P/>
 <TT>whitespace_test.pde:</TT> a torture test to ensure that the
 preprocessor is correctly preserving whitespace, comments, and other
 hidden tokens correctly.  See the comments in the code for details about
 how to run the test.
 <P/>
 All other files in this directory are generated at build time by ANTLR
 itself.  The ANTLR manual goes into a fair amount of detail about the
 what each type of file is for.
 <P/>
<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>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#ACTIVE">ACTIVE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../antlr/TokenStreamCopyingHiddenTokenFilter.html" title="class in antlr">TokenStreamCopyingHiddenTokenFilter</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#filter">filter</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used by PdeEmitter.dumpHiddenTokens()</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#foundMain">foundMain</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#JAVA">JAVA</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#programType">programType</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#STATIC">STATIC</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</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/PdePreprocessor.html#PdePreprocessor()">PdePreprocessor</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setup a new preprocessor.</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;java.util.ArrayList&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#getExtraImports()">getExtraImports</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#write()">write</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;preprocesses a pde file and write out a java file</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../processing/app/preproc/PdePreprocessor.html#writePrefix(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])">writePrefix</A></B>(java.lang.String&nbsp;program,
            java.lang.String&nbsp;buildPath,
            java.lang.String&nbsp;name,
            java.lang.String[]&nbsp;codeFolderPackages)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="STATIC"><!-- --></A><H3>
STATIC</H3>
<PRE>
public static final int <B>STATIC</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#processing.app.preproc.PdePreprocessor.STATIC">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="ACTIVE"><!-- --></A><H3>
ACTIVE</H3>
<PRE>
public static final int <B>ACTIVE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#processing.app.preproc.PdePreprocessor.ACTIVE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="JAVA"><!-- --></A><H3>
JAVA</H3>
<PRE>
public static final int <B>JAVA</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#processing.app.preproc.PdePreprocessor.JAVA">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="programType"><!-- --></A><H3>
programType</H3>
<PRE>
public static int <B>programType</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="foundMain"><!-- --></A><H3>
foundMain</H3>
<PRE>
public static boolean <B>foundMain</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="filter"><!-- --></A><H3>
filter</H3>
<PRE>
public static <A HREF="../../../antlr/TokenStreamCopyingHiddenTokenFilter.html" title="class in antlr">TokenStreamCopyingHiddenTokenFilter</A> <B>filter</B></PRE>
<DL>
<DD>Used by PdeEmitter.dumpHiddenTokens()
<P>
<DL>
</DL>
</DL>

<!-- ========= 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="PdePreprocessor()"><!-- --></A><H3>
PdePreprocessor</H3>
<PRE>
public <B>PdePreprocessor</B>()</PRE>
<DL>
<DD>Setup a new preprocessor.
<P>
</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="writePrefix(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])"><!-- --></A><H3>
writePrefix</H3>
<PRE>
public int <B>writePrefix</B>(java.lang.String&nbsp;program,
                       java.lang.String&nbsp;buildPath,
                       java.lang.String&nbsp;name,
                       java.lang.String[]&nbsp;codeFolderPackages)
                throws java.io.FileNotFoundException</PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="write()"><!-- --></A><H3>
write</H3>
<PRE>
public java.lang.String <B>write</B>()
                       throws java.lang.Exception</PRE>
<DL>
<DD>preprocesses a pde file and write out a java file
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the classname of the exported Java
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getExtraImports()"><!-- --></A><H3>
getExtraImports</H3>
<PRE>
public java.util.ArrayList&lt;java.lang.String&gt; <B>getExtraImports</B>()</PRE>
<DL>
<DD><DL>
</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;<A HREF="../../../processing/app/preproc/PdePartialTokenTypes.html" title="interface in processing.app.preproc"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../processing/app/preproc/PdeRecognizer.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/PdePreprocessor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PdePreprocessor.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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>