]> git.saurik.com Git - apple/security.git/blob - libsecurity_codesigning/antlr2/src/dll.cpp
Security-55471.tar.gz
[apple/security.git] / libsecurity_codesigning / antlr2 / src / dll.cpp
1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
4 *
5 * $Id:$
6 */
7
8 /*
9 * DLL stub for MSVC++. Based upon versions of Stephen Naughton and Michael
10 * T. Richter
11 */
12
13 // RK: Uncommented by instruction of Alexander Lenski
14 //#if _MSC_VER > 1000
15 //# pragma once
16 //#endif // _MSC_VER > 1000
17
18 // Exclude rarely-used stuff from Windows headers
19 #define WIN32_LEAN_AND_MEAN
20
21 #include <windows.h>
22
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)
28 #endif
29
30 #include <vector>
31 #include "antlr/config.hpp"
32 #include "antlr/Token.hpp"
33 #include "antlr/CircularQueue.hpp"
34
35 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
36 namespace antlr {
37 #endif
38
39 // Take care of necessary implicit instantiations of templates from STL
40
41 // This should take care of MSVC 7.0
42 #if defined( _MSC_VER ) && ( _MSC_VER == 1300 )
43
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 > );
49
50 // ASTFactory.hpp
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_* >;
56
57 // BitSet.hpp
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 >;
61
62 // CharScanner.hpp
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 >;
74
75 // CircularQueue.hpp
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;
83
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;
89
90 // CommonAST.hpp
91 template class ANTLR_API ASTRefCount< CommonAST >;
92
93 // CommonASTWithHiddenTokenTypes.hpp
94 template class ANTLR_API ASTRefCount< CommonASTWithHiddenTokens >;
95
96 // LexerSharedInputState.hpp
97 template class ANTLR_API RefCount< LexerInputState >;
98
99 // ParserSharedInputState.hpp
100 template class ANTLR_API RefCount< ParserInputState >;
101
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* >;
114
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*> >;
121
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 >;
126
127 // #else future msvc's
128
129 #endif
130
131 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
132 }
133 #endif
134
135 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
136 {
137 return TRUE;
138 }