LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
label.hh
Go to the documentation of this file.
1 
6 #ifndef TEMP_LABEL_HH
7 # define TEMP_LABEL_HH
8 
9 # include <temp/identifier.hh>
10 
11 # ifndef MAYBE_EXTERN
12 # define MAYBE_EXTERN extern
13 # endif
14 
15 namespace temp
16 {
17 
18  template <typename Tag_>
19  struct label_traits;
20 
21  template <>
22  struct label_traits<misc::symbol>
23  {
24  static const std::string prefix;
25  static const int rank;
26  };
27 
28  template <>
29  struct label_traits<unsigned>
30  {
31  static const std::string prefix;
32  static const int rank;
33  };
34 
37 
38  // Static member specialization declaration.
39  //
40  // Do not use the `Label' typedef to make it clear that template<>
41  // is required.
42  template<> unsigned Identifier<label_traits>::count_;
43 
44  // Explicit template instantiation declarations.
46 
47  MAYBE_EXTERN template
48  std::ostream& operator<<(std::ostream& ostr,
49  const Identifier<label_traits>& obj);
50 }
51 
52 namespace misc
53 {
54 
55  // Explicit template instantiation declarations.
56  MAYBE_EXTERN template class endo_map<temp::Label>;
57 
58  MAYBE_EXTERN template
59  std::ostream& operator<<(std::ostream& ostr,
60  const map<temp::Label, temp::Label>& m);
61  MAYBE_EXTERN template class list<temp::Label>;
62  MAYBE_EXTERN template std::ostream& operator<<(std::ostream& ostr,
63  const list<temp::Label>& l);
64  MAYBE_EXTERN template bool operator% (const temp::Label& t,
65  const list<temp::Label>& l);
66 }
67 
68 #endif // !TEMP_LABEL_HH