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,
780  so,
803  t,
901 
902  // attributes
903  a,
915  b,
917  c,
978  fs,
982  h,
984  hc,
991  ho,
994  ht,
995  id,
996  ID,
1007  k,
1018  m,
1110  v,
1116  w,
1119  x,
1120  y,
1121  z,
1122 
1123  // attribute values
1133  i,
1136 
1138 };
1139 
1140 // namespaces
1141 enum
1142 {
1149 };
1150 
1151 }
1152 
1154 {
1155  int operator()(const char *str) const;
1156 };
1157 
1158 }
1159 
1160 #endif // KEY2TOKEN_H_INCLUDED
1161 
1162 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libetonyek by doxygen 1.8.3.1