1*1c78a5d6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1c78a5d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1c78a5d6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1c78a5d6SAndrew Rist * distributed with this work for additional information 6*1c78a5d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1c78a5d6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1c78a5d6SAndrew Rist * "License"); you may not use this file except in compliance 9*1c78a5d6SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1c78a5d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1c78a5d6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1c78a5d6SAndrew Rist * software distributed under the License is distributed on an 15*1c78a5d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1c78a5d6SAndrew Rist * KIND, either express or implied. See the License for the 17*1c78a5d6SAndrew Rist * specific language governing permissions and limitations 18*1c78a5d6SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1c78a5d6SAndrew Rist *************************************************************/ 21*1c78a5d6SAndrew Rist 22*1c78a5d6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef ADC_DOCU_PE_HXX 25cdf0e10cSrcweir #define ADC_DOCU_PE_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweir 29cdf0e10cSrcweir // USED SERVICES 30cdf0e10cSrcweir // BASE CLASSES 31cdf0e10cSrcweir #include <adoc/tokintpr.hxx> 32cdf0e10cSrcweir // COMPONENTS 33cdf0e10cSrcweir // PARAMETERS 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace ary 36cdf0e10cSrcweir { 37cdf0e10cSrcweir namespace doc 38cdf0e10cSrcweir { 39cdf0e10cSrcweir class OldCppDocu; 40cdf0e10cSrcweir } 41cdf0e10cSrcweir namespace info 42cdf0e10cSrcweir { 43cdf0e10cSrcweir class AtTag; 44cdf0e10cSrcweir } 45cdf0e10cSrcweir } 46cdf0e10cSrcweir 47cdf0e10cSrcweir 48cdf0e10cSrcweir 49cdf0e10cSrcweir namespace adoc 50cdf0e10cSrcweir { 51cdf0e10cSrcweir 52cdf0e10cSrcweir 53cdf0e10cSrcweir class Adoc_PE : public TokenInterpreter 54cdf0e10cSrcweir { 55cdf0e10cSrcweir public: 56cdf0e10cSrcweir Adoc_PE(); 57cdf0e10cSrcweir ~Adoc_PE(); 58cdf0e10cSrcweir 59cdf0e10cSrcweir virtual void Hdl_at_std( 60cdf0e10cSrcweir const Tok_at_std & i_rTok ); 61cdf0e10cSrcweir virtual void Hdl_at_base( 62cdf0e10cSrcweir const Tok_at_base & i_rTok ); 63cdf0e10cSrcweir virtual void Hdl_at_exception( 64cdf0e10cSrcweir const Tok_at_exception & 65cdf0e10cSrcweir i_rTok ); 66cdf0e10cSrcweir virtual void Hdl_at_impl( 67cdf0e10cSrcweir const Tok_at_impl & i_rTok ); 68cdf0e10cSrcweir virtual void Hdl_at_key( 69cdf0e10cSrcweir const Tok_at_key & i_rTok ); 70cdf0e10cSrcweir virtual void Hdl_at_param( 71cdf0e10cSrcweir const Tok_at_param & 72cdf0e10cSrcweir i_rTok ); 73cdf0e10cSrcweir virtual void Hdl_at_see( 74cdf0e10cSrcweir const Tok_at_see & i_rTok ); 75cdf0e10cSrcweir virtual void Hdl_at_template( 76cdf0e10cSrcweir const Tok_at_template & 77cdf0e10cSrcweir i_rTok ); 78cdf0e10cSrcweir virtual void Hdl_at_interface( 79cdf0e10cSrcweir const Tok_at_interface & 80cdf0e10cSrcweir i_rTok ); 81cdf0e10cSrcweir virtual void Hdl_at_internal( 82cdf0e10cSrcweir const Tok_at_internal & 83cdf0e10cSrcweir i_rTok ); 84cdf0e10cSrcweir virtual void Hdl_at_obsolete( 85cdf0e10cSrcweir const Tok_at_obsolete & 86cdf0e10cSrcweir i_rTok ); 87cdf0e10cSrcweir virtual void Hdl_at_module( 88cdf0e10cSrcweir const Tok_at_module & 89cdf0e10cSrcweir i_rTok ); 90cdf0e10cSrcweir virtual void Hdl_at_file( 91cdf0e10cSrcweir const Tok_at_file & i_rTok ); 92cdf0e10cSrcweir virtual void Hdl_at_gloss( 93cdf0e10cSrcweir const Tok_at_gloss & 94cdf0e10cSrcweir i_rTok ); 95cdf0e10cSrcweir virtual void Hdl_at_global( 96cdf0e10cSrcweir const Tok_at_global & 97cdf0e10cSrcweir i_rTok ); 98cdf0e10cSrcweir virtual void Hdl_at_include( 99cdf0e10cSrcweir const Tok_at_include & 100cdf0e10cSrcweir i_rTok ); 101cdf0e10cSrcweir virtual void Hdl_at_label( 102cdf0e10cSrcweir const Tok_at_label & 103cdf0e10cSrcweir i_rTok ); 104cdf0e10cSrcweir virtual void Hdl_at_since( 105cdf0e10cSrcweir const Tok_at_since & 106cdf0e10cSrcweir i_rTok ); 107cdf0e10cSrcweir virtual void Hdl_at_HTML( 108cdf0e10cSrcweir const Tok_at_HTML & 109cdf0e10cSrcweir i_rTok ); 110cdf0e10cSrcweir virtual void Hdl_at_NOHTML( 111cdf0e10cSrcweir const Tok_at_NOHTML & 112cdf0e10cSrcweir i_rTok ); 113cdf0e10cSrcweir 114cdf0e10cSrcweir virtual void Hdl_DocWord( 115cdf0e10cSrcweir const Tok_DocWord & i_rTok ); 116cdf0e10cSrcweir 117cdf0e10cSrcweir virtual void Hdl_Whitespace( 118cdf0e10cSrcweir const Tok_Whitespace & 119cdf0e10cSrcweir i_rTok ); 120cdf0e10cSrcweir virtual void Hdl_LineStart( 121cdf0e10cSrcweir const Tok_LineStart & 122cdf0e10cSrcweir i_rTok ); 123cdf0e10cSrcweir virtual void Hdl_Eol( 124cdf0e10cSrcweir const Tok_Eol & i_rTok ); 125cdf0e10cSrcweir 126cdf0e10cSrcweir virtual void Hdl_EoDocu( 127cdf0e10cSrcweir const Tok_EoDocu & i_rTok ); 128cdf0e10cSrcweir 129cdf0e10cSrcweir 130cdf0e10cSrcweir DYN ary::doc::OldCppDocu * 131cdf0e10cSrcweir ReleaseJustParsedDocu(); 132cdf0e10cSrcweir 133cdf0e10cSrcweir bool IsComplete() const; 134cdf0e10cSrcweir 135cdf0e10cSrcweir private: 136cdf0e10cSrcweir void InstallAtTag( 137cdf0e10cSrcweir DYN ary::info::AtTag * 138cdf0e10cSrcweir let_dpTag, 139cdf0e10cSrcweir bool i_bImplicit = false ); /// True for implicit @short and @descr. 140cdf0e10cSrcweir ary::doc::OldCppDocu & 141cdf0e10cSrcweir CurDocu(); 142cdf0e10cSrcweir ary::info::AtTag & CurAtTag(); 143cdf0e10cSrcweir bool UsesHtmlInDocuText(); 144cdf0e10cSrcweir 145cdf0e10cSrcweir void RenameCurShortTag(); 146cdf0e10cSrcweir void FinishCurShortTag(); 147cdf0e10cSrcweir 148cdf0e10cSrcweir 149cdf0e10cSrcweir // DATA 150cdf0e10cSrcweir enum E_TagState 151cdf0e10cSrcweir { 152cdf0e10cSrcweir ts_new, 153cdf0e10cSrcweir ts_std 154cdf0e10cSrcweir }; 155cdf0e10cSrcweir enum E_DocuState 156cdf0e10cSrcweir { 157cdf0e10cSrcweir ds_wait_for_short = 0, 158cdf0e10cSrcweir ds_in_short, 159cdf0e10cSrcweir ds_1newline_after_short, 160cdf0e10cSrcweir ds_in_descr, 161cdf0e10cSrcweir ds_std 162cdf0e10cSrcweir }; 163cdf0e10cSrcweir 164cdf0e10cSrcweir Dyn<ary::doc::OldCppDocu> 165cdf0e10cSrcweir pCurDocu; 166cdf0e10cSrcweir ary::info::AtTag * pCurAtTag; 167cdf0e10cSrcweir uintt nLineCountInDocu; 168cdf0e10cSrcweir UINT8 nCurSpecialMeaningTokens; 169cdf0e10cSrcweir UINT8 nCurSubtractFromLineStart; 170cdf0e10cSrcweir E_TagState eCurTagState; 171cdf0e10cSrcweir E_DocuState eDocuState; 172cdf0e10cSrcweir bool bIsComplete; 173cdf0e10cSrcweir bool bUsesHtmlInDocuText; 174cdf0e10cSrcweir }; 175cdf0e10cSrcweir 176cdf0e10cSrcweir 177cdf0e10cSrcweir // IMPLEMENTATION 178cdf0e10cSrcweir inline bool 179cdf0e10cSrcweir Adoc_PE::IsComplete() const 180cdf0e10cSrcweir { 181cdf0e10cSrcweir return bIsComplete; 182cdf0e10cSrcweir } 183cdf0e10cSrcweir 184cdf0e10cSrcweir 185cdf0e10cSrcweir 186cdf0e10cSrcweir 187cdf0e10cSrcweir } // namespace adoc 188cdf0e10cSrcweir #endif 189