1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
9 * DLL stub for MSVC++. Based upon versions of Stephen Naughton and Michael
13 // RK: Uncommented by instruction of Alexander Lenski
16 //#endif // _MSC_VER > 1000
18 // Exclude rarely-used stuff from Windows headers
19 #define WIN32_LEAN_AND_MEAN
23 #if defined( _MSC_VER ) && ( _MSC_VER < 1300 )
24 # error "DLL Build not supported on old MSVC's"
25 // Ok it seems to be possible with STLPort in stead of the vanilla MSVC STL
26 // implementation. This needs some work though. (and don't try it if you're
27 // not that familiar with compilers/building C++ DLL's in windows)
31 #include "antlr/config.hpp"
32 #include "antlr/Token.hpp"
33 #include "antlr/CircularQueue.hpp"
35 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
39 // Take care of necessary implicit instantiations of templates from STL
41 // This should take care of MSVC 7.0
42 #if defined( _MSC_VER ) && ( _MSC_VER == 1300 )
44 // these come from AST.hpp
45 template class ANTLR_API ASTRefCount
< AST
>;
46 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< RefAST
>;
47 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< RefAST
>;
48 //template ANTLR_API int operator<( ASTRefCount< AST >, ASTRefCount< AST > );
51 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< factory_descriptor_
* >;
52 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const char*, factory_type_
> >;
53 template struct ANTLR_API
ANTLR_USE_NAMESPACE(std
)pair
< const char*, factory_type_
>;
54 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Vector_val
< factory_descriptor_
*, ANTLR_USE_NAMESPACE(std
)allocator
< factory_descriptor_
* > >;
55 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< factory_descriptor_
* >;
58 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< bool >;
59 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Vector_val
< bool, ANTLR_USE_NAMESPACE(std
)allocator
< bool > >;
60 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< bool >;
63 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< ANTLR_USE_NAMESPACE(std
)string
, int > >;
64 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >;
65 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)_Tree_nod
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >, false > >::_Node
>;
66 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)_Tree_ptr
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >, false > >::_Nodeptr
>;
67 template struct ANTLR_API
ANTLR_USE_NAMESPACE(std
)pair
< ANTLR_USE_NAMESPACE(std
)string
, int >;
68 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >,false >;
69 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_nod
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >,false > >;
70 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_ptr
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >,false > >;
71 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_val
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >,false > >;
72 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, int > >,false > >;
73 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)map
< ANTLR_USE_NAMESPACE(std
)string
, int, CharScannerLiteralsLess
>;
76 // RK: it might well be that a load of these ints need to be unsigned ints
77 // (made some more stuff unsigned)
78 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< int >;
79 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Vector_val
< int, ANTLR_USE_NAMESPACE(std
)allocator
< int > >;
80 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< int >;
81 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< int, ANTLR_USE_NAMESPACE(std
)allocator
< int > >;
82 // template ANTLR_API inline int CircularQueue< int >::entries() const;
84 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< RefToken
>;
85 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Vector_val
< RefToken
, ANTLR_USE_NAMESPACE(std
)allocator
< RefToken
> >;
86 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< RefToken
>;
87 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)vector
< RefToken
, ANTLR_USE_NAMESPACE(std
)allocator
< RefToken
> >;
88 // template ANTLR_API inline int CircularQueue< RefToken >::entries() const;
91 template class ANTLR_API ASTRefCount
< CommonAST
>;
93 // CommonASTWithHiddenTokenTypes.hpp
94 template class ANTLR_API ASTRefCount
< CommonASTWithHiddenTokens
>;
96 // LexerSharedInputState.hpp
97 template class ANTLR_API RefCount
< LexerInputState
>;
99 // ParserSharedInputState.hpp
100 template class ANTLR_API RefCount
< ParserInputState
>;
102 // TokenStreamSelector.hpp
103 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >;
104 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >;
105 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)_Tree_nod
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >, false > >::_Node
>;
106 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)_Tree_ptr
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >, false > >::_Nodeptr
>;
107 template struct ANTLR_API
ANTLR_USE_NAMESPACE(std
)pair
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* >;
108 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >,false >;
109 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_nod
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >,false > >;
110 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_ptr
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >,false > >;
111 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree_val
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >,false > >;
112 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Tree
< ANTLR_USE_NAMESPACE(std
)_Tmap_traits
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
*, ANTLR_USE_NAMESPACE(std
)less
< ANTLR_USE_NAMESPACE(std
)string
>, ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)pair
< const ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* > >,false > >;
113 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)map
< ANTLR_USE_NAMESPACE(std
)string
, TokenStream
* >;
115 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< TokenStream
* >;
116 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)allocator
< ANTLR_USE_NAMESPACE(std
)_Deque_map
< TokenStream
* , ANTLR_USE_NAMESPACE(std
)allocator
< TokenStream
* > >::_Tptr
>;
117 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Deque_map
< TokenStream
*, ANTLR_USE_NAMESPACE(std
)allocator
< TokenStream
* > >;
118 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)_Deque_val
< TokenStream
*, ANTLR_USE_NAMESPACE(std
)allocator
< TokenStream
* > >;
119 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)deque
< TokenStream
*, ANTLR_USE_NAMESPACE(std
)allocator
< TokenStream
* > >;
120 template class ANTLR_API
ANTLR_USE_NAMESPACE(std
)stack
< TokenStream
*, ANTLR_USE_NAMESPACE(std
)deque
<TokenStream
*> >;
122 #elif defined( _MSC_VER ) && ( _MSC_VER == 1310 )
123 // Instantiations for MSVC 7.1
124 template class ANTLR_API CircularQueue
< int >;
125 template class ANTLR_API CircularQueue
< RefToken
>;
127 // #else future msvc's
131 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
135 BOOL APIENTRY
DllMain( HANDLE hModule
, DWORD ul_reason_for_call
, LPVOID lpReserved
)