1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ADC_UIDL_TK_PUNCT_HXX
25 #define ADC_UIDL_TK_PUNCT_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <s2_luidl/uidl_tok.hxx>
30 	// COMPONENTS
31 #include <luxenum.hxx>
32 	// PARAMETERS
33 
34 
35 namespace csi
36 {
37 namespace uidl
38 {
39 
40 
41 class TokPunctuation : public Token
42 {
43   public:
44 	// TYPES
45 	enum E_TokenId
46 	{
47 		e_none = 0,
48 		BracketOpen =  1, 			// (
49 		BracketClose = 2,           // )
50 		ArrayBracketOpen = 3,       // [
51 		ArrayBracketClose = 4,      // ]
52 		CurledBracketOpen = 5,      // {
53 		CurledBracketClose = 6,     // }
54 		Semicolon = 7, 	            // ;
55 		Colon = 8,                  // :
56 		DoubleColon = 9,            // ::
57 		Comma = 10,                 // ,
58 		Minus = 11,                 // -
59 		Fullstop = 12,              // .
60 		Lesser = 13,                // <
61 		Greater = 14                // >
62 	};
63 	typedef lux::Enum<E_TokenId> EV_TokenId;
64 
65 
TokPunctuation(EV_TokenId i_eTag)66 						TokPunctuation(
67 							EV_TokenId			i_eTag )
68 												:	eTag(i_eTag) {}
69 	// OPERATIONS
70 	virtual void		Trigger(
71 							TokenInterpreter &	io_rInterpreter ) const;
72 	// INQUIRY
73 	virtual const char *
74 						Text() const;
Id() const75 	EV_TokenId			Id() const				{ return eTag; }
76 
77 
78   private:
79 	// DATA
80 	EV_TokenId   		eTag;
81 };
82 
83 class Tok_EOL : public Token
84 {
85 	// OPERATIONS
86 	virtual void		Trigger(
87 							TokenInterpreter &	io_rInterpreter ) const;
88 	// INQUIRY
89 	virtual const char *
90 						Text() const;
91 };
92 
93 class Tok_EOF : public Token
94 {
95 	// OPERATIONS
96 	virtual void		Trigger(
97 							TokenInterpreter &	io_rInterpreter ) const;
98 	// INQUIRY
99 	virtual const char *
100 						Text() const;
101 };
102 
103 
104 }   // namespace uidl
105 }   // namespace csi
106 
107 #endif
108 
109 
110