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