01: /**************************************************************************/
02: /* N I C E */
03: /* A simple imperative object-oriented research language */
04: /* (c) Daniel Bonniot 1999 */
05: /* */
06: /* This program is free software; you can redistribute it and/or modify */
07: /* it under the terms of the GNU General Public License as published by */
08: /* the Free Software Foundation; either version 2 of the License, or */
09: /* (at your option) any later version. */
10: /* */
11: /**************************************************************************/package nice.tools.code;
12:
13: import gnu.bytecode.*;
14: import gnu.expr.*;
15: import gnu.mapping.*;
16:
17: /**
18: Implements language dependant methods of gnu.expr.Interpreter.
19:
20: But Nice has no interpreter at the time being!
21:
22: @version $Date: 2001/10/30 15:38:24 $
23: @author Daniel Bonniot
24: */
25:
26: public class NiceInterpreter extends gnu.expr.Interpreter {
27: public String getName() {
28: return "Nice";
29: }
30:
31: public Type getTypeFor(Class clas) {
32: return Type.make(clas);
33: }
34:
35: /** Must be called before code generation. */
36: public static void init() {
37: if (Interpreter.defaultInterpreter == null) {
38: Interpreter.defaultInterpreter = new NiceInterpreter();
39: }
40: }
41:
42: /** Not implemented. */
43: public Object read(InPort in) throws java.io.IOException,
44: gnu.text.SyntaxException {
45: throw new Error("Not implemented");
46: }
47:
48: /** Not implemented. */
49: public gnu.text.Lexer getLexer(InPort inp,
50: gnu.text.SourceMessages messages) {
51: throw new Error("Not implemented");
52: }
53:
54: /** Not implemented. */
55: public ModuleExp parse(Environment env, gnu.text.Lexer lexer)
56: throws java.io.IOException, gnu.text.SyntaxException {
57: throw new Error("Not implemented");
58: }
59:
60: /** Not implemented. */
61: public ModuleExp parseFile(InPort port,
62: gnu.text.SourceMessages messages) {
63: throw new Error("Not implemented");
64: }
65:
66: /** Not implemented. */
67: public gnu.lists.FormatToConsumer getFormat(boolean readable) {
68: return null;
69: }
70: }
|