01: package persistence.antlr;
02:
03: /**
04: * ANTLR Translator Generator
05: * Project led by Terence Parr at http://www.jGuru.com
06: * Software rights: http://www.antlr.org/license.html
07: *
08: * Container for a C++ namespace specification. Namespaces can be
09: * nested, so this contains a vector of all the nested names.
10: *
11: * @author David Wagner (JPL/Caltech) 8-12-00
12: *
13: */
14:
15: //
16: // ANTLR C# Code Generator by Micheal Jordan
17: // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
18: // Anthony Oguntimehin
19: //
20: // With many thanks to Eric V. Smith from the ANTLR list.
21: //
22: // HISTORY:
23: //
24: // 17-May-2002 kunle Original version
25: //
26: import java.util.Vector;
27: import java.util.Enumeration;
28: import java.io.PrintWriter;
29: import java.util.StringTokenizer;
30:
31: public class CSharpNameSpace extends NameSpace {
32: public CSharpNameSpace(String name) {
33: super (name);
34: }
35:
36: /**
37: * Method to generate the required CSharp namespace declarations
38: */
39: void emitDeclarations(PrintWriter out) {
40: out.println("namespace " + getName());
41: out.println("{");
42: }
43:
44: /**
45: * Method to generate the required CSharp namespace closures
46: */
47: void emitClosures(PrintWriter out) {
48: out.println("}");
49: }
50: }
|