KEY2Token.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libetonyek project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef KEY2TOKEN_H_INCLUDED
11 #define KEY2TOKEN_H_INCLUDED
12 
13 namespace libetonyek
14 {
15 
16 namespace detail
17 {
18 
19 template<unsigned N, unsigned P>
20 struct log_impl
21 {
22  static const unsigned value = log_impl<(N >> 1), P + 1>::value;
23 };
24 
25 template<unsigned P>
26 struct log_impl<1, P>
27 {
28  static const unsigned value = P;
29 };
30 
31 template<unsigned P>
32 struct log_impl<0, P>
33 {
34 };
35 
36 template<unsigned N>
37 struct log
38 {
39  static const unsigned value = log_impl<N, 0>::value;
40 };
41 
42 }
43 
44 namespace KEY2Token
45 {
46 
47 enum
48 {
50 
51  // elements
106  br,
123  cf,
161  ct,
164  d,
179  du,
193  f,
204  fo,
212  g,
324  n,
341  p,
373  r,
375  rb,
376  rd,
381  rn,
383  rt,
384  s,
393  set,
802  t,
900 
901  // attributes
902  a,
914  b,
916  c,
977  fs,
981  h,
983  hc,
990  ho,
993  ht,
994  id,
995  ID,
1006  k,
1017  m,
1109  v,
1115  w,
1118  x,
1119  y,
1120  z,
1121 
1122  // attribute values
1134 
1136 };
1137 
1138 // namespaces
1139 enum
1140 {
1147 };
1148 
1149 }
1150 
1152 {
1153  int operator()(const char *str) const;
1154 };
1155 
1156 }
1157 
1158 #endif // KEY2TOKEN_H_INCLUDED
1159 
1160 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libetonyek by doxygen 1.8.3.1