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 #include <precomp.h> 23 #include <s2_luidl/tk_punct.hxx> 24 25 26 // NOT FULLY DECLARED SERVICES 27 #include <parser/parserinfo.hxx> 28 #include <s2_luidl/tokintpr.hxx> 29 30 31 using csi::uidl::TokPunctuation; 32 33 34 lux::EnumValueMap G_aTokPunctuation_EV_TokenId_Values; 35 TokPunctuation::EV_TokenId ev_none(TokPunctuation::e_none,""); 36 TokPunctuation::EV_TokenId BracketOpen(TokPunctuation::BracketOpen,"("); 37 TokPunctuation::EV_TokenId BracketClose(TokPunctuation::BracketClose,")"); 38 TokPunctuation::EV_TokenId ArrayBracketOpen(TokPunctuation::ArrayBracketOpen,"["); 39 TokPunctuation::EV_TokenId ArrayBracketClose(TokPunctuation::ArrayBracketClose,"]"); 40 TokPunctuation::EV_TokenId CurledBracketOpen(TokPunctuation::CurledBracketOpen,"{"); 41 TokPunctuation::EV_TokenId CurledBracketClose(TokPunctuation::CurledBracketClose,"}"); 42 TokPunctuation::EV_TokenId Semicolon(TokPunctuation::Semicolon,";"); 43 TokPunctuation::EV_TokenId Colon(TokPunctuation::Colon,":"); 44 TokPunctuation::EV_TokenId DoubleColon(TokPunctuation::DoubleColon,"::"); 45 TokPunctuation::EV_TokenId Comma(TokPunctuation::Comma,","); 46 TokPunctuation::EV_TokenId Minus(TokPunctuation::Minus,"-"); 47 TokPunctuation::EV_TokenId Fullstop(TokPunctuation::Fullstop,"."); 48 TokPunctuation::EV_TokenId Lesser(TokPunctuation::Lesser,"<"); 49 TokPunctuation::EV_TokenId Greater(TokPunctuation::Greater,">"); 50 51 52 53 54 namespace lux 55 { 56 template<> EnumValueMap & 57 TokPunctuation::EV_TokenId::Values_() { return G_aTokPunctuation_EV_TokenId_Values; } 58 } 59 60 61 62 63 namespace csi 64 { 65 namespace uidl 66 { 67 68 void 69 TokPunctuation::Trigger( TokenInterpreter & io_rInterpreter ) const 70 { 71 io_rInterpreter.Process_Punctuation(*this); 72 } 73 74 const char * 75 TokPunctuation::Text() const 76 { 77 return eTag.Text(); 78 } 79 80 void 81 Tok_EOL::Trigger( TokenInterpreter & io_rInterpreter ) const 82 { 83 io_rInterpreter.Process_EOL(); 84 } 85 86 const char * 87 Tok_EOL::Text() const 88 { 89 return "\r\n"; 90 } 91 92 void 93 Tok_EOF::Trigger( TokenInterpreter & ) const 94 { 95 csv_assert(false); 96 // io_rInterpreter.Process_EOF(); 97 } 98 99 const char * 100 Tok_EOF::Text() const 101 { 102 return ""; 103 } 104 105 106 } // namespace uidl 107 } // namespace csi 108