001: package org.apache.velocity.runtime.parser;
002:
003: /*
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: import org.apache.velocity.runtime.parser.node.ASTAddNode;
023: import org.apache.velocity.runtime.parser.node.ASTAndNode;
024: import org.apache.velocity.runtime.parser.node.ASTAssignment;
025: import org.apache.velocity.runtime.parser.node.ASTBlock;
026: import org.apache.velocity.runtime.parser.node.ASTComment;
027: import org.apache.velocity.runtime.parser.node.ASTDirective;
028: import org.apache.velocity.runtime.parser.node.ASTDivNode;
029: import org.apache.velocity.runtime.parser.node.ASTEQNode;
030: import org.apache.velocity.runtime.parser.node.ASTElseIfStatement;
031: import org.apache.velocity.runtime.parser.node.ASTElseStatement;
032: import org.apache.velocity.runtime.parser.node.ASTEscape;
033: import org.apache.velocity.runtime.parser.node.ASTEscapedDirective;
034: import org.apache.velocity.runtime.parser.node.ASTExpression;
035: import org.apache.velocity.runtime.parser.node.ASTFalse;
036: import org.apache.velocity.runtime.parser.node.ASTFloatingPointLiteral;
037: import org.apache.velocity.runtime.parser.node.ASTGENode;
038: import org.apache.velocity.runtime.parser.node.ASTGTNode;
039: import org.apache.velocity.runtime.parser.node.ASTIdentifier;
040: import org.apache.velocity.runtime.parser.node.ASTIfStatement;
041: import org.apache.velocity.runtime.parser.node.ASTIntegerLiteral;
042: import org.apache.velocity.runtime.parser.node.ASTIntegerRange;
043: import org.apache.velocity.runtime.parser.node.ASTLENode;
044: import org.apache.velocity.runtime.parser.node.ASTLTNode;
045: import org.apache.velocity.runtime.parser.node.ASTMap;
046: import org.apache.velocity.runtime.parser.node.ASTMethod;
047: import org.apache.velocity.runtime.parser.node.ASTModNode;
048: import org.apache.velocity.runtime.parser.node.ASTMulNode;
049: import org.apache.velocity.runtime.parser.node.ASTNENode;
050: import org.apache.velocity.runtime.parser.node.ASTNotNode;
051: import org.apache.velocity.runtime.parser.node.ASTObjectArray;
052: import org.apache.velocity.runtime.parser.node.ASTOrNode;
053: import org.apache.velocity.runtime.parser.node.ASTReference;
054: import org.apache.velocity.runtime.parser.node.ASTSetDirective;
055: import org.apache.velocity.runtime.parser.node.ASTStop;
056: import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
057: import org.apache.velocity.runtime.parser.node.ASTSubtractNode;
058: import org.apache.velocity.runtime.parser.node.ASTText;
059: import org.apache.velocity.runtime.parser.node.ASTTrue;
060: import org.apache.velocity.runtime.parser.node.ASTWord;
061: import org.apache.velocity.runtime.parser.node.ASTprocess;
062: import org.apache.velocity.runtime.parser.node.SimpleNode;
063:
064: /**
065: *
066: */
067: public interface ParserVisitor {
068: /**
069: * @param node
070: * @param data
071: * @return The object rendered by this node.
072: */
073: public Object visit(SimpleNode node, Object data);
074:
075: /**
076: * @param node
077: * @param data
078: * @return The object rendered by this node.
079: */
080: public Object visit(ASTprocess node, Object data);
081:
082: /**
083: * @param node
084: * @param data
085: * @return The object rendered by this node.
086: */
087: public Object visit(ASTEscapedDirective node, Object data);
088:
089: /**
090: * @param node
091: * @param data
092: * @return The object rendered by this node.
093: */
094: public Object visit(ASTEscape node, Object data);
095:
096: /**
097: * @param node
098: * @param data
099: * @return The object rendered by this node.
100: */
101: public Object visit(ASTComment node, Object data);
102:
103: /**
104: * @param node
105: * @param data
106: * @return The object rendered by this node.
107: */
108: public Object visit(ASTFloatingPointLiteral node, Object data);
109:
110: /**
111: * @param node
112: * @param data
113: * @return The object rendered by this node.
114: */
115: public Object visit(ASTIntegerLiteral node, Object data);
116:
117: /**
118: * @param node
119: * @param data
120: * @return The object rendered by this node.
121: */
122: public Object visit(ASTStringLiteral node, Object data);
123:
124: /**
125: * @param node
126: * @param data
127: * @return The object rendered by this node.
128: */
129: public Object visit(ASTIdentifier node, Object data);
130:
131: /**
132: * @param node
133: * @param data
134: * @return The object rendered by this node.
135: */
136: public Object visit(ASTWord node, Object data);
137:
138: /**
139: * @param node
140: * @param data
141: * @return The object rendered by this node.
142: */
143: public Object visit(ASTDirective node, Object data);
144:
145: /**
146: * @param node
147: * @param data
148: * @return The object rendered by this node.
149: */
150: public Object visit(ASTBlock node, Object data);
151:
152: /**
153: * @param node
154: * @param data
155: * @return The object rendered by this node.
156: */
157: public Object visit(ASTMap node, Object data);
158:
159: /**
160: * @param node
161: * @param data
162: * @return The object rendered by this node.
163: */
164: public Object visit(ASTObjectArray node, Object data);
165:
166: /**
167: * @param node
168: * @param data
169: * @return The object rendered by this node.
170: */
171: public Object visit(ASTIntegerRange node, Object data);
172:
173: /**
174: * @param node
175: * @param data
176: * @return The object rendered by this node.
177: */
178: public Object visit(ASTMethod node, Object data);
179:
180: /**
181: * @param node
182: * @param data
183: * @return The object rendered by this node.
184: */
185: public Object visit(ASTReference node, Object data);
186:
187: /**
188: * @param node
189: * @param data
190: * @return The object rendered by this node.
191: */
192: public Object visit(ASTTrue node, Object data);
193:
194: /**
195: * @param node
196: * @param data
197: * @return The object rendered by this node.
198: */
199: public Object visit(ASTFalse node, Object data);
200:
201: /**
202: * @param node
203: * @param data
204: * @return The object rendered by this node.
205: */
206: public Object visit(ASTText node, Object data);
207:
208: /**
209: * @param node
210: * @param data
211: * @return The object rendered by this node.
212: */
213: public Object visit(ASTIfStatement node, Object data);
214:
215: /**
216: * @param node
217: * @param data
218: * @return The object rendered by this node.
219: */
220: public Object visit(ASTElseStatement node, Object data);
221:
222: /**
223: * @param node
224: * @param data
225: * @return The object rendered by this node.
226: */
227: public Object visit(ASTElseIfStatement node, Object data);
228:
229: /**
230: * @param node
231: * @param data
232: * @return The object rendered by this node.
233: */
234: public Object visit(ASTSetDirective node, Object data);
235:
236: /**
237: * @param node
238: * @param data
239: * @return The object rendered by this node.
240: */
241: public Object visit(ASTStop node, Object data);
242:
243: /**
244: * @param node
245: * @param data
246: * @return The object rendered by this node.
247: */
248: public Object visit(ASTExpression node, Object data);
249:
250: /**
251: * @param node
252: * @param data
253: * @return The object rendered by this node.
254: */
255: public Object visit(ASTAssignment node, Object data);
256:
257: /**
258: * @param node
259: * @param data
260: * @return The object rendered by this node.
261: */
262: public Object visit(ASTOrNode node, Object data);
263:
264: /**
265: * @param node
266: * @param data
267: * @return The object rendered by this node.
268: */
269: public Object visit(ASTAndNode node, Object data);
270:
271: /**
272: * @param node
273: * @param data
274: * @return The object rendered by this node.
275: */
276: public Object visit(ASTEQNode node, Object data);
277:
278: /**
279: * @param node
280: * @param data
281: * @return The object rendered by this node.
282: */
283: public Object visit(ASTNENode node, Object data);
284:
285: /**
286: * @param node
287: * @param data
288: * @return The object rendered by this node.
289: */
290: public Object visit(ASTLTNode node, Object data);
291:
292: /**
293: * @param node
294: * @param data
295: * @return The object rendered by this node.
296: */
297: public Object visit(ASTGTNode node, Object data);
298:
299: /**
300: * @param node
301: * @param data
302: * @return The object rendered by this node.
303: */
304: public Object visit(ASTLENode node, Object data);
305:
306: /**
307: * @param node
308: * @param data
309: * @return The object rendered by this node.
310: */
311: public Object visit(ASTGENode node, Object data);
312:
313: /**
314: * @param node
315: * @param data
316: * @return The object rendered by this node.
317: */
318: public Object visit(ASTAddNode node, Object data);
319:
320: /**
321: * @param node
322: * @param data
323: * @return The object rendered by this node.
324: */
325: public Object visit(ASTSubtractNode node, Object data);
326:
327: /**
328: * @param node
329: * @param data
330: * @return The object rendered by this node.
331: */
332: public Object visit(ASTMulNode node, Object data);
333:
334: /**
335: * @param node
336: * @param data
337: * @return The object rendered by this node.
338: */
339: public Object visit(ASTDivNode node, Object data);
340:
341: /**
342: * @param node
343: * @param data
344: * @return The object rendered by this node.
345: */
346: public Object visit(ASTModNode node, Object data);
347:
348: /**
349: * @param node
350: * @param data
351: * @return The object rendered by this node.
352: */
353: public Object visit(ASTNotNode node, Object data);
354:
355: /**
356: * @param node
357: * @param data
358: * @return The object rendered by this node.
359: */
360: }
|