antlr

Class NameSpace

Known Direct Subclasses:
CSharpNameSpace

public class NameSpace
extends Object

ANTLR Translator Generator Project led by Terence Parr at http://www.jGuru.com Software rights: http://www.antlr.org/license.html Container for a C++ namespace specification. Namespaces can be nested, so this contains a vector of all the nested names.
Author:
David Wagner (JPL/Caltech) 8-12-00 $Id: //depot/code/org.antlr/release/antlr-2.7.4/antlr/NameSpace.java#1 $

Constructor Summary

NameSpace(String name)

Method Summary

(package private) void
emitClosures(PrintWriter out)
Method to generate the required C++ namespace closures
(package private) void
emitDeclarations(PrintWriter out)
Method to generate the required C++ namespace declarations
String
getName()
protected void
parse(String name)
Parse a C++ namespace declaration into seperate names splitting on :: We could easily parameterize this to make the delimiter a language-specific parameter, or use subclasses to support C++ namespaces versus java packages.

Constructor Details

NameSpace

public NameSpace(String name)

Method Details

emitClosures

(package private)  void emitClosures(PrintWriter out)
Method to generate the required C++ namespace closures

emitDeclarations

(package private)  void emitDeclarations(PrintWriter out)
Method to generate the required C++ namespace declarations

getName

public String getName()

parse

protected void parse(String name)
Parse a C++ namespace declaration into seperate names splitting on :: We could easily parameterize this to make the delimiter a language-specific parameter, or use subclasses to support C++ namespaces versus java packages. -DAW