xref: /AOO41X/main/autodoc/source/parser_i/inc/s2_luidl/tk_punct.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_UIDL_TK_PUNCT_HXX
29 #define ADC_UIDL_TK_PUNCT_HXX
30 
31 // USED SERVICES
32 	// BASE CLASSES
33 #include <s2_luidl/uidl_tok.hxx>
34 	// COMPONENTS
35 #include <luxenum.hxx>
36 	// PARAMETERS
37 
38 
39 namespace csi
40 {
41 namespace uidl
42 {
43 
44 
45 class TokPunctuation : public Token
46 {
47   public:
48 	// TYPES
49 	enum E_TokenId
50 	{
51 		e_none = 0,
52 		BracketOpen =  1, 			// (
53 		BracketClose = 2,           // )
54 		ArrayBracketOpen = 3,       // [
55 		ArrayBracketClose = 4,      // ]
56 		CurledBracketOpen = 5,      // {
57 		CurledBracketClose = 6,     // }
58 		Semicolon = 7, 	            // ;
59 		Colon = 8,                  // :
60 		DoubleColon = 9,            // ::
61 		Comma = 10,                 // ,
62 		Minus = 11,                 // -
63 		Fullstop = 12,              // .
64 		Lesser = 13,                // <
65 		Greater = 14                // >
66 	};
67 	typedef lux::Enum<E_TokenId> EV_TokenId;
68 
69 
70 						TokPunctuation(
71 							EV_TokenId			i_eTag )
72 												:	eTag(i_eTag) {}
73 	// OPERATIONS
74 	virtual void		Trigger(
75 							TokenInterpreter &	io_rInterpreter ) const;
76 	// INQUIRY
77 	virtual const char *
78 						Text() const;
79 	EV_TokenId			Id() const				{ return eTag; }
80 
81 
82   private:
83 	// DATA
84 	EV_TokenId   		eTag;
85 };
86 
87 class Tok_EOL : public Token
88 {
89 	// OPERATIONS
90 	virtual void		Trigger(
91 							TokenInterpreter &	io_rInterpreter ) const;
92 	// INQUIRY
93 	virtual const char *
94 						Text() const;
95 };
96 
97 class Tok_EOF : public Token
98 {
99 	// OPERATIONS
100 	virtual void		Trigger(
101 							TokenInterpreter &	io_rInterpreter ) const;
102 	// INQUIRY
103 	virtual const char *
104 						Text() const;
105 };
106 
107 
108 }   // namespace uidl
109 }   // namespace csi
110 
111 #endif
112 
113 
114