FictionBook3Token.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 libe-book 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 FICTIONBOOK3TOKEN_H_INCLUDED
11#define FICTIONBOOK3TOKEN_H_INCLUDED
12
13#include "EBOOKToken.h"
14
15#define FictionBook3_TOKEN(ns, name) (FictionBook3Token::ns | FictionBook3Token::NS_#name)
16
17 namespace libebook
18{
19
20 class EBOOKTokenizer;
21
22 namespace FictionBook3Token
23{
24
25 enum
26{
27 INVALID_TOKEN = 0,
28 FIRST_TOKEN = EBOOKToken<FictionBook3Parser>::FIRST_TOKEN,
29
30 // namespaces
31 NS_fb3b,
32 NS_fb3d,
33 NS_xlink,
34
35 // elements
36
37 // attributes
38
39 // attribute values
40
41 LAST_TOKEN
42};
43
44 static_assert(EBOOKToken<FictionBook3Parser>::LAST_TOKEN >= LAST_TOKEN, "token number overflow");
45
46 const EBOOKTokenizer &getTokenizer();
47
48}
49
50}
51
52#endif // FICTIONBOOK3TOKEN_H_INCLUDED
53
54/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
EBOOKToken.h
libebook::EBOOKTokenizer
Definition EBOOKTokenizer.h:17
libebook::FictionBook3Token::getTokenizer
const EBOOKTokenizer & getTokenizer()
Definition FictionBook3Token.cpp:64
libebook::FictionBook3Token::NS_xlink
@ NS_xlink
Definition FictionBook3Token.h:33
libebook::FictionBook3Token::NS_fb3b
@ NS_fb3b
Definition FictionBook3Token.h:31
libebook::FictionBook3Token::NS_fb3d
@ NS_fb3d
Definition FictionBook3Token.h:32
libebook::FictionBook3Token::LAST_TOKEN
@ LAST_TOKEN
Definition FictionBook3Token.h:41
libebook::FictionBook3Token::FIRST_TOKEN
@ FIRST_TOKEN
Definition FictionBook3Token.h:28
libebook::FictionBook3Token::INVALID_TOKEN
@ INVALID_TOKEN
Definition FictionBook3Token.h:27
libebook
Definition BBeBCollector.cpp:19
libebook::EBOOKToken
Definition EBOOKToken.h:18