diff options
Diffstat (limited to 'autodoc/source/parser/inc/adoc')
-rw-r--r-- | autodoc/source/parser/inc/adoc/a_rdocu.hxx | 73 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/adoc_tok.hxx | 64 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/atokdeal.hxx | 62 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/cx_a_std.hxx | 107 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/cx_a_sub.hxx | 148 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/docu_pe.hxx | 195 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/prs_adoc.hxx | 57 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/tk_attag.hxx | 100 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/tk_docw.hxx | 119 | ||||
-rw-r--r-- | autodoc/source/parser/inc/adoc/tokintpr.hxx | 119 |
10 files changed, 1044 insertions, 0 deletions
diff --git a/autodoc/source/parser/inc/adoc/a_rdocu.hxx b/autodoc/source/parser/inc/adoc/a_rdocu.hxx new file mode 100644 index 000000000000..bf49609f29c4 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/a_rdocu.hxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_A_RDOCU_HXX +#define ADC_ADOC_A_RDOCU_HXX + + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS + +class DocuDealer; + + + +namespace adoc +{ + +class Token; +class Adoc_PE; + +class DocuExplorer + +{ + public: + DocuExplorer(); + ~DocuExplorer(); + void StartNewFile( + DocuDealer & o_rDocuDistributor ); + + void Process_Token( + DYN adoc::Token & let_drToken ); + private: + DocuDealer * pDocuDistributor; + Dyn<Adoc_PE> pPE; + bool bIsPassedFirstDocu; +}; + + +} // namespace adoc + + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/adoc_tok.hxx b/autodoc/source/parser/inc/adoc/adoc_tok.hxx new file mode 100644 index 000000000000..fa4a143eaf73 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/adoc_tok.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_ADOC_TOK_HXX +#define ADC_ADOC_ADOC_TOK_HXX + +// USED SERVICES + // BASE CLASSES +#include <tokens/token.hxx> + // COMPONENTS + // PARAMETERS + + +namespace adoc { + + +class TokenInterpreter; + + +class Token : public TextToken +{ + public: + // LIFECYCLE + virtual ~Token() {} + + // OPERATIONS + virtual void DealOut( + ::TokenDealer & o_rDealer ); + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const = 0; +}; + + +} // namespace adoc + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/atokdeal.hxx b/autodoc/source/parser/inc/adoc/atokdeal.hxx new file mode 100644 index 000000000000..db2765f54e56 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/atokdeal.hxx @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_ATOKDEAL_HXX +#define ADC_ADOC_ATOKDEAL_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <tokens/tokdeal.hxx> + // COMPONENTS + // PARAMETERS + + + +namespace adoc +{ + +class Token; + +class TokenDealer : virtual public ::TokenDealer +{ + public: + + virtual void Deal_AdcDocu( + adoc::Token & let_drToken ) = 0; +}; + + +} // namespace adoc + + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/cx_a_std.hxx b/autodoc/source/parser/inc/adoc/cx_a_std.hxx new file mode 100644 index 000000000000..c9a6c1443b12 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/cx_a_std.hxx @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_CX_A_STD_HXX +#define ADC_ADOC_CX_A_STD_HXX + +// USED SERVICES + // BASE CLASSES +#include <tokens/tkpcontx.hxx> + // COMPONENTS +#include <tokens/tkpstama.hxx> + // PARAMETERS + +class TextToken; + + +namespace adoc { + +class Cx_LineStart; +class Cx_CheckStar; +class Cx_AtTagCompletion; + + +/** +@descr +*/ +class Context_AdocStd : public autodoc::TkpDocuContext, + private StateMachineContext +{ + public: + // LIFECYCLE + Context_AdocStd(); + virtual void SetParentContext( + TkpContext & io_rParentContext, + const char * i_sMultiLineEndToken ); + ~Context_AdocStd(); + + // OPERATIONS + virtual void AssignDealer( + TokenDealer & o_rDealer ); + + virtual void ReadCharChain( + CharacterSource & io_rText ); + virtual bool PassNewToken(); + virtual void SetMode_IsMultiLine( + bool i_bTrue ); + // INQUIRY + virtual TkpContext & + FollowUpContext(); + private: + // SERVICE FUNCTIONS + virtual void PerformStatusFunction( + uintt i_nStatusSignal, + F_CRTOK i_fTokenCreateFunction, + CharacterSource & io_rText ); + + void SetupStateMachine(); + + // DATA + StateMachine aStateMachine; + TokenDealer * pDealer; + + // Contexts + TkpContext * pParentContext; + TkpContext * pFollowUpContext; + Dyn<Cx_LineStart> pCx_LineStart; + Dyn<Cx_CheckStar> pCx_CheckStar; + Dyn<Cx_AtTagCompletion> + pCx_AtTagCompletion; + + // Temporary data, used during ReadCharChain() + Dyn<TextToken> pNewToken; + bool bIsMultiline; +}; + + +} // namespace adoc + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/cx_a_sub.hxx b/autodoc/source/parser/inc/adoc/cx_a_sub.hxx new file mode 100644 index 000000000000..43fe2fca8449 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/cx_a_sub.hxx @@ -0,0 +1,148 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_CX_A_SUB_HXX +#define ADC_ADOC_CX_A_SUB_HXX + +// USED SERVICES + // BASE CLASSES +#include <tokens/tkpcontx.hxx> + // COMPONENTS +#include <tokens/tkpstama.hxx> + // PARAMETERS +#include <tokens/token.hxx> + + +namespace adoc { + + + + +class Cx_LineStart : public TkpContext +{ + public: + Cx_LineStart( + TkpContext & i_rFollowUpContext ); + + virtual void ReadCharChain( + CharacterSource & io_rText ); + virtual bool PassNewToken(); + virtual TkpContext & + FollowUpContext(); + + void SetCurToken( + TextToken::F_CRTOK i_fTokenCreateFunction ) + { fCur_TokenCreateFunction = i_fTokenCreateFunction; } + void AssignDealer( + TokenDealer & o_rDealer ) + { pDealer = &o_rDealer; } + private: + // DATA + TokenDealer * pDealer; + TkpContext * pFollowUpContext; + + Dyn<TextToken> pNewToken; + + TextToken::F_CRTOK fCur_TokenCreateFunction; +}; + + +/** +@descr +*/ + +class Cx_CheckStar : public TkpContext +{ + public: + // LIFECYCLE + Cx_CheckStar( + TkpContext & i_rFollowUpContext ); + void Set_End_FollowUpContext( + TkpContext & i_rEnd_FollowUpContext ) + { pEnd_FollowUpContext = &i_rEnd_FollowUpContext; } + + virtual void ReadCharChain( + CharacterSource & io_rText ); + virtual bool PassNewToken(); + + void SetCanBeEnd( + bool i_bCanBeEnd ) + { bCanBeEnd = i_bCanBeEnd; } + virtual TkpContext & + FollowUpContext(); + void AssignDealer( + TokenDealer & o_rDealer ) + { pDealer = &o_rDealer; } + private: + // DATA + TokenDealer * pDealer; + TkpContext * pFollowUpContext; + TkpContext * pEnd_FollowUpContext; + + Dyn<TextToken> pNewToken; + + bool bCanBeEnd; + bool bEndTokenFound; +}; + + +class Cx_AtTagCompletion : public TkpContext +{ + public: + Cx_AtTagCompletion( + TkpContext & i_rFollowUpContext ); + + virtual void ReadCharChain( + CharacterSource & io_rText ); + virtual bool PassNewToken(); + virtual TkpContext & + FollowUpContext(); + + void SetCurToken( + TextToken::F_CRTOK i_fTokenCreateFunction ) + { fCur_TokenCreateFunction = i_fTokenCreateFunction; } + void AssignDealer( + TokenDealer & o_rDealer ) + { pDealer = &o_rDealer; } + private: + // DATA + TokenDealer * pDealer; + TkpContext * pFollowUpContext; + + Dyn<TextToken> pNewToken; + + TextToken::F_CRTOK fCur_TokenCreateFunction; +}; + + +} // namespace adoc + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/docu_pe.hxx b/autodoc/source/parser/inc/adoc/docu_pe.hxx new file mode 100644 index 000000000000..ef49b2594c79 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/docu_pe.hxx @@ -0,0 +1,195 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_DOCU_PE_HXX +#define ADC_DOCU_PE_HXX + + + +// USED SERVICES + // BASE CLASSES +#include <adoc/tokintpr.hxx> + // COMPONENTS + // PARAMETERS + +namespace ary +{ +namespace doc +{ + class OldCppDocu; +} +namespace info +{ + class AtTag; +} +} + + + +namespace adoc +{ + + +class Adoc_PE : public TokenInterpreter +{ + public: + Adoc_PE(); + ~Adoc_PE(); + + virtual void Hdl_at_std( + const Tok_at_std & i_rTok ); + virtual void Hdl_at_base( + const Tok_at_base & i_rTok ); + virtual void Hdl_at_exception( + const Tok_at_exception & + i_rTok ); + virtual void Hdl_at_impl( + const Tok_at_impl & i_rTok ); + virtual void Hdl_at_key( + const Tok_at_key & i_rTok ); + virtual void Hdl_at_param( + const Tok_at_param & + i_rTok ); + virtual void Hdl_at_see( + const Tok_at_see & i_rTok ); + virtual void Hdl_at_template( + const Tok_at_template & + i_rTok ); + virtual void Hdl_at_interface( + const Tok_at_interface & + i_rTok ); + virtual void Hdl_at_internal( + const Tok_at_internal & + i_rTok ); + virtual void Hdl_at_obsolete( + const Tok_at_obsolete & + i_rTok ); + virtual void Hdl_at_module( + const Tok_at_module & + i_rTok ); + virtual void Hdl_at_file( + const Tok_at_file & i_rTok ); + virtual void Hdl_at_gloss( + const Tok_at_gloss & + i_rTok ); + virtual void Hdl_at_global( + const Tok_at_global & + i_rTok ); + virtual void Hdl_at_include( + const Tok_at_include & + i_rTok ); + virtual void Hdl_at_label( + const Tok_at_label & + i_rTok ); + virtual void Hdl_at_since( + const Tok_at_since & + i_rTok ); + virtual void Hdl_at_HTML( + const Tok_at_HTML & + i_rTok ); + virtual void Hdl_at_NOHTML( + const Tok_at_NOHTML & + i_rTok ); + + virtual void Hdl_DocWord( + const Tok_DocWord & i_rTok ); + + virtual void Hdl_Whitespace( + const Tok_Whitespace & + i_rTok ); + virtual void Hdl_LineStart( + const Tok_LineStart & + i_rTok ); + virtual void Hdl_Eol( + const Tok_Eol & i_rTok ); + + virtual void Hdl_EoDocu( + const Tok_EoDocu & i_rTok ); + + + DYN ary::doc::OldCppDocu * + ReleaseJustParsedDocu(); + + bool IsComplete() const; + + private: + void InstallAtTag( + DYN ary::info::AtTag * + let_dpTag, + bool i_bImplicit = false ); /// True for implicit @short and @descr. + ary::doc::OldCppDocu & + CurDocu(); + ary::info::AtTag & CurAtTag(); + bool UsesHtmlInDocuText(); + + void RenameCurShortTag(); + void FinishCurShortTag(); + + + // DATA + enum E_TagState + { + ts_new, + ts_std + }; + enum E_DocuState + { + ds_wait_for_short = 0, + ds_in_short, + ds_1newline_after_short, + ds_in_descr, + ds_std + }; + + Dyn<ary::doc::OldCppDocu> + pCurDocu; + ary::info::AtTag * pCurAtTag; + uintt nLineCountInDocu; + UINT8 nCurSpecialMeaningTokens; + UINT8 nCurSubtractFromLineStart; + E_TagState eCurTagState; + E_DocuState eDocuState; + bool bIsComplete; + bool bUsesHtmlInDocuText; +}; + + +// IMPLEMENTATION +inline bool +Adoc_PE::IsComplete() const +{ + return bIsComplete; +} + + + + +} // namespace adoc +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/prs_adoc.hxx b/autodoc/source/parser/inc/adoc/prs_adoc.hxx new file mode 100644 index 000000000000..5326552dd017 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/prs_adoc.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_PRS_ADOC_HXX +#define ADC_ADOC_PRS_ADOC_HXX + + + +#include <autodoc/prs_docu.hxx> + +namespace adoc +{ + + +class DocuParser_AutodocStyle : public autodoc::DocumentationParser_Ifc +{ + public: + DocuParser_AutodocStyle(); + virtual ~DocuParser_AutodocStyle(); + + virtual DYN autodoc::TkpDocuContext * + Create_DocuContext() const; +}; + + + +} // namespace adoc + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/tk_attag.hxx b/autodoc/source/parser/inc/adoc/tk_attag.hxx new file mode 100644 index 000000000000..11c21124e67d --- /dev/null +++ b/autodoc/source/parser/inc/adoc/tk_attag.hxx @@ -0,0 +1,100 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_TK_ATTAG_HXX +#define ADC_ADOC_TK_ATTAG_HXX + +// USED SERVICES + // BASE CLASSES +#include <adoc/adoc_tok.hxx> + // COMPONENTS + // PARAMETERS +#include <ary/info/inftypes.hxx> + +namespace adoc { + +typedef ary::info::E_AtTagId E_AtTagId; + + +class Tok_at_std : public Token +{ + public: + Tok_at_std( + E_AtTagId i_nId ) + : eId(i_nId) {} + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + virtual const char * + Text() const; + E_AtTagId Id() const { return eId; } + + private: + E_AtTagId eId; +}; + + +#define DECL_TOKEN_CLASS(name) \ +class Tok_##name : public Token \ +{ public: \ + virtual void Trigger( \ + TokenInterpreter & io_rInterpreter ) const; \ + virtual const char * \ + Text() const; \ +} + + +DECL_TOKEN_CLASS(at_base); +DECL_TOKEN_CLASS(at_exception); +DECL_TOKEN_CLASS(at_impl); +DECL_TOKEN_CLASS(at_key); +DECL_TOKEN_CLASS(at_param); +DECL_TOKEN_CLASS(at_see); +DECL_TOKEN_CLASS(at_template); +DECL_TOKEN_CLASS(at_interface); +DECL_TOKEN_CLASS(at_internal); +DECL_TOKEN_CLASS(at_obsolete); +DECL_TOKEN_CLASS(at_module); +DECL_TOKEN_CLASS(at_file); +DECL_TOKEN_CLASS(at_gloss); +DECL_TOKEN_CLASS(at_global); +DECL_TOKEN_CLASS(at_include); +DECL_TOKEN_CLASS(at_label); +DECL_TOKEN_CLASS(at_HTML); +DECL_TOKEN_CLASS(at_NOHTML); +DECL_TOKEN_CLASS(at_since); + + +#undef DECL_TOKEN_CLASS + + + +} // namespace adoc + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/tk_docw.hxx b/autodoc/source/parser/inc/adoc/tk_docw.hxx new file mode 100644 index 000000000000..fa53d8968826 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/tk_docw.hxx @@ -0,0 +1,119 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_TK_DOCW_HXX +#define ADC_ADOC_TK_DOCW_HXX + +// USED SERVICES + // BASE CLASSES +#include <adoc/adoc_tok.hxx> + // COMPONENTS + // PARAMETERS + +namespace adoc { + + +class Tok_DocWord : public Token +{ + public: + // Spring and Fall + Tok_DocWord( + const char * i_sText ) + : sText(i_sText) {} + // OPERATIONS + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + // INQUIRY + virtual const char* Text() const; + uintt Length() const { return sText.length(); } + + private: + // DATA + String sText; +}; + +class Tok_Whitespace : public Token +{ + public: + // Spring and Fall + Tok_Whitespace( + UINT8 i_nSize ) + : nSize(i_nSize) {} + // OPERATIONS + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + // INQUIRY + virtual const char* Text() const; + UINT8 Size() const { return nSize; } + + private: + // DATA + UINT8 nSize; +}; + +class Tok_LineStart : public Token +{ + public: + // Spring and Fall + Tok_LineStart( + UINT8 i_nSize ) + : nSize(i_nSize) {} + // OPERATIONS + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + // INQUIRY + virtual const char* Text() const; + UINT8 Size() const { return nSize; } + + private: + // DATA + UINT8 nSize; +}; + +class Tok_Eol : public Token +{ public: + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + virtual const char * + Text() const; +}; + +class Tok_EoDocu : public Token +{ public: + virtual void Trigger( + TokenInterpreter & io_rInterpreter ) const; + virtual const char * + Text() const; +}; + + +} // namespace adoc + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser/inc/adoc/tokintpr.hxx b/autodoc/source/parser/inc/adoc/tokintpr.hxx new file mode 100644 index 000000000000..f24b2ea80a97 --- /dev/null +++ b/autodoc/source/parser/inc/adoc/tokintpr.hxx @@ -0,0 +1,119 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef ADC_ADOC_TOKINTPR_HXX +#define ADC_ADOC_TOKINTPR_HXX + + + +// USED SERVICES + // BASE CLASSES + // COMPONENTS + // PARAMETERS + +namespace adoc { + + +class Tok_at_std; +class Tok_at_base; +class Tok_at_exception; +class Tok_at_impl; +class Tok_at_key; +class Tok_at_param; +class Tok_at_see; +class Tok_at_template; +class Tok_at_interface; +class Tok_at_internal; +class Tok_at_obsolete; +class Tok_at_module; +class Tok_at_file; +class Tok_at_gloss; +class Tok_at_global; +class Tok_at_include; +class Tok_at_label; +class Tok_at_since; +class Tok_at_HTML; // Sets default to: Use HTML in DocuText +class Tok_at_NOHTML; // Sets default to: Don't use HTML in DocuText + +class Tok_DocWord; +class Tok_LineStart; +class Tok_Whitespace; +class Tok_Eol; +class Tok_EoDocu; + + +#define DECL_TOK_HANDLER(token) \ + virtual void Hdl_##token( \ + const Tok_##token & i_rTok ) = 0 + + + +class TokenInterpreter +{ + public: + virtual ~TokenInterpreter() {} + + DECL_TOK_HANDLER(at_std); + DECL_TOK_HANDLER(at_base); + DECL_TOK_HANDLER(at_exception); + DECL_TOK_HANDLER(at_impl); + DECL_TOK_HANDLER(at_key); + DECL_TOK_HANDLER(at_param); + DECL_TOK_HANDLER(at_see); + DECL_TOK_HANDLER(at_template); + DECL_TOK_HANDLER(at_interface); + DECL_TOK_HANDLER(at_internal); + DECL_TOK_HANDLER(at_obsolete); + DECL_TOK_HANDLER(at_module); + DECL_TOK_HANDLER(at_file); + DECL_TOK_HANDLER(at_gloss); + DECL_TOK_HANDLER(at_global); + DECL_TOK_HANDLER(at_include); + DECL_TOK_HANDLER(at_label); + DECL_TOK_HANDLER(at_since); + DECL_TOK_HANDLER(at_HTML); + DECL_TOK_HANDLER(at_NOHTML); + DECL_TOK_HANDLER(DocWord); + DECL_TOK_HANDLER(Whitespace); + DECL_TOK_HANDLER(LineStart); + DECL_TOK_HANDLER(Eol); + DECL_TOK_HANDLER(EoDocu); +}; + +#undef DECL_TOK_HANDLER + + +// IMPLEMENTATION + + +} // namespace adoc + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |