1
2
3
4
5 package net.sf.tomp.xtcl;
6
7 /***
8 * @author tomp TODO To change the template for this generated type comment go
9 * to Window - Preferences - Java - Code Style - Code Templates
10 */
11 public interface Compiler {
12 /***
13 * Compiles commands from a CommandLineReader into a command Sequence
14 *
15 * @param clr CommandLineReader - the source for compilation
16 * @return the compiled Command
17 * @throws Exception if something bad occurs
18 */
19 Command compile(CommandLineReader clr) throws Exception;
20
21 /***
22 * @param cl Current (first) command lines (already split to String[])
23 * @param clr CommandLineReader for further reading
24 * @return compiled Command
25 * @throws Exception if something bad occurs
26 */
27 Command compile(String[] cl, CommandLineReader clr) throws Exception;
28
29 /***
30 * @param cl Current (first) command lines (not yet split to String[])
31 * @return compiled Command
32 * @throws Exception if something bad occurs
33 */
34 Command compile(String cl, CommandLineReader clr) throws Exception;
35
36 /***
37 * @param script
38 * @return compiled Command
39 * @throws Exception if something bad occurs
40 */
41 Command compile(String script) throws Exception;
42
43 /***
44 * @return Returns the context.
45 */
46 Context getContext();
47
48 /***
49 * @return Returns this Compiler's parent.
50 */
51 Compiler getNextCompiler();
52
53 /***
54 * @param context The context to set.
55 */
56 void setContext(Context context);
57 }