summaryrefslogtreecommitdiff
path: root/autodoc/source/parser/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/parser/cpp')
-rw-r--r--autodoc/source/parser/cpp/all_toks.cxx154
-rw-r--r--autodoc/source/parser/cpp/all_toks.hxx221
-rw-r--r--autodoc/source/parser/cpp/c_dealer.cxx149
-rw-r--r--autodoc/source/parser/cpp/c_dealer.hxx110
-rw-r--r--autodoc/source/parser/cpp/c_rcode.cxx161
-rw-r--r--autodoc/source/parser/cpp/c_rcode.hxx106
-rw-r--r--autodoc/source/parser/cpp/cpp_pe.cxx80
-rw-r--r--autodoc/source/parser/cpp/cpp_pe.hxx83
-rw-r--r--autodoc/source/parser/cpp/cpp_tok.hxx65
-rw-r--r--autodoc/source/parser/cpp/cx_base.cxx79
-rw-r--r--autodoc/source/parser/cpp/cx_base.hxx98
-rw-r--r--autodoc/source/parser/cpp/cx_c_pp.cxx180
-rw-r--r--autodoc/source/parser/cpp/cx_c_pp.hxx97
-rw-r--r--autodoc/source/parser/cpp/cx_c_std.cxx531
-rw-r--r--autodoc/source/parser/cpp/cx_c_std.hxx94
-rw-r--r--autodoc/source/parser/cpp/cx_c_sub.cxx160
-rw-r--r--autodoc/source/parser/cpp/cx_c_sub.hxx105
-rw-r--r--autodoc/source/parser/cpp/cxt2ary.cxx360
-rw-r--r--autodoc/source/parser/cpp/cxt2ary.hxx201
-rw-r--r--autodoc/source/parser/cpp/defdescr.cxx227
-rw-r--r--autodoc/source/parser/cpp/defdescr.hxx100
-rw-r--r--autodoc/source/parser/cpp/fevnthdl.hxx107
-rw-r--r--autodoc/source/parser/cpp/icprivow.cxx195
-rw-r--r--autodoc/source/parser/cpp/icprivow.hxx126
-rw-r--r--autodoc/source/parser/cpp/makefile.mk87
-rw-r--r--autodoc/source/parser/cpp/pe_base.cxx226
-rw-r--r--autodoc/source/parser/cpp/pe_base.hxx126
-rw-r--r--autodoc/source/parser/cpp/pe_class.cxx496
-rw-r--r--autodoc/source/parser/cpp/pe_class.hxx255
-rw-r--r--autodoc/source/parser/cpp/pe_defs.cxx182
-rw-r--r--autodoc/source/parser/cpp/pe_defs.hxx96
-rw-r--r--autodoc/source/parser/cpp/pe_enum.cxx191
-rw-r--r--autodoc/source/parser/cpp/pe_enum.hxx134
-rw-r--r--autodoc/source/parser/cpp/pe_enval.cxx170
-rw-r--r--autodoc/source/parser/cpp/pe_enval.hxx101
-rw-r--r--autodoc/source/parser/cpp/pe_expr.cxx179
-rw-r--r--autodoc/source/parser/cpp/pe_expr.hxx107
-rw-r--r--autodoc/source/parser/cpp/pe_file.cxx320
-rw-r--r--autodoc/source/parser/cpp/pe_file.hxx198
-rw-r--r--autodoc/source/parser/cpp/pe_funct.cxx612
-rw-r--r--autodoc/source/parser/cpp/pe_funct.hxx283
-rw-r--r--autodoc/source/parser/cpp/pe_ignor.cxx118
-rw-r--r--autodoc/source/parser/cpp/pe_ignor.hxx77
-rw-r--r--autodoc/source/parser/cpp/pe_namsp.cxx165
-rw-r--r--autodoc/source/parser/cpp/pe_namsp.hxx101
-rw-r--r--autodoc/source/parser/cpp/pe_param.cxx282
-rw-r--r--autodoc/source/parser/cpp/pe_param.hxx141
-rw-r--r--autodoc/source/parser/cpp/pe_tpltp.cxx178
-rw-r--r--autodoc/source/parser/cpp/pe_tpltp.hxx108
-rw-r--r--autodoc/source/parser/cpp/pe_tydef.cxx145
-rw-r--r--autodoc/source/parser/cpp/pe_tydef.hxx93
-rw-r--r--autodoc/source/parser/cpp/pe_type.cxx556
-rw-r--r--autodoc/source/parser/cpp/pe_type.hxx187
-rw-r--r--autodoc/source/parser/cpp/pe_vafu.cxx651
-rw-r--r--autodoc/source/parser/cpp/pe_vafu.hxx292
-rw-r--r--autodoc/source/parser/cpp/pe_vari.cxx189
-rw-r--r--autodoc/source/parser/cpp/pe_vari.hxx132
-rw-r--r--autodoc/source/parser/cpp/pev.hxx306
-rw-r--r--autodoc/source/parser/cpp/preproc.cxx233
-rw-r--r--autodoc/source/parser/cpp/preproc.hxx118
-rw-r--r--autodoc/source/parser/cpp/prs_cpp.cxx250
-rw-r--r--autodoc/source/parser/cpp/sdocdist.hxx161
-rw-r--r--autodoc/source/parser/cpp/sfscope.hxx72
-rw-r--r--autodoc/source/parser/cpp/sownstck.hxx327
-rw-r--r--autodoc/source/parser/cpp/srecover.hxx134
-rw-r--r--autodoc/source/parser/cpp/tkp_cpp.cxx94
-rw-r--r--autodoc/source/parser/cpp/tkp_cpp.hxx101
-rw-r--r--autodoc/source/parser/cpp/tokintpr.hxx120
68 files changed, 0 insertions, 12883 deletions
diff --git a/autodoc/source/parser/cpp/all_toks.cxx b/autodoc/source/parser/cpp/all_toks.cxx
deleted file mode 100644
index 3ea666ee94a9..000000000000
--- a/autodoc/source/parser/cpp/all_toks.cxx
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include <all_toks.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cpp/ctokdeal.hxx>
-#include "c_dealer.hxx"
-#include "tokintpr.hxx"
-
-
-
-namespace cpp {
-
-
-void
-Token::DealOut( ::TokenDealer & o_rDealer )
-{
- // KORR_FUTURE HACK (casting to derivation cpp::TokenDealer)
- o_rDealer.AsDistributor()->Deal_CppCode(*this);
-}
-
-
-#define DEF_TOKEN_CLASS(name) \
-void \
-Tok_##name::Trigger( TokenInterpreter & io_rInterpreter ) const \
-{ io_rInterpreter.Hdl_##name(*this); } \
-INT16 \
-Tok_##name::TypeId() const { return Tid_##name; } \
-const char * \
-Tok_##name::Text() const { return #name; }
-
-#define DEF_TOKEN_CLASS_WITHTEXT(name, text ) \
-void \
-Tok_##name::Trigger( TokenInterpreter & io_rInterpreter ) const \
-{ io_rInterpreter.Hdl_##name(*this); } \
-INT16 \
-Tok_##name::TypeId() const { return Tid_##name; } \
-const char * \
-Tok_##name::Text() const { return text; }
-
-
-DEF_TOKEN_CLASS_WITHTEXT(Identifier,sText)
-DEF_TOKEN_CLASS_WITHTEXT(Operator,sText)
-
-DEF_TOKEN_CLASS(operator)
-DEF_TOKEN_CLASS(class)
-DEF_TOKEN_CLASS(struct)
-DEF_TOKEN_CLASS(union)
-DEF_TOKEN_CLASS(enum)
-DEF_TOKEN_CLASS(typedef)
-DEF_TOKEN_CLASS(public)
-DEF_TOKEN_CLASS(protected)
-DEF_TOKEN_CLASS(private)
-DEF_TOKEN_CLASS(template)
-DEF_TOKEN_CLASS(virtual)
-DEF_TOKEN_CLASS(friend)
-DEF_TOKEN_CLASS_WITHTEXT(Tilde,"~")
-DEF_TOKEN_CLASS(const)
-DEF_TOKEN_CLASS(volatile)
-DEF_TOKEN_CLASS(extern)
-DEF_TOKEN_CLASS(static)
-DEF_TOKEN_CLASS(mutable)
-DEF_TOKEN_CLASS(register)
-DEF_TOKEN_CLASS(inline)
-DEF_TOKEN_CLASS(explicit)
-DEF_TOKEN_CLASS(namespace)
-DEF_TOKEN_CLASS(using)
-DEF_TOKEN_CLASS(throw)
-DEF_TOKEN_CLASS_WITHTEXT(SwBracket_Left,"{")
-DEF_TOKEN_CLASS_WITHTEXT(SwBracket_Right,"}")
-DEF_TOKEN_CLASS_WITHTEXT(ArrayBracket_Left,"[")
-DEF_TOKEN_CLASS_WITHTEXT(ArrayBracket_Right,"]")
-DEF_TOKEN_CLASS_WITHTEXT(Bracket_Left,"(")
-DEF_TOKEN_CLASS_WITHTEXT(Bracket_Right,")")
-DEF_TOKEN_CLASS_WITHTEXT(DoubleColon,"::")
-DEF_TOKEN_CLASS_WITHTEXT(Semicolon,";")
-DEF_TOKEN_CLASS_WITHTEXT(Comma,",")
-DEF_TOKEN_CLASS_WITHTEXT(Colon,":")
-DEF_TOKEN_CLASS_WITHTEXT(Assign,"=")
-DEF_TOKEN_CLASS_WITHTEXT(Less,"<")
-DEF_TOKEN_CLASS_WITHTEXT(Greater,">")
-DEF_TOKEN_CLASS_WITHTEXT(Asterix,"*")
-DEF_TOKEN_CLASS_WITHTEXT(AmpersAnd,"&")
-DEF_TOKEN_CLASS_WITHTEXT(Ellipse,"...")
-DEF_TOKEN_CLASS(typename)
-
-DEF_TOKEN_CLASS_WITHTEXT(DefineName,sText)
-DEF_TOKEN_CLASS_WITHTEXT(MacroName,sText)
-DEF_TOKEN_CLASS_WITHTEXT(MacroParameter,sText)
-// DEF_TOKEN_CLASS_WITHTEXT(PreProDefinition,sText)
-
-void
-Tok_PreProDefinition::Trigger( TokenInterpreter & io_rInterpreter ) const
-{ io_rInterpreter.Hdl_PreProDefinition(*this); }
-
-INT16
-Tok_PreProDefinition::TypeId() const { return Tid_PreProDefinition; }
-
-const char *
-Tok_PreProDefinition::Text() const
-{
- return sText;
-}
-
-
-
-DEF_TOKEN_CLASS_WITHTEXT(BuiltInType,sText)
-DEF_TOKEN_CLASS_WITHTEXT(TypeSpecializer,sText)
-DEF_TOKEN_CLASS_WITHTEXT(Constant,sText)
-
-const char *
-Tok_UnblockMacro::Text() const
-{
- return sMacroName;
-}
-
-void
-Tok_UnblockMacro::DealOut( ::TokenDealer & o_rDealer )
-{
- // KORR_FUTURE HACK (casting to derivation cpp::TokenDealer)
- o_rDealer.AsDistributor()->Deal_Cpp_UnblockMacro(*this);
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/all_toks.hxx b/autodoc/source/parser/cpp/all_toks.hxx
deleted file mode 100644
index 1531dd789586..000000000000
--- a/autodoc/source/parser/cpp/all_toks.hxx
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- 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_CPP_ALL_TOKS_HXX
-#define ADC_CPP_ALL_TOKS_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_tok.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp {
-
-class Tok_Identifier : public cpp::Token
-{
- public:
- Tok_Identifier(
- const char * i_sText ) : sText(i_sText) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual INT16 TypeId() const;
- virtual const char *
- Text() const;
- private:
- String sText;
-};
-const INT16 Tid_Identifier = 1;
-
-/** == != <= >= && || !
-
- new delete sizeof typeid
- + - / % ^ | << >>
- . -> ?
- += -= *= /= %= &= |= ^= <<= >>=
-*/
-class Tok_Operator : public cpp::Token
-{
- public:
- Tok_Operator(
- const char * i_sText ) : sText(i_sText) {}
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const;
- virtual INT16 TypeId() const;
- virtual const char *
- Text() const;
- private:
- String sText;
-};
-const INT16 Tid_Operator = 2;
-
-
-
-#define DECL_TOKEN_CLASS(name,tid) \
-class Tok_##name : public cpp::Token \
-{ public: \
- virtual void Trigger( \
- TokenInterpreter & io_rInterpreter ) const; \
- virtual INT16 TypeId() const; \
- virtual const char * \
- Text() const; \
-}; \
-const INT16 Tid_##name = tid
-
-DECL_TOKEN_CLASS(operator,3);
-DECL_TOKEN_CLASS(class,4);
-DECL_TOKEN_CLASS(struct,5);
-DECL_TOKEN_CLASS(union,6);
-DECL_TOKEN_CLASS(enum,7);
-DECL_TOKEN_CLASS(typedef,8);
-DECL_TOKEN_CLASS(public,9);
-DECL_TOKEN_CLASS(protected,10);
-DECL_TOKEN_CLASS(private,11);
-DECL_TOKEN_CLASS(template,12);
-DECL_TOKEN_CLASS(virtual,13);
-DECL_TOKEN_CLASS(friend,14);
-DECL_TOKEN_CLASS(Tilde,15);
-DECL_TOKEN_CLASS(const,16);
-DECL_TOKEN_CLASS(volatile,17);
-DECL_TOKEN_CLASS(extern,18);
-DECL_TOKEN_CLASS(static,19);
-DECL_TOKEN_CLASS(mutable,20);
-DECL_TOKEN_CLASS(register,21);
-DECL_TOKEN_CLASS(inline,22);
-DECL_TOKEN_CLASS(explicit,23);
-DECL_TOKEN_CLASS(namespace,24);
-DECL_TOKEN_CLASS(using,25);
-DECL_TOKEN_CLASS(throw,26);
-DECL_TOKEN_CLASS(SwBracket_Left,27);
-DECL_TOKEN_CLASS(SwBracket_Right,28);
-DECL_TOKEN_CLASS(ArrayBracket_Left,29);
-DECL_TOKEN_CLASS(ArrayBracket_Right,30);
-DECL_TOKEN_CLASS(Bracket_Left,31);
-DECL_TOKEN_CLASS(Bracket_Right,32);
-DECL_TOKEN_CLASS(DoubleColon,33);
-DECL_TOKEN_CLASS(Semicolon,34);
-DECL_TOKEN_CLASS(Comma,35);
-DECL_TOKEN_CLASS(Colon,36);
-DECL_TOKEN_CLASS(Assign,37);
-DECL_TOKEN_CLASS(Less,38);
-DECL_TOKEN_CLASS(Greater,39);
-DECL_TOKEN_CLASS(Asterix,40);
-DECL_TOKEN_CLASS(AmpersAnd,41);
-DECL_TOKEN_CLASS(Ellipse,42);
-DECL_TOKEN_CLASS(typename,43);
-
-#undef DECL_TOKEN_CLASS
-
-#define DECL_TOKEN_CLASS_WITHTEXT(name,tid) \
-class Tok_##name : public cpp::Token \
-{ public: \
- Tok_##name( \
- const char * i_sText ) : sText(i_sText) {} \
- virtual void Trigger( \
- TokenInterpreter & io_rInterpreter ) const; \
- virtual INT16 TypeId() const; \
- virtual const char * \
- Text() const; \
- private: \
- String sText; \
-}; \
-const INT16 Tid_##name = tid
-
-
-
-DECL_TOKEN_CLASS_WITHTEXT(DefineName,44);
-DECL_TOKEN_CLASS_WITHTEXT(MacroName,45);
-DECL_TOKEN_CLASS_WITHTEXT(MacroParameter,46);
-DECL_TOKEN_CLASS_WITHTEXT(PreProDefinition,47);
-
-/** char short int long float double wchar_t size_t
-*/
-DECL_TOKEN_CLASS_WITHTEXT(BuiltInType, 48);
-
-/** signed unsigned
-*/
-DECL_TOKEN_CLASS_WITHTEXT(TypeSpecializer, 49);
-DECL_TOKEN_CLASS_WITHTEXT(Constant, 50);
-
-
-
-/** This token does nothing in C++ code. It is added by the
- internal macro-replacer to mark the position, where a
- define or macro becomes valid again, which was until then
- invalid, because the text was a replacement of this macro.
- ( Avoiding endless recursive macro replacement. )
-*/
-class Tok_UnblockMacro : public ::TextToken
-{
- public:
- Tok_UnblockMacro(
- const char * i_sMacroName ) : sMacroName(i_sMacroName) {}
- virtual const char* Text() const;
-
- virtual void DealOut(
- ::TokenDealer & o_rDealer );
- private:
- String sMacroName;
-};
-
-
-
-/* just for viewing:
-class Tok_TypeKey : public cpp::Token // file-><type-PE>
-class Tok_Template : public cpp::Token // file
-class Tok_Namespace : public cpp::Token // file
-class Tok_Bracket : public cpp::Token // everywhere
-class Tok_Separator : public cpp::Token // everywhere
-
-class Tok_Identifier : public cpp::Token // ueberall
-class Tok_NameSeparator : public cpp::Token // Type, Name
-class Tok_BuiltInType : public cpp::Token // ueberall
-class Tok_ConVol : public cpp::Token // class-><FuVa>
-class Tok_StorageClass : public cpp::Token // file-><type>,<FuVa>
-class Tok_OperatorFunctionName : public cpp::Token // class
-
-class Tok_Protection : public cpp::Token // class
-class Tok_Virtual : public cpp::Token // class
-class Tok_Friend : public cpp::Token // class
-class Tok_Tilde : public cpp::Token // class, expression
-
-class Tok_Ellipse : public cpp::Token // function-ParaList
-class Tok_Assignment : public cpp::Token // VariableDeclaraton, Function, Parameter
-class Tok_Throw : public cpp::Token // function
-class Tok_LessMore : public cpp::Token
-class Tok_Operator : public cpp::Token // expression
-
-class Tok_Ignore : public cpp::Token
-class Tok_ContextChanger : public cpp::Token
-*/
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_dealer.cxx b/autodoc/source/parser/cpp/c_dealer.cxx
deleted file mode 100644
index a366e1883c69..000000000000
--- a/autodoc/source/parser/cpp/c_dealer.cxx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "c_dealer.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/loc/locp_le.hxx>
-#include <ary/loc/loc_root.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <adoc/a_rdocu.hxx>
-#include "all_toks.hxx"
-#include "c_rcode.hxx"
-
-
-namespace ary
-{
-namespace loc
-{
- class Root;
-}
-}
-
-
-
-
-namespace cpp
-{
-
-Distributor::Distributor( ary::cpp::Gate & io_rAryGate )
- : aCppPreProcessor(),
- aCodeExplorer(io_rAryGate),
- aDocuExplorer(),
- pGate(&io_rAryGate),
- pFileEventHandler(0),
- pDocuDistributor(0)
-{
- pFileEventHandler = & aCodeExplorer.FileEventHandler();
- pDocuDistributor = & aCodeExplorer.DocuDistributor();
-}
-
-void
-Distributor::AssignPartners( CharacterSource & io_rSourceText,
- const MacroMap & i_rValidMacros )
-{
- aCppPreProcessor.AssignPartners(aCodeExplorer, io_rSourceText, i_rValidMacros);
-}
-
-Distributor::~Distributor()
-{
-}
-
-void
-Distributor::StartNewFile( const csv::ploc::Path & i_file )
-{
- const csv::ploc::Root &
- root_dir = i_file.RootDir();
- StreamLock
- sl(700);
- root_dir.Get(sl());
- csv::ploc::Path
- root_path( sl().c_str(), true );
- ary::loc::Le_id
- root_id = pGate->Locations().CheckIn_Root(root_path).LeId();
- ary::loc::File &
- rFile = pGate->Locations().CheckIn_File(
- i_file.File(),
- i_file.DirChain(),
- root_id );
- pFileEventHandler->SetCurFile(rFile);
-
- aCodeExplorer.StartNewFile();
-
- csv_assert( pDocuDistributor != 0 );
- aDocuExplorer.StartNewFile(*pDocuDistributor);
-}
-
-
-void
-Distributor::Deal_Eol()
-{
- pFileEventHandler->Event_IncrLineCount();
-}
-
-void
-Distributor::Deal_Eof()
-{
- // Do nothing yet.
-}
-
-void
-Distributor::Deal_Cpp_UnblockMacro( Tok_UnblockMacro & let_drToken )
-{
- aCppPreProcessor.UnblockMacro(let_drToken.Text());
- delete &let_drToken;
-}
-
-void
-Distributor::Deal_CppCode( cpp::Token & let_drToken )
-{
- aCppPreProcessor.Process_Token(let_drToken);
-}
-
-void
-Distributor::Deal_AdcDocu( adoc::Token & let_drToken )
-{
- aDocuExplorer.Process_Token(let_drToken);
-}
-
-Distributor *
-Distributor::AsDistributor()
-{
- return this;
-}
-
-
-
-
-
-} // namespace cpp
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_dealer.hxx b/autodoc/source/parser/cpp/c_dealer.hxx
deleted file mode 100644
index 64e833de622f..000000000000
--- a/autodoc/source/parser/cpp/c_dealer.hxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- 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_CPP_C_DEALER_HXX
-#define ADC_CPP_C_DEALER_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cpp/ctokdeal.hxx>
-#include <adoc/atokdeal.hxx>
-#include <ary/info/docstore.hxx>
- // COMPONENTS
-#include "preproc.hxx"
-#include "c_rcode.hxx"
-#include <adoc/a_rdocu.hxx>
- // PARAMETERS
-
-namespace csv
-{
- namespace ploc
- {
- class Path;
- class DirectoryChain;
- }
-}
-
-
-class TokenParser;
-
-
-namespace cpp
-{
-
-class PE_File;
-class DefineDescription;
-
-
-class Distributor : public cpp::TokenDealer, /// Handle C++ code tokens.
- public adoc::TokenDealer /// Handle Autodoc documentation tokens.
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- Distributor(
- ary::cpp::Gate & io_rGate );
- ~Distributor();
- // OPERATIONS
- void AssignPartners(
- CharacterSource & io_rSourceText,
- const MacroMap & i_rValidMacros );
- void StartNewFile(
- const csv::ploc::Path &
- i_file );
- virtual void Deal_Eol();
- virtual void Deal_Eof();
-
- virtual void Deal_CppCode(
- cpp::Token & let_drToken );
- virtual void Deal_Cpp_UnblockMacro(
- Tok_UnblockMacro & let_drToken );
-
- virtual void Deal_AdcDocu(
- adoc::Token & let_drToken );
- virtual Distributor *
- AsDistributor();
- private:
- // DATA
- PreProcessor aCppPreProcessor;
- CodeExplorer aCodeExplorer;
- adoc::DocuExplorer aDocuExplorer;
- ary::cpp::Gate * pGate;
- FileScope_EventHandler *
- pFileEventHandler;
- DocuDealer * pDocuDistributor;
-};
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_rcode.cxx b/autodoc/source/parser/cpp/c_rcode.cxx
deleted file mode 100644
index cdec22bbdc58..000000000000
--- a/autodoc/source/parser/cpp/c_rcode.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "c_rcode.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/loc/locp_le.hxx>
-#include "cpp_pe.hxx"
-#include <adc_cl.hxx>
-#include <x_parse.hxx>
-#include "pe_file.hxx"
-
-const uintt C_nNO_TRY = uintt(-1);
-
-
-namespace cpp {
-
-
-CodeExplorer::CodeExplorer( ary::cpp::Gate & io_rAryGate )
- : aGlobalParseContext(io_rAryGate),
- // aEnvironments,
- pPE_File(0),
- pGate(&io_rAryGate),
- dpCurToken(0)
-{
- pPE_File = new PE_File( aGlobalParseContext );
-}
-
-CodeExplorer::~CodeExplorer()
-{
-}
-
-void
-CodeExplorer::StartNewFile()
-{
- csv::erase_container(aEnvironments);
-
- aEnvironments.push_back( pPE_File.MutablePtr() );
- pPE_File->Enter(push);
-}
-
-void
-CodeExplorer::Process_Token( DYN cpp::Token & let_drToken )
-{
-if (DEBUG_ShowTokens())
-{
- Cout() << let_drToken.Text() << Endl();
-}
- dpCurToken = &let_drToken;
- aGlobalParseContext.ResetResult();
-
- do {
- CurToken().Trigger( CurEnv() );
- AcknowledgeResult();
- } while ( dpCurToken );
-}
-
-void
-CodeExplorer::AcknowledgeResult()
-{
- if (CurResult().eDone == done)
- dpCurToken = 0;
-
- switch ( CurResult().eStackAction )
- {
- case stay:
- break;
- case push:
- CurEnv().Leave(push);
- aEnvironments.push_back( &PushEnv() );
- PushEnv().Enter(push);
- break;
- case pop_success:
- CurEnv().Leave(pop_success);
- aEnvironments.pop_back();
- CurEnv().Enter(pop_success);
- break;
- case pop_failure:
- {
- Cpp_PE * pRecover = 0;
- do {
- CurEnv().Leave(pop_failure);
- aEnvironments.pop_back();
- if ( aEnvironments.empty() )
- break;
- pRecover = CurEnv().Handle_ChildFailure();
- } while ( pRecover == 0 );
- if ( pRecover != 0 )
- {
- aEnvironments.push_back(pRecover);
- pRecover->Enter(push);
- }
- else
- {
- throw X_Parser( X_Parser::x_UnexpectedToken, CurToken().Text(), aGlobalParseContext.CurFileName(), aGlobalParseContext.LineCount() );
- }
- } break;
- default:
- csv_assert(false);
- } // end switch(CurResult().eStackAction)
-}
-
-const Token &
-CodeExplorer::CurToken() const
-{
- csv_assert(dpCurToken);
-
- return *dpCurToken;
-}
-
-Cpp_PE &
-CodeExplorer::CurEnv() const
-{
- csv_assert(!aEnvironments.empty());
- csv_assert(aEnvironments.back() != 0);
-
- return *aEnvironments.back();
-}
-
-Cpp_PE &
-CodeExplorer::PushEnv() const
-{
- TokenProcessing_Result & rCurResult = const_cast< TokenProcessing_Result& >(aGlobalParseContext.CurResult());
- Cpp_PE * ret = dynamic_cast< Cpp_PE* >(rCurResult.pEnv2Push);
- csv_assert( ret != 0 );
- return *ret;
-}
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/c_rcode.hxx b/autodoc/source/parser/cpp/c_rcode.hxx
deleted file mode 100644
index 740faaa9b9a9..000000000000
--- a/autodoc/source/parser/cpp/c_rcode.hxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- 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_CPP_C_RCODE_HXX
-#define ADC_CPP_C_RCODE_HXX
-
-// BASE CLASSES
-#include <tokens/tokproct.hxx>
-// USED SERVICES
-#include <cosv/ploc.hxx>
-#include "cxt2ary.hxx"
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/loc/loc_types4loc.hxx>
-
-
-
-namespace ary
-{
-namespace cpp
-{
- class Gate;
-}
-namespace doc
-{
- class OldCppDocu;
-}
-}
-
-namespace cpp
-{
- class PE_File;
- class Token;
- class Cpp_PE;
-
-
-
-
-class CodeExplorer : private TokenProcessing_Types
-
-{
- public:
- CodeExplorer(
- ary::cpp::Gate & io_rAryGate );
- ~CodeExplorer();
-
- void StartNewFile();
- void Process_Token(
- DYN cpp::Token & let_drToken );
- // ACCESS
- FileScope_EventHandler &
- FileEventHandler() { return aGlobalParseContext; }
- DocuDealer & DocuDistributor() { return aGlobalParseContext; }
-
- private:
- typedef std::vector< cpp::Cpp_PE* > EnvironmentStack;
-
- void AcknowledgeResult();
- const Token & CurToken() const;
- Cpp_PE & CurEnv() const;
- Cpp_PE & PushEnv() const;
- TokenProcessing_Result &
- CurResult() { return aGlobalParseContext.CurResult(); }
-
- // DATA
- ContextForAry aGlobalParseContext;
-
- EnvironmentStack aEnvironments;
- Dyn<PE_File> pPE_File;
-
- ary::cpp::Gate * pGate;
- cpp::Token * dpCurToken;
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_pe.cxx b/autodoc/source/parser/cpp/cpp_pe.cxx
deleted file mode 100644
index 1e224897186d..000000000000
--- a/autodoc/source/parser/cpp/cpp_pe.cxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cpp_pe.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/doc/d_oldcppdocu.hxx>
-#include "cpp_tok.hxx"
-
-
-
-
-namespace cpp {
-
-void
-Cpp_PE::SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
-{
- rMyEnv.SetTokenResult( i_eDone,
- i_eWhat2DoWithEnvStack,
- i_pParseEnv2Push );
-}
-
-Cpp_PE::Cpp_PE( Cpp_PE * io_pParent )
- : ParseEnvironment( io_pParent ),
- rMyEnv( io_pParent->Env() )
-{
- csv_assert(io_pParent != 0);
-}
-
-Cpp_PE::Cpp_PE( EnvData & i_rEnv )
- : ParseEnvironment(0),
- rMyEnv(i_rEnv)
-{
-}
-
-void
-Cpp_PE::StdHandlingOfSyntaxError( const char * )
-{
- SetTokenResult(not_done, pop_failure);
-}
-
-
-Cpp_PE *
-Cpp_PE::Handle_ChildFailure()
-{
- return 0;
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_pe.hxx b/autodoc/source/parser/cpp/cpp_pe.hxx
deleted file mode 100644
index cd3ba0af46f2..000000000000
--- a/autodoc/source/parser/cpp/cpp_pe.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- 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_CPP_CPP_PE_HXX
-#define ADC_CPP_CPP_PE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <semantic/parseenv.hxx>
-#include "tokintpr.hxx"
- // COMPONENTS
-#include "pev.hxx"
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-namespace cpp {
-
-class Cpp_PE : public ::ParseEnvironment,
- public TokenInterpreter
-{
- public:
- typedef cpp::PeEnvironment EnvData;
-
- void SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push = 0 );
-
- virtual Cpp_PE * Handle_ChildFailure(); // Defaulted to 0.
-
- protected:
- Cpp_PE(
- Cpp_PE * io_pParent );
- Cpp_PE(
- EnvData & i_rEnv );
-
- EnvData & Env() const;
-
- void StdHandlingOfSyntaxError(
- const char * i_sText );
-
- private:
- // DATA
- EnvData & rMyEnv;
-};
-
-inline Cpp_PE::EnvData &
-Cpp_PE::Env() const
- { return rMyEnv; }
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cpp_tok.hxx b/autodoc/source/parser/cpp/cpp_tok.hxx
deleted file mode 100644
index 7f4200a86dda..000000000000
--- a/autodoc/source/parser/cpp/cpp_tok.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- 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_CPP_TOK_HXX
-#define ADC_CPP_TOK_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/token.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class TokenInterpreter;
-
-
-class Token : public TextToken
-{
- public:
- // LIFECYCLE
- virtual ~Token() {}
-
- // OPERATIONS
- virtual INT16 TypeId() const = 0;
- virtual void DealOut(
- ::TokenDealer & o_rDealer );
- virtual void Trigger(
- TokenInterpreter & io_rInterpreter ) const = 0;
-};
-
-
-} // namespace cpp
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_base.cxx b/autodoc/source/parser/cpp/cx_base.cxx
deleted file mode 100644
index dad8a50b10e0..000000000000
--- a/autodoc/source/parser/cpp/cx_base.cxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cx_base.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include <tokens/token.hxx>
-#include "c_dealer.hxx"
-
-
-
-namespace cpp {
-
-
-
-Cx_Base::Cx_Base( TkpContext * io_pFollowUpContext )
- : pDealer(0),
- pFollowUpContext(io_pFollowUpContext)
- // pNewToken
-{
-}
-
-bool
-Cx_Base::PassNewToken()
-{
- if (pNewToken)
- {
- pNewToken.Release()->DealOut(Dealer());
- return true;
- }
- return false;
-}
-
-TkpContext &
-Cx_Base::FollowUpContext()
-{
- csv_assert(pFollowUpContext != 0);
- return *pFollowUpContext;
-}
-
-void
-Cx_Base::AssignDealer( Distributor & o_rDealer )
-{
- pDealer = &o_rDealer;
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_base.hxx b/autodoc/source/parser/cpp/cx_base.hxx
deleted file mode 100644
index 4e7ff2e3b34b..000000000000
--- a/autodoc/source/parser/cpp/cx_base.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- 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_CPP_CX_BASE_HXX
-#define ADC_CPP_CX_BASE_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-class TextToken;
-
-
-namespace cpp
-{
-
-class Distributor;
-
-
-class Cx_Base : public ::TkpContext
-{
- public:
- virtual bool PassNewToken();
- virtual TkpContext &
- FollowUpContext();
-
- virtual void AssignDealer(
- Distributor & o_rDealer );
- protected:
- // LIFECYCLE
- Cx_Base(
- TkpContext * io_pFollowUpContext );
-
- void SetNewToken(
- DYN ::TextToken * let_dpToken );
- void SetFollowUpContext(
- TkpContext * io_pContext );
-
- Distributor & Dealer() const;
-
- private:
- // DATA
- Distributor * pDealer;
- TkpContext * pFollowUpContext;
- Dyn< ::TextToken > pNewToken;
-};
-
-
-
-
-inline void
-Cx_Base::SetNewToken( DYN ::TextToken * let_dpToken )
- { pNewToken = let_dpToken; }
-inline void
-Cx_Base::SetFollowUpContext( TkpContext * io_pContext )
- { pFollowUpContext = io_pContext; }
-inline Distributor &
-Cx_Base::Dealer() const
- { csv_assert(pDealer != 0);
- return *pDealer; }
-
-
-
-
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_pp.cxx b/autodoc/source/parser/cpp/cx_c_pp.cxx
deleted file mode 100644
index afb389e8065c..000000000000
--- a/autodoc/source/parser/cpp/cx_c_pp.cxx
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cx_c_pp.hxx"
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include "c_dealer.hxx"
-#include <tokens/parseinc.hxx>
-#include <x_parse.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp
-{
-
-Context_Preprocessor::Context_Preprocessor( TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_Parent(&i_rFollowUpContext),
- pContext_PP_MacroParams( 0 ),
- pContext_PP_Definition( new Context_PP_Definition(i_rFollowUpContext) )
-{
- pContext_PP_MacroParams = new Context_PP_MacroParams(*pContext_PP_Definition);
-}
-
-void
-Context_Preprocessor::ReadCharChain( CharacterSource & io_rText )
-{
- jumpOverWhite( io_rText );
- jumpToWhite( io_rText );
- const char * sPP_Keyword = io_rText.CutToken();
- if ( strcmp(sPP_Keyword, "define") == 0 )
- ReadDefine(io_rText);
- else
- ReadDefault(io_rText);
-}
-
-void
-Context_Preprocessor::AssignDealer( Distributor & o_rDealer )
-{
- Cx_Base::AssignDealer(o_rDealer);
- pContext_PP_MacroParams->AssignDealer(o_rDealer);
- pContext_PP_Definition->AssignDealer(o_rDealer);
-}
-
-void
-Context_Preprocessor::ReadDefault( CharacterSource & io_rText )
-{
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
-
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- Dealer().Deal_Eol();
- SetNewToken(0);
- SetFollowUpContext( pContext_Parent );
-}
-
-void
-Context_Preprocessor::ReadDefine( CharacterSource & io_rText )
-{
- jumpOverWhite( io_rText );
- io_rText.CutToken();
-
- char cNext = '\0';
- for ( cNext = io_rText.CurChar();
- static_cast<UINT8>(cNext) > 32 AND cNext != '(';
- cNext = io_rText.MoveOn() )
- { }
-
- if ( NOT (cNext == '(') )
- {
- SetNewToken( new Tok_DefineName(io_rText.CutToken()) );
- SetFollowUpContext( pContext_PP_Definition.Ptr() );
- }
- else
- {
- SetNewToken( new Tok_MacroName(io_rText.CutToken()) );
- io_rText.MoveOn();
- io_rText.CutToken();
- SetFollowUpContext( pContext_PP_MacroParams.Ptr() );
- }
-}
-
-
-Context_PP_MacroParams::Context_PP_MacroParams( Cx_Base & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_PP_Definition(&i_rFollowUpContext)
-{
-}
-
-void
-Context_PP_MacroParams::ReadCharChain( CharacterSource & io_rText )
-{
- uintt nLen;
-
- jumpOverWhite( io_rText );
- // KORR_FUTURE Handling line breaks within macro parameters:
- char cSeparator = jumpTo( io_rText, ',', ')' );
- csv_assert( cSeparator != 0 );
-
- static char cBuf[500];
- // KORR_FUTURE, make it still safer, here:
- strcpy( cBuf, io_rText.CutToken() ); // SAFE STRCPY (#100211# - checked)
- for ( nLen = strlen(cBuf);
- nLen > 0 AND cBuf[nLen-1] < 33;
- --nLen )
- { }
- cBuf[nLen] = '\0';
- SetNewToken( new Tok_MacroParameter(cBuf) );
-
- io_rText.MoveOn();
- io_rText.CutToken();
- if ( cSeparator == ',')
- SetFollowUpContext( this );
- else // Must be ')'
- SetFollowUpContext( pContext_PP_Definition );
-}
-
-Context_PP_Definition::Context_PP_Definition( TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext),
- pContext_Parent(&i_rFollowUpContext)
-{
-}
-
-void
-Context_PP_Definition::ReadCharChain( CharacterSource & io_rText )
-{
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
- SetNewToken( new Tok_PreProDefinition(io_rText.CutToken()) );
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- Dealer().Deal_Eol();
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_pp.hxx b/autodoc/source/parser/cpp/cx_c_pp.hxx
deleted file mode 100644
index 0b0e86d2e690..000000000000
--- a/autodoc/source/parser/cpp/cx_c_pp.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- 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_CPP_CX_C_PP_HXX
-#define ADC_CPP_CX_C_PP_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp
-{
-
-class Context_Preprocessor : public Cx_Base
-{
- public:
- Context_Preprocessor(
- TkpContext & i_rFollowUpContext );
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual void AssignDealer(
- Distributor & o_rDealer );
- private:
- // Locals
- void ReadDefault(
- CharacterSource & io_rText );
- void ReadDefine(
- CharacterSource & io_rText );
-
- // DATA
- TkpContext * pContext_Parent;
- Dyn<Cx_Base> pContext_PP_MacroParams;
- Dyn<Cx_Base> pContext_PP_Definition;
-};
-
-class Context_PP_MacroParams : public Cx_Base
-{
- public:
- Context_PP_MacroParams(
- Cx_Base & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- private:
- // DATA
- Cx_Base * pContext_PP_Definition;
-};
-
-class Context_PP_Definition : public Cx_Base
-{
- public:
- Context_PP_Definition(
- TkpContext & i_rFollowUpContext );
-
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-
- private:
- // DATA
- TkpContext * pContext_Parent;
-};
-
-
-} // namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_std.cxx b/autodoc/source/parser/cpp/cx_c_std.cxx
deleted file mode 100644
index c3710d66332b..000000000000
--- a/autodoc/source/parser/cpp/cx_c_std.cxx
+++ /dev/null
@@ -1,531 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cx_c_std.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include "all_toks.hxx"
-#include "cx_c_pp.hxx"
-#include "cx_c_sub.hxx"
-#include <tools/tkpchars.hxx>
-#include <tokens/tkpstama.hxx>
-#include <x_parse.hxx>
-#include "c_dealer.hxx"
-
-
-namespace cpp {
-
-
-const intt C_nCppInitialNrOfStati = 600;
-const intt C_nStatusSize = 128;
-
-
-
-const uintt nF_fin_Error = 1;
-const uintt nF_fin_CreateWithoutText = 2;
-const uintt nF_fin_CreateWithText = 3;
-const uintt nF_fin_Ignore = 4;
-const uintt nF_fin_EOL = 5;
-const uintt nF_fin_EOF = 6;
-const uintt nF_fin_Bezeichner = 7;
-
-const uintt nF_goto_Preprocessor = 10;
-const uintt nF_goto_Comment = 11;
-const uintt nF_goto_Docu = 12;
-const uintt nF_goto_Const = 13;
-const uintt nF_goto_UnblockMacro = 14;
-
-// Token create functions for the state machine:
-DYN TextToken * TCF_Identifier(const char * text) { return new Tok_Identifier(text); }
-
-DYN TextToken * TCF_operator(const char *) { return new Tok_operator; }
-DYN TextToken * TCF_class(const char *) { return new Tok_class; }
-DYN TextToken * TCF_struct(const char *) { return new Tok_struct; }
-DYN TextToken * TCF_union(const char *) { return new Tok_union; }
-DYN TextToken * TCF_enum(const char *) { return new Tok_enum; }
-DYN TextToken * TCF_typedef(const char *) { return new Tok_typedef; }
-DYN TextToken * TCF_public(const char *) { return new Tok_public; }
-DYN TextToken * TCF_protected(const char *) { return new Tok_protected; }
-DYN TextToken * TCF_private(const char *) { return new Tok_private; }
-DYN TextToken * TCF_template(const char *) { return new Tok_template; }
-DYN TextToken * TCF_virtual(const char *) { return new Tok_virtual; }
-DYN TextToken * TCF_friend(const char *) { return new Tok_friend; }
-DYN TextToken * TCF_Tilde(const char *) { return new Tok_Tilde; }
-DYN TextToken * TCF_const(const char *) { return new Tok_const; }
-DYN TextToken * TCF_volatile(const char *) { return new Tok_volatile; }
-DYN TextToken * TCF_extern(const char *) { return new Tok_extern; }
-DYN TextToken * TCF_static(const char *) { return new Tok_static; }
-DYN TextToken * TCF_mutable(const char *) { return new Tok_mutable; }
-DYN TextToken * TCF_register(const char *) { return new Tok_register; }
-DYN TextToken * TCF_inline(const char *) { return new Tok_inline; }
-DYN TextToken * TCF_explicit(const char *) { return new Tok_explicit; }
-DYN TextToken * TCF_namespace(const char *) { return new Tok_namespace; }
-DYN TextToken * TCF_using(const char *) { return new Tok_using; }
-DYN TextToken * TCF_throw(const char *) { return new Tok_throw; }
-DYN TextToken * TCF_SwBracketOpen(const char *) { return new Tok_SwBracket_Left; }
-DYN TextToken * TCF_SwBracketClose(const char *) { return new Tok_SwBracket_Right; }
-DYN TextToken * TCF_ArBracketOpen(const char *) { return new Tok_ArrayBracket_Left; }
-DYN TextToken * TCF_ArBracketClose(const char *) { return new Tok_ArrayBracket_Right; }
-DYN TextToken * TCF_BracketOpen(const char *) { return new Tok_Bracket_Left; }
-DYN TextToken * TCF_BracketClose(const char *) { return new Tok_Bracket_Right; }
-DYN TextToken * TCF_DblColon(const char *) { return new Tok_DoubleColon; }
-DYN TextToken * TCF_Semikolon(const char *) { return new Tok_Semicolon; }
-DYN TextToken * TCF_Komma(const char *) { return new Tok_Comma; }
-DYN TextToken * TCF_Colon(const char *) { return new Tok_Colon; }
-DYN TextToken * TCF_Zuweisung(const char *) { return new Tok_Assign; }
-DYN TextToken * TCF_Smaller(const char *) { return new Tok_Less; }
-DYN TextToken * TCF_Bigger(const char *) { return new Tok_Greater; }
-DYN TextToken * TCF_Stern(const char *) { return new Tok_Asterix; }
-DYN TextToken * TCF_Ampersand(const char *) { return new Tok_AmpersAnd; }
-DYN TextToken * TCF_Ellipse(const char *) { return new Tok_Ellipse; }
-DYN TextToken * TCF_typename(const char *) { return new Tok_typename; }
-
- // Operators
-DYN TextToken * TCF_Operator(const char * text) { return new Tok_Operator(text); }
-
-DYN TextToken * TCF_BuiltInType(const char * text) { return new Tok_BuiltInType(text); }
-DYN TextToken * TCF_TypeModifier(const char * text) { return new Tok_TypeSpecializer(text); }
-
-DYN TextToken * TCF_Eof(const char *) { return new Tok_Eof; }
-
-
-
-Context_CppStd::Context_CppStd( DYN autodoc::TkpDocuContext & let_drContext_Docu )
- : Cx_Base(0),
- aStateMachine(C_nStatusSize,C_nCppInitialNrOfStati),
- pDocuContext(&let_drContext_Docu),
- pContext_Comment(0),
- pContext_Preprocessor(0),
- pContext_ConstString(0),
- pContext_ConstChar(0),
- pContext_ConstNumeric(0),
- pContext_UnblockMacro(0)
-{
- pDocuContext->SetParentContext(*this,"*/");
-
- pContext_Comment = new Context_Comment(*this);
- pContext_Preprocessor = new Context_Preprocessor(*this);
- pContext_ConstString = new Context_ConstString(*this);
- pContext_ConstChar = new Context_ConstChar(*this);
- pContext_ConstNumeric = new Context_ConstNumeric(*this);
- pContext_UnblockMacro = new Context_UnblockMacro(*this);
-
- SetupStateMachine();
-}
-
-Context_CppStd::~Context_CppStd()
-{
-}
-
-void
-Context_CppStd::ReadCharChain( CharacterSource & io_rText )
-{
- SetNewToken(0);
-
- TextToken::F_CRTOK fTokenCreateFunction = 0;
- StmBoundsStatus & rBound = aStateMachine.GetCharChain(fTokenCreateFunction, io_rText);
-
- // !!!
- // The order of the next two lines is essential, because
- // pFollowUpContext may be changed by PerformStatusFunction() also,
- // which then MUST override the previous assignment.
- SetFollowUpContext(rBound.FollowUpContext());
- PerformStatusFunction(rBound.StatusFunctionNr(), fTokenCreateFunction, io_rText);
-}
-
-void
-Context_CppStd::AssignDealer( Distributor & o_rDealer )
-{
- Cx_Base::AssignDealer(o_rDealer);
-
- pDocuContext->AssignDealer(o_rDealer);
- pContext_Comment->AssignDealer(o_rDealer);
- pContext_Preprocessor->AssignDealer(o_rDealer);
- pContext_ConstString->AssignDealer(o_rDealer);
- pContext_ConstChar->AssignDealer(o_rDealer);
- pContext_ConstNumeric->AssignDealer(o_rDealer);
- pContext_UnblockMacro->AssignDealer(o_rDealer);
-}
-
-void
-Context_CppStd::PerformStatusFunction( uintt i_nStatusSignal,
- F_CRTOK i_fTokenCreateFunction,
- CharacterSource & io_rText )
-{
- switch (i_nStatusSignal)
- {
- case nF_fin_CreateWithoutText:
- io_rText.CutToken();
- csv_assert(i_fTokenCreateFunction != 0);
- SetNewToken( (*i_fTokenCreateFunction)(0) );
- break;
- case nF_fin_CreateWithText:
- csv_assert(i_fTokenCreateFunction != 0);
- SetNewToken( (*i_fTokenCreateFunction)(io_rText.CutToken()) );
- break;
- case nF_fin_Ignore:
- io_rText.CutToken();
- SetNewToken(0);
- break;
- case nF_fin_EOL:
- io_rText.CutToken();
- SetNewToken(0);
- Dealer().Deal_Eol();
- break;
- case nF_fin_EOF:
- io_rText.CutToken();
- SetNewToken( TCF_Eof(0) );
- break;
- case nF_fin_Bezeichner:
- SetNewToken( TCF_Identifier(io_rText.CutToken()) );
- break;
-
- case nF_goto_Preprocessor:
- io_rText.CutToken();
- SetNewToken(0);
- break;
- case nF_goto_Comment:
- SetNewToken(0);
- pContext_Comment->SetMode_IsMultiLine( io_rText.CutToken()[1] == '*' );
- break;
- case nF_goto_Docu:
- SetNewToken(0);
- pDocuContext->SetMode_IsMultiLine( io_rText.CutToken()[1] == '*' );
- break;
- case nF_goto_Const:
- SetNewToken(0);
- break;
- case nF_goto_UnblockMacro:
- SetNewToken(0);
- break;
-
- case nF_fin_Error:
- default:
- {
- char cCC = io_rText.CurChar();
- String sCurChar( &cCC, 1 );
- throw X_Parser( X_Parser::x_InvalidChar, sCurChar, String::Null_(), 0 );
- }
- } // end switch (i_nStatusSignal)
-}
-
-void
-Context_CppStd::SetupStateMachine()
-{
- // special array statuses (no tokenfinish or change of context):
-// const INT16 top = 0; // top status
- const INT16 wht = 1; // skip whitespace status
- const INT16 bez = 2; // read identifier status
-
- // tokenfinish statuses:
- const INT16 finError = 3;
- const INT16 finIgnore = 4;
- const INT16 finBezeichner = 5;
- const INT16 finKeyword = 6;
- const INT16 finPunctuation = 7;
- const INT16 finBiType = 8;
- const INT16 finTypeModifier = 9;
- const INT16 finEOL = 10;
- const INT16 finEOF = 11;
-
- // change of context statuses:
- const INT16 gotoComment = 12;
- const INT16 gotoDocu = 13;
- const INT16 gotoPreprocessor = 14;
- const INT16 gotoConstString = 15;
- const INT16 gotoConstChar = 16;
- const INT16 gotoConstNumeric = 17;
- const INT16 gotoUnblockMacro = 18;
-
- // abbreviations to be used in status tables:
- const INT16 err = finError;
- const INT16 fig = finIgnore;
- const INT16 fbz = finBezeichner;
- const INT16 fof = finEOF;
- const INT16 cst = gotoConstString;
- const INT16 cch = gotoConstChar;
- const INT16 cnr = gotoConstNumeric;
-
-
- /// Zeros - '0' - will be replaced by AddToken().
-
- const INT16 A_nTopStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht, 0,cst, 0,err, 0, 0,cch, 0, 0, 0, 0, 0, 0, 0, 0,
- cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr,cnr, 0, 0, 0, 0, 0, 0, // 48 ...
- 0,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0, 0, 0, 0,bez, // 80 ...
- 0,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez, 0, 0, 0, 0,err, // 80 ...
- };
-
- const INT16 A_nWhitespaceStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fof,err,err,err,err,err,err,err,err,wht,fig,wht,wht,fig,err,err,
- err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // 16 ...
- wht,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 48 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig, // 80 ...
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,
- fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,fig,err
- };
-
- const INT16 A_nBezeichnerStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err
- };
-
-
- const INT16 A_nOperatorDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
- err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err
- };
-
- const INT16 A_nBezDefStatus[C_nStatusSize] =
- // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- {fbz,err,err,err,err,err,err,err,err,fbz,fbz,fbz,fbz,fbz,err,err,
- err,err,err,err,err,err,err,err,err,err,fbz,err,err,err,err,err, // 16 ...
- fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,fbz,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,fbz,fbz, // 48 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,bez, // 80 ...
- fbz,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,
- bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,bez,fbz,fbz,fbz,fbz,err
- };
-
- DYN StmArrayStatus * dpStatusTop
- = new StmArrayStatus( C_nStatusSize, A_nTopStatus, 0, true);
- DYN StmArrayStatus * dpStatusWhite
- = new StmArrayStatus( C_nStatusSize, A_nWhitespaceStatus, 0, true);
- DYN StmArrayStatus * dpStatusBez
- = new StmArrayStatus( C_nStatusSize, A_nBezeichnerStatus, TCF_Identifier, true);
-
- DYN StmBoundsStatus * dpBst_finError
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Error, true );
- DYN StmBoundsStatus * dpBst_finIgnore
- = new StmBoundsStatus( *this, *this, nF_fin_Ignore, true );
- DYN StmBoundsStatus * dpBst_finBezeichner
- = new StmBoundsStatus( *this, *this, nF_fin_Bezeichner, true );
- DYN StmBoundsStatus * dpBst_finKeyword
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithoutText, false );
- DYN StmBoundsStatus * dpBst_finPunctuation
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finBiType
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finTypeModifier
- = new StmBoundsStatus( *this, *this, nF_fin_CreateWithText, false );
- DYN StmBoundsStatus * dpBst_finEOL
- = new StmBoundsStatus( *this, *this, nF_fin_EOL, false );
- DYN StmBoundsStatus * dpBst_finEOF
- = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_EOF, false );
-
- DYN StmBoundsStatus * dpBst_gotoComment
- = new StmBoundsStatus( *this, *pContext_Comment, nF_goto_Comment, false );
- DYN StmBoundsStatus * dpBst_gotoDocu
- = new StmBoundsStatus( *this, *pDocuContext, nF_goto_Docu, false );
- DYN StmBoundsStatus * dpBst_gotoPreprocessor
- = new StmBoundsStatus( *this, *pContext_Preprocessor, nF_goto_Preprocessor, false );
- DYN StmBoundsStatus * dpBst_gotoConstString
- = new StmBoundsStatus( *this, *pContext_ConstString, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoConstChar
- = new StmBoundsStatus( *this, *pContext_ConstChar, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoConstNumeric
- = new StmBoundsStatus( *this, *pContext_ConstNumeric, nF_goto_Const, false );
- DYN StmBoundsStatus * dpBst_gotoUnblockMacro
- = new StmBoundsStatus( *this, *pContext_UnblockMacro, nF_goto_UnblockMacro, false );
-
- // construct dpMain:
- aStateMachine.AddStatus(dpStatusTop);
-
- aStateMachine.AddStatus(dpStatusWhite);
- aStateMachine.AddStatus(dpStatusBez);
-
- aStateMachine.AddStatus(dpBst_finError);
- aStateMachine.AddStatus(dpBst_finIgnore);
- aStateMachine.AddStatus(dpBst_finBezeichner);
- aStateMachine.AddStatus(dpBst_finKeyword);
- aStateMachine.AddStatus(dpBst_finPunctuation);
- aStateMachine.AddStatus(dpBst_finBiType);
- aStateMachine.AddStatus(dpBst_finTypeModifier);
- aStateMachine.AddStatus(dpBst_finEOL);
- aStateMachine.AddStatus(dpBst_finEOF);
-
- aStateMachine.AddStatus(dpBst_gotoComment);
- aStateMachine.AddStatus(dpBst_gotoDocu);
- aStateMachine.AddStatus(dpBst_gotoPreprocessor);
- aStateMachine.AddStatus(dpBst_gotoConstString);
- aStateMachine.AddStatus(dpBst_gotoConstChar);
- aStateMachine.AddStatus(dpBst_gotoConstNumeric);
- aStateMachine.AddStatus(dpBst_gotoUnblockMacro);
-
- // Identifier
-
- // Keywords and other unique Tokens
- aStateMachine.AddToken("operator",TCF_operator,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("class",TCF_class,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("struct",TCF_struct,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("union",TCF_union,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("enum",TCF_enum,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("typedef",TCF_typedef,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("public",TCF_public,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("protected",TCF_protected,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("private",TCF_private,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("template",TCF_template,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("virtual",TCF_virtual,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("friend",TCF_friend,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("~",TCF_Tilde,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("const",TCF_const,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("volatile",TCF_volatile,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("extern",TCF_extern,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("static",TCF_static,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("mutable",TCF_mutable,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("register",TCF_register,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("inline",TCF_inline,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("explicit",TCF_explicit,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("namespace",TCF_namespace,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("using",TCF_using,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("throw",TCF_throw,A_nBezDefStatus,finKeyword);
- aStateMachine.AddToken("{",TCF_SwBracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("}",TCF_SwBracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("[",TCF_ArBracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("]",TCF_ArBracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("(",TCF_BracketOpen,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(")",TCF_BracketClose,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("::",TCF_DblColon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(";",TCF_Semikolon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(",",TCF_Komma,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(":",TCF_Colon,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("=",TCF_Zuweisung,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("<",TCF_Smaller,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken(">",TCF_Bigger,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("*",TCF_Stern,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("&",TCF_Ampersand,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("...",TCF_Ellipse,A_nOperatorDefStatus,finKeyword);
- aStateMachine.AddToken("typename",TCF_typename,A_nOperatorDefStatus,finKeyword);
-
- // Operators
- aStateMachine.AddToken("==",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("!=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("&&",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("||",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("!",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("new",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("delete",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("sizeof",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("typeid",TCF_Operator,A_nBezDefStatus,finPunctuation);
- aStateMachine.AddToken("+",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("-",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("/",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("%",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("^",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("|",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<<",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">>",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(".",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("->",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("?",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("+=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("-=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("*=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("/=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("%=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("&=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("|=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("^=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken("<<=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
- aStateMachine.AddToken(">>=",TCF_Operator,A_nOperatorDefStatus,finPunctuation);
-
- // Builtin types
- aStateMachine.AddToken("char", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("short", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("int", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("long", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("float", TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("double",TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("wchar_t",TCF_BuiltInType, A_nBezDefStatus, finBiType);
- aStateMachine.AddToken("size_t",TCF_BuiltInType, A_nBezDefStatus, finBiType);
-
- // Type modifiers
- aStateMachine.AddToken("signed", TCF_TypeModifier, A_nBezDefStatus, finTypeModifier);
- aStateMachine.AddToken("unsigned", TCF_TypeModifier, A_nBezDefStatus, finTypeModifier);
-
- // To ignore
- aStateMachine.AddToken("auto", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("_cdecl", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__cdecl", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__stdcall", 0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("__fastcall",0, A_nBezDefStatus, finIgnore);
- aStateMachine.AddToken("/**/", 0, A_nOperatorDefStatus,finIgnore);
-
- // Context changers
- aStateMachine.AddToken("#", 0, A_nOperatorDefStatus, gotoPreprocessor);
- aStateMachine.AddToken("#undef",0, A_nOperatorDefStatus, gotoPreprocessor);
- aStateMachine.AddToken("#unblock-",
- 0, A_nOperatorDefStatus, gotoUnblockMacro);
- aStateMachine.AddToken("/*", 0, A_nOperatorDefStatus, gotoComment);
- aStateMachine.AddToken("//", 0, A_nOperatorDefStatus, gotoComment);
- aStateMachine.AddToken("/**", 0, A_nOperatorDefStatus, gotoDocu);
- aStateMachine.AddToken("///", 0, A_nOperatorDefStatus, gotoDocu);
-
- // Line ends
- // regular
- aStateMachine.AddToken("\r\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\r", 0, A_nOperatorDefStatus, finEOL);
- // To ignore in some cases(may be only at preprocessor?), but
- // linecount has to be incremented.
- aStateMachine.AddToken("\\\r\n",0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\\\n", 0, A_nOperatorDefStatus, finEOL);
- aStateMachine.AddToken("\\\r", 0, A_nOperatorDefStatus, finEOL);
-};
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_std.hxx b/autodoc/source/parser/cpp/cx_c_std.hxx
deleted file mode 100644
index fac94a548877..000000000000
--- a/autodoc/source/parser/cpp/cx_c_std.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- 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_CPP_CX_C_STD_HXX
-#define ADC_CPP_CX_C_STD_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
-#include <tokens/tkpstama.hxx>
- // PARAMETERS
-
-
-
-namespace cpp {
-
-class Context_Comment;
-
-/**
-*/
-class Context_CppStd : public Cx_Base,
- private StateMachineContext
-{
- public:
- // LIFECYCLE
- Context_CppStd(
- DYN autodoc::TkpDocuContext &
- let_drContext_Docu );
- ~Context_CppStd();
- // OPERATIONS
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- virtual void AssignDealer(
- Distributor & o_rDealer );
- private:
- // SERVICE FUNCTIONS
- void PerformStatusFunction(
- uintt i_nStatusSignal,
- StmArrayStatus::F_CRTOK
- i_fTokenCreateFunction,
- CharacterSource & io_rText );
- void SetupStateMachine();
-
- // DATA
- StateMachine aStateMachine;
-
- // Contexts
- Dyn<autodoc::TkpDocuContext>
- pDocuContext;
-
- Dyn<Context_Comment>
- pContext_Comment;
- Dyn<Cx_Base> pContext_Preprocessor;
- Dyn<Cx_Base> pContext_ConstString;
- Dyn<Cx_Base> pContext_ConstChar;
- Dyn<Cx_Base> pContext_ConstNumeric;
- Dyn<Cx_Base> pContext_UnblockMacro;
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_sub.cxx b/autodoc/source/parser/cpp/cx_c_sub.cxx
deleted file mode 100644
index fbdd50529cd5..000000000000
--- a/autodoc/source/parser/cpp/cx_c_sub.cxx
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cx_c_sub.hxx"
-
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ctype.h>
-#include "c_dealer.hxx"
-#include <tokens/parseinc.hxx>
-#include <x_parse.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp {
-
-
-
-void
-Context_Comment::ReadCharChain( CharacterSource & io_rText )
-{
- // KORR_FUTURE
- // Counting of lines must be implemented.
- if (bCurrentModeIsMultiline)
- {
- char cNext = NULCH;
-
- do {
- do {
- cNext = jumpTo( io_rText,'*',char(10) );
- if (cNext == NULCH)
- throw X_Parser( X_Parser::x_UnexpectedEOF, "", String::Null_(), 0 );
- else if ( cNext == char(10) )
- {
- jumpOverEol(io_rText);
- Dealer().Deal_Eol();
- }
- } while ( cNext != '*');
- cNext = jumpOver(io_rText,'*');
- if (cNext == NULCH)
- throw X_Parser( X_Parser::x_UnexpectedEOF, "", String::Null_(), 0 );
- } while (cNext != '/');
- io_rText.MoveOn();
- io_rText.CutToken();
- SetNewToken(0);
- }
- else //
- {
- int o_rCount_BackslashedLineBreaks = 0;
- jumpToEol(io_rText,o_rCount_BackslashedLineBreaks);
- for ( ; o_rCount_BackslashedLineBreaks > 0; --o_rCount_BackslashedLineBreaks )
- Dealer().Deal_Eol();
-
- if (io_rText.CurChar() != NULCH)
- jumpOverEol(io_rText);
- io_rText.CutToken();
- Dealer().Deal_Eol();
- SetNewToken(0);
- } // endif
-}
-
-
-void
-Context_ConstString::ReadCharChain( CharacterSource & io_rText )
-{
- char cNext = io_rText.MoveOn();
-
- while (cNext != '"')
- { // Get one complete string constant: "...."
- while (cNext != '"' AND cNext != '\\')
- { // Get string till next '\\'
- cNext = io_rText.MoveOn();
- }
- if (cNext == '\\')
- {
- io_rText.MoveOn();
- cNext = io_rText.MoveOn();
- }
- }
- io_rText.MoveOn();
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_ConstChar::ReadCharChain( CharacterSource & io_rText )
-{
- char cNext = io_rText.MoveOn();
-
- while (cNext != '\'')
- { // Get one complete char constant: "...."
- while (cNext != '\'' AND cNext != '\\')
- { // Get string till next '\\'
- cNext = io_rText.MoveOn();
- }
- if (cNext == '\\')
- {
- io_rText.MoveOn();
- cNext = io_rText.MoveOn();
- }
- }
- io_rText.MoveOn();
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_ConstNumeric::ReadCharChain(CharacterSource & io_rText)
-{
- char cNext = 0;
-
- do {
- do {
- cNext = static_cast<char>( tolower(io_rText.MoveOn()) );
- } while ( (cNext != 'e' AND isalnum(cNext)) OR cNext == '.');
- if (cNext == 'e')
- {
- cNext = io_rText.MoveOn();
- if (cNext == '+' OR cNext == '-')
- cNext = io_rText.MoveOn();
- } // endif
- } while (isalnum(cNext) OR cNext == '.'); // suffices, if the numbers are spelled correctly
- SetNewToken(new Tok_Constant(io_rText.CutToken()));
-}
-
-void
-Context_UnblockMacro::ReadCharChain(CharacterSource & io_rText)
-{
- jumpToWhite(io_rText);
- SetNewToken(new Tok_UnblockMacro( io_rText.CutToken() + strlen("#unblock-") ));
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cx_c_sub.hxx b/autodoc/source/parser/cpp/cx_c_sub.hxx
deleted file mode 100644
index 6e2d3d8807ed..000000000000
--- a/autodoc/source/parser/cpp/cx_c_sub.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- 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_CPP_CX_C_SUB_HXX
-#define ADC_CPP_CX_C_SUB_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkpcontx.hxx>
-#include "cx_base.hxx"
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class Context_Comment : public Cx_Base
-{
- public:
- Context_Comment(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
- void SetMode_IsMultiLine(
- bool i_bTrue )
- { bCurrentModeIsMultiline = i_bTrue; }
- private:
- bool bCurrentModeIsMultiline;
-};
-
-class Context_ConstString : public Cx_Base
-{
- public:
- Context_ConstString(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_ConstChar : public Cx_Base
-{
- public:
- Context_ConstChar(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_ConstNumeric : public Cx_Base
-{
- public:
- Context_ConstNumeric(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-class Context_UnblockMacro : public Cx_Base
-{
- public:
- Context_UnblockMacro(
- TkpContext & i_rFollowUpContext )
- : Cx_Base(&i_rFollowUpContext) {}
- virtual void ReadCharChain(
- CharacterSource & io_rText );
-};
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cxt2ary.cxx b/autodoc/source/parser/cpp/cxt2ary.cxx
deleted file mode 100644
index eda70ca1045e..000000000000
--- a/autodoc/source/parser/cpp/cxt2ary.cxx
+++ /dev/null
@@ -1,360 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "cxt2ary.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/entity.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/c_enuval.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/c_tydef.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/loc/loc_file.hxx>
-#include <ary/doc/d_oldcppdocu.hxx>
-#include <ary/info/docstore.hxx>
-#include "icprivow.hxx"
-
-// Implementationheaders, only to be used in this file!
-#include "sfscope.hxx"
-#include "sownstck.hxx"
-#include "sdocdist.hxx"
-#include "srecover.hxx"
-
-
-
-
-
-namespace cpp
-{
-
-using ary::cpp::E_Protection;
-
-ContextForAry::ContextForAry( ary::cpp::Gate & io_rAryGate )
- : pGate(&io_rAryGate),
- aTokenResult(),
- pFileScopeInfo( new S_FileScopeInfo ),
- pOwnerStack( new S_OwnerStack ),
- pDocuDistributor( new S_DocuDistributor ),
- pRecoveryGuard( new S_RecoveryGuard )
-{
- OpenNamespace( pGate->Ces().GlobalNamespace() );
-}
-
-ContextForAry::~ContextForAry()
-{
-}
-
-ary::loc::File &
-ContextForAry::inq_CurFile() const
-{
- csv_assert(pFileScopeInfo->pCurFile != 0);
-
- return *pFileScopeInfo->pCurFile;
-}
-
-ary::cpp::Namespace &
-ContextForAry::inq_CurNamespace() const
-{
- return pOwnerStack->CurNamespace();
-}
-
-ary::cpp::Class *
-ContextForAry::inq_CurClass() const
-{
- return pOwnerStack->CurClass();
-}
-
-ary::cpp::Enum *
-ContextForAry::inq_CurEnum() const
-{
- return pOwnerStack->CurEnum();
-}
-
-
-ary::cpp::InputContext::Owner &
-ContextForAry::inq_CurOwner() const
-{
- return pOwnerStack->CurOwner();
-}
-
-E_Protection
-ContextForAry::inq_CurProtection() const
-{
- return pOwnerStack->CurProtection();
-}
-
-void
-ContextForAry::do_SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
-{
- aTokenResult.eDone = i_eDone;
- aTokenResult.eStackAction = i_eWhat2DoWithEnvStack;
- aTokenResult.pEnv2Push = i_pParseEnv2Push;
-}
-
-void
-ContextForAry::do_OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
-{
- pOwnerStack->OpenNamespace( io_rOpenedNamespace );
-}
-
-void
-ContextForAry::do_OpenExternC( bool )
-{
- pOwnerStack->OpenExternC();
- // KORR_FUTURE
- // use i_bOnlyForOneDeclaration
-}
-
-void
-ContextForAry::do_OpenClass( ary::cpp::Class & io_rOpenedClass )
-{
- pOwnerStack->OpenClass(io_rOpenedClass);
- pDocuDistributor->SetCurrentlyStoredRe(io_rOpenedClass);
-}
-
-void
-ContextForAry::do_OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
-{
- pOwnerStack->OpenEnum(io_rOpenedEnum);
- pDocuDistributor->SetCurrentlyStoredRe(io_rOpenedEnum);
-}
-
-void
-ContextForAry::do_CloseBlock()
-{
- pOwnerStack->CloseBlock();
-}
-
-void
-ContextForAry::do_CloseClass()
-{
- pOwnerStack->CloseClass();
-}
-
-void
-ContextForAry::do_CloseEnum()
-{
- pOwnerStack->CloseEnum();
-}
-
-void
-ContextForAry::do_SetCurProtection( ary::cpp::E_Protection i_eProtection )
-{
- pOwnerStack->SetCurProtection(i_eProtection);
-}
-
-void
-ContextForAry::do_OpenTemplate( const StringVector & i_rParameters )
-{
- pFileScopeInfo->pCurTemplateParameters = new StringVector(i_rParameters);
-}
-
-DYN StringVector *
-ContextForAry::do_Get_CurTemplateParameters()
-{
- return pFileScopeInfo->pCurTemplateParameters.Release();
-}
-
-void
-ContextForAry::do_Close_OpenTemplate()
-{
- if (pFileScopeInfo->pCurTemplateParameters)
- delete pFileScopeInfo->pCurTemplateParameters.Release();
-}
-
-void
-ContextForAry::do_Event_Class_FinishedBase( const String & )
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_Store_Typedef( ary::cpp::Typedef & io_rTypedef )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rTypedef);
-}
-
-void
-ContextForAry::do_Event_Store_EnumValue( ary::cpp::EnumValue & io_rEnumValue )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rEnumValue);
-}
-
-void
-ContextForAry::do_Event_Store_CppDefinition( ary::cpp::DefineEntity & io_rDefinition )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rDefinition);
-}
-
-void
-ContextForAry::do_Event_EnterFunction_ParameterList()
-{
- // KORR_FUTURE
- // Inform pDocuDistributor about possibility of parameters' inline documentation.
-}
-
-void
-ContextForAry::do_Event_Function_FinishedParameter( const String & )
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_LeaveFunction_ParameterList()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_EnterFunction_Implementation()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_LeaveFunction_Implementation()
-{
- // KORR_FUTURE
-}
-
-void
-ContextForAry::do_Event_Store_Function( ary::cpp::Function & io_rFunction )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rFunction);
-}
-
-
-void
-ContextForAry::do_Event_Store_Variable( ary::cpp::Variable & io_rVariable )
-{
- pDocuDistributor->SetCurrentlyStoredRe(io_rVariable);
-}
-
-void
-ContextForAry::do_TakeDocu( DYN ary::doc::OldCppDocu & let_drInfo )
-{
- let_drInfo.Store2(*pDocuDistributor);
-}
-
-void
-ContextForAry::do_StartWaitingFor_Recovery()
-{
- pRecoveryGuard->StartWaitingFor_Recovery();
-}
-
-ary::cpp::Gate &
-ContextForAry::inq_AryGate() const
-{
- return * const_cast< ary::cpp::Gate* >(pGate);
-}
-
-const ary::cpp::InputContext &
-ContextForAry::inq_Context() const
-{
- return *this;
-}
-
-String
-ContextForAry::inq_CurFileName() const
-{
- return pFileScopeInfo->pCurFile != 0
- ? pFileScopeInfo->pCurFile->LocalName()
- : String::Null_();
-}
-
-uintt
-ContextForAry::inq_LineCount() const
-{
- return pFileScopeInfo->nLineCount;
-}
-
-bool
-ContextForAry::inq_IsWaitingFor_Recovery() const
-{
- return pRecoveryGuard->IsWithinRecovery();
-}
-
-bool
-ContextForAry::inq_IsExternC() const
-{
- return pOwnerStack->IsExternC();
-}
-
-void
-ContextForAry::do_SetCurFile( ary::loc::File & io_rCurFile )
-{
- pFileScopeInfo->pCurFile = &io_rCurFile;
- pFileScopeInfo->nLineCount = 0;
- pFileScopeInfo->pCurTemplateParameters = 0;
-
- pOwnerStack->Reset();
- pDocuDistributor->Reset();
- pRecoveryGuard->Reset();
-}
-
-void
-ContextForAry::do_Event_IncrLineCount()
-{
- ++pFileScopeInfo->nLineCount;
- pDocuDistributor->Event_LineBreak();
-}
-
-void
-ContextForAry::do_Event_SwBracketOpen()
-{
- pRecoveryGuard->Hdl_SwBracketOpen();
-}
-
-void
-ContextForAry::do_Event_SwBracketClose()
-{
- pRecoveryGuard->Hdl_SwBracketClose();
-}
-
-void
-ContextForAry::do_Event_Semicolon()
-{
- pRecoveryGuard->Hdl_Semicolon();
-}
-
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/cxt2ary.hxx b/autodoc/source/parser/cpp/cxt2ary.hxx
deleted file mode 100644
index 9006aefa645e..000000000000
--- a/autodoc/source/parser/cpp/cxt2ary.hxx
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- 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_CPP_CTX2ARY_HXX
-#define ADC_CPP_CTX2ARY_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/inpcontx.hxx>
-#include <doc_deal.hxx>
-#include "pev.hxx"
-#include "fevnthdl.hxx"
- // COMPONENTS
- // PARAMETERS
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-}
-
-
-
-namespace cpp
-{
-
-
-/** @descr
- This class provides information about the context of an
- CodeEntity, which is going to be stored in the repository.
- The information is used mainly by class ary::cpp::Gate.
-
- Also it provides information for the parser about actual
- state of several public variables.
-
- @todo
- Include events, which allow correct storing of inline
- documentation after enum values, parameters,
- base classes.
-*/
-class ContextForAry : public ary::cpp::InputContext,
- public cpp::PeEnvironment,
- public cpp::FileScope_EventHandler,
- public DocuDealer
-{
- public:
- // LIFECYCLE
- ContextForAry(
- ary::cpp::Gate & io_rAryGate );
- virtual ~ContextForAry();
-
- // OPERATIONS
- void ResetResult() { aTokenResult.Reset(); }
-
- // INQUIRY
- const TokenProcessing_Result &
- CurResult() const { return aTokenResult; }
- // ACCESS
- TokenProcessing_Result &
- CurResult() { return aTokenResult; }
-
- private:
- // Interface ary::cpp::InputContext:
- virtual ary::loc::File &
- inq_CurFile() const;
- virtual ary::cpp::Namespace &
- inq_CurNamespace() const;
- virtual ary::cpp::Class *
- inq_CurClass() const;
- virtual ary::cpp::Enum *
- inq_CurEnum() const;
-
- virtual Owner & inq_CurOwner() const;
- virtual ary::cpp::E_Protection
- inq_CurProtection() const;
-
- // Interface PeEnvironment
- virtual void do_SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push );
- virtual void do_OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- virtual void do_OpenExternC(
- bool i_bOnlyForOneDeclaration );
- virtual void do_OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- virtual void do_OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- virtual void do_CloseBlock();
- virtual void do_CloseClass();
- virtual void do_CloseEnum();
- virtual void do_SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection );
- virtual void do_OpenTemplate(
- const StringVector &
- i_rParameters );
- virtual DYN StringVector *
- do_Get_CurTemplateParameters();
- virtual void do_Close_OpenTemplate();
- virtual void do_Event_Class_FinishedBase(
- const String & i_sBaseName );
-
- virtual void do_Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef );
- virtual void do_Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue );
- virtual void do_Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition );
- virtual void do_Event_EnterFunction_ParameterList();
- virtual void do_Event_Function_FinishedParameter(
- const String & i_sParameterName );
- virtual void do_Event_LeaveFunction_ParameterList();
- virtual void do_Event_EnterFunction_Implementation();
- virtual void do_Event_LeaveFunction_Implementation();
- virtual void do_Event_Store_Function(
- ary::cpp::Function &
- io_rFunction );
- virtual void do_Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable );
- virtual void do_TakeDocu(
- DYN ary::doc::OldCppDocu &
- let_drInfo );
- virtual void do_StartWaitingFor_Recovery();
- virtual ary::cpp::Gate &
- inq_AryGate() const;
- virtual const ary::cpp::InputContext &
- inq_Context() const;
- virtual String inq_CurFileName() const;
- virtual uintt inq_LineCount() const;
- virtual bool inq_IsWaitingFor_Recovery() const;
- virtual bool inq_IsExternC() const;
-
- // Interface FileScope_EventHandler
- virtual void do_SetCurFile(
- ary::loc::File & io_rCurFile );
- virtual void do_Event_IncrLineCount();
- virtual void do_Event_SwBracketOpen();
- virtual void do_Event_SwBracketClose();
- virtual void do_Event_Semicolon();
-
- // Local types
- struct S_FileScopeInfo;
- struct S_OwnerStack;
- struct S_DocuDistributor;
- struct S_RecoveryGuard;
-
- // DATA
- ary::cpp::Gate * pGate;
- TokenProcessing_Result
- aTokenResult;
- Dyn<S_FileScopeInfo>
- pFileScopeInfo;
- Dyn<S_OwnerStack> pOwnerStack;
- Dyn<S_DocuDistributor>
- pDocuDistributor;
- Dyn<S_RecoveryGuard>
- pRecoveryGuard;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/defdescr.cxx b/autodoc/source/parser/cpp/defdescr.cxx
deleted file mode 100644
index c233a5d93be4..000000000000
--- a/autodoc/source/parser/cpp/defdescr.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "defdescr.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <prprpr.hxx>
-
-
-
-
-namespace cpp
-{
-
-
-
-
-DefineDescription::DefineDescription( const String & i_sName,
- const str_vector & i_rDefinition )
- : sName(i_sName),
- // aParams,
- aDefinition(i_rDefinition),
- eDefineType(type_define)
-{
-}
-
-DefineDescription::DefineDescription( const String & i_sName,
- const str_vector & i_rParams,
- const str_vector & i_rDefinition )
- : sName(i_sName),
- aParams(i_rParams),
- aDefinition(i_rDefinition),
- eDefineType(type_macro)
-{
-}
-
-DefineDescription::~DefineDescription()
-{
-}
-
-void
-DefineDescription::GetDefineText( csv::StreamStr & o_rText ) const
-{
- if ( aDefinition.begin() == aDefinition.end() OR eDefineType != type_define )
- return;
-
-
- bool bSwitch_Stringify = false;
- bool bSwitch_Concatenate = false;
-
- for ( str_vector::const_iterator it = aDefinition.begin();
- it != aDefinition.end();
- ++it )
- {
- if ( HandleOperatorsBeforeTextItem( o_rText,
- bSwitch_Stringify,
- bSwitch_Concatenate,
- *it ) )
- {
- continue;
- }
-
- o_rText << (*it);
-
- Do_bStringify_end(o_rText, bSwitch_Stringify);
- o_rText << " ";
- }
- o_rText.seekp(-1, csv::cur);
-}
-
-void
-DefineDescription::GetMacroText( csv::StreamStr & o_rText,
- const StringVector & i_rGivenArguments ) const
-{
- bool bSwitch_Stringify = false;
- bool bSwitch_Concatenate = false;
- intt nActiveParamNr = -1;
-
- if ( aDefinition.begin() == aDefinition.end() OR eDefineType != type_macro )
- return;
-
- for ( str_vector::const_iterator it = aDefinition.begin();
- it != aDefinition.end();
- ++it )
- {
- if ( HandleOperatorsBeforeTextItem( o_rText,
- bSwitch_Stringify,
- bSwitch_Concatenate,
- *it ) )
- {
- continue;
- }
-
- for ( str_vector::const_iterator param_it = aParams.begin();
- param_it != aParams.end() AND nActiveParamNr == -1;
- ++param_it )
- {
- if ( strcmp(*it, *param_it) == 0 )
- nActiveParamNr = param_it - aParams.begin();
- }
- if ( nActiveParamNr == -1 )
- {
- o_rText << (*it);
- }
- else
- {
- o_rText << i_rGivenArguments[nActiveParamNr];
- nActiveParamNr = -1;
- }
-
- Do_bStringify_end(o_rText, bSwitch_Stringify);
- o_rText << " ";
- }
- o_rText.seekp(-1, csv::cur);
-}
-
-
-
-} // end namespace cpp
-
-
-
-
-
-bool
-CheckForOperator( bool & o_bStringify,
- bool & o_bConcatenate,
- const String & i_sTextItem )
-{
- if ( strcmp(i_sTextItem, "##") == 0 )
- {
- o_bConcatenate = true;
- return true;
- }
- else if ( strcmp(i_sTextItem, "#") == 0 )
- {
- o_bStringify = true;
- return true;
- }
- return false;
-}
-
-void
-Do_bConcatenate( csv::StreamStr & o_rText,
- bool & io_bConcatenate )
-{
- if ( io_bConcatenate )
- {
- uintt nPos;
- for ( nPos = o_rText.tellp() - 1;
- nPos > 0 ? o_rText.c_str()[nPos] == ' ' : false;
- --nPos ) ;
- o_rText.seekp(nPos+1);
- io_bConcatenate = false;
- }
-}
-
-void
-Do_bStringify_begin( csv::StreamStr & o_rText,
- bool i_bStringify )
-{
- if ( i_bStringify )
- {
- o_rText << "\"";
- }
-}
-
-void
-Do_bStringify_end( csv::StreamStr & o_rText,
- bool & io_bStringify )
-{
- if ( io_bStringify )
- {
- o_rText << "\"";
- io_bStringify = false;
- }
-}
-
-
-bool
-HandleOperatorsBeforeTextItem( csv::StreamStr & o_rText,
- bool & io_bStringify,
- bool & io_bConcatenate,
- const String & i_sTextItem )
-{
- if ( CheckForOperator( io_bStringify,
- io_bConcatenate,
- i_sTextItem) )
- {
- return true;
- }
- Do_bConcatenate(o_rText, io_bConcatenate);
- Do_bStringify_begin(o_rText, io_bStringify);
-
- return false;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/defdescr.hxx b/autodoc/source/parser/cpp/defdescr.hxx
deleted file mode 100644
index 3980ea7c77fa..000000000000
--- a/autodoc/source/parser/cpp/defdescr.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- 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_CPP_DEFDESCR_HXX
-#define ADC_CPP_DEFDESCR_HXX
-
-
-
-
-namespace cpp
-{
-
-/** Describes a C/C++ #define statement. May be a define or a macro, for which
- two cases the two different constructors are to be used.
-
- This class is used by cpp::PreProcessor.
-*/
-class DefineDescription
-{
- public:
- enum E_DefineType
- {
- type_define,
- type_macro
- };
- typedef StringVector str_vector;
-
- DefineDescription( /// Used for: #define DEFINE xyz
- const String & i_sName,
- const str_vector & i_rDefinition );
- DefineDescription( /// Used for: #define MACRO(...) abc
- const String & i_sName,
- const str_vector & i_rParams,
- const str_vector & i_rDefinition );
- ~DefineDescription();
-
- /// Only vaild if (eDefineType == type_define) else returns "".
- void GetDefineText(
- csv::StreamStr & o_rText ) const;
-
- /// Only vaild if (eDefineType == type_macro) else returns "".
- void GetMacroText(
- csv::StreamStr & o_rText,
- const StringVector &
- i_rGivenArguments ) const;
-
- uintt ParamCount() const;
- E_DefineType DefineType() const;
-
- private:
- // DATA
- String sName;
- str_vector aParams;
- str_vector aDefinition;
- E_DefineType eDefineType;
-};
-
-
-
-
-// IMPLEMENTATION
-inline uintt
-DefineDescription::ParamCount() const
- { return aParams.size(); }
-inline DefineDescription::E_DefineType
-DefineDescription::DefineType() const
- { return eDefineType; }
-
-
-
-
-} // end namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/fevnthdl.hxx b/autodoc/source/parser/cpp/fevnthdl.hxx
deleted file mode 100644
index 0198f404f588..000000000000
--- a/autodoc/source/parser/cpp/fevnthdl.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- 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_CPP_FEVNTHDL_HXX
-#define ADC_CPP_FEVNTHDL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
- // PARAMETERS
-
-
-namespace ary
-{
-namespace loc
-{
- class File;
-}
-}
-
-
-
-
-namespace cpp
-{
-
-
-/** This is an interface, which accepts the file scope events that may
- be important for parsing. It is implementation-dependant, where to
- put or what to do with them.
-*/
-class FileScope_EventHandler
-{
- public:
- // LIFECYCLE
- virtual ~FileScope_EventHandler() {}
-
- // OPERATIONS
- void SetCurFile(
- ary::loc::File & io_rCurFile );
- void Event_IncrLineCount();
- void Event_SwBracketOpen();
- void Event_SwBracketClose();
- void Event_Semicolon();
-
- private:
- virtual void do_SetCurFile(
- ary::loc::File & io_rCurFile ) = 0;
- virtual void do_Event_IncrLineCount() = 0;
- virtual void do_Event_SwBracketOpen() = 0;
- virtual void do_Event_SwBracketClose() = 0;
- virtual void do_Event_Semicolon() = 0;
-};
-
-
-// IMPLEMENTATION
-
-inline void
-FileScope_EventHandler::SetCurFile( ary::loc::File & io_rCurFile )
- { do_SetCurFile(io_rCurFile); }
-inline void
-FileScope_EventHandler::Event_IncrLineCount()
- { do_Event_IncrLineCount(); }
-inline void
-FileScope_EventHandler::Event_SwBracketOpen()
- { do_Event_SwBracketOpen(); }
-inline void
-FileScope_EventHandler::Event_SwBracketClose()
- { do_Event_SwBracketClose(); }
-inline void
-FileScope_EventHandler::Event_Semicolon()
- { do_Event_Semicolon(); }
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/icprivow.cxx b/autodoc/source/parser/cpp/icprivow.cxx
deleted file mode 100644
index 8202e12862e7..000000000000
--- a/autodoc/source/parser/cpp/icprivow.cxx
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include <icprivow.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_class.hxx>
-
-
-
-namespace cpp
-{
-
-
-
-//****************** Owner_Namespace ********************//
-Owner_Namespace::Owner_Namespace()
- : pScope(0)
-{
-}
-
-void
-Owner_Namespace::SetAnotherNamespace( ary::cpp::Namespace & io_rScope )
-{
- pScope = &io_rScope;
-}
-
-bool
-Owner_Namespace::HasClass( const String & i_sLocalName )
-{
- return pScope->Search_LocalClass(i_sLocalName).IsValid();
-}
-
-void
-Owner_Namespace::do_Add_Class( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalClass(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Enum( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalEnum(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Typedef( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalTypedef(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Operation( const String & i_sLocalName,
- Cid i_nId,
- bool )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalOperation(i_sLocalName, i_nId);
-}
-
-void
-Owner_Namespace::do_Add_Variable( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool )
-{
- csv_assert(pScope != 0);
- if (i_bIsConst)
- pScope->Add_LocalConstant(i_sLocalName, i_nId);
- else
- pScope->Add_LocalVariable(i_sLocalName, i_nId);
-}
-
-
-Cid
-Owner_Namespace::inq_CeId() const
-{
- csv_assert(pScope != 0);
- return pScope->CeId();
-}
-
-
-//****************** Owner_Class ********************//
-
-Owner_Class::Owner_Class()
- : pScope(0)
-{
-}
-
-void
-Owner_Class::SetAnotherClass( ary::cpp::Class & io_rScope )
-{
- pScope = &io_rScope;
-}
-
-bool
-Owner_Class::HasClass( const String & )
-{
- return false;
-}
-
-void
-Owner_Class::do_Add_Class( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalClass(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Enum( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalEnum(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Typedef( const String & i_sLocalName,
- Cid i_nId )
-{
- csv_assert(pScope != 0);
- pScope->Add_LocalTypedef(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Operation( const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStatic )
-{
- csv_assert(pScope != 0);
- if (i_bIsStatic)
- pScope->Add_LocalStaticOperation(i_sLocalName, i_nId);
- else
- pScope->Add_LocalOperation(i_sLocalName, i_nId);
-}
-
-void
-Owner_Class::do_Add_Variable( const String & i_sLocalName,
- Cid i_nId,
- bool ,
- bool i_bIsStatic )
-{
- csv_assert(pScope != 0);
- if (i_bIsStatic)
- pScope->Add_LocalStaticData(i_sLocalName, i_nId);
- else
- pScope->Add_LocalData(i_sLocalName, i_nId);
-}
-
-Cid
-Owner_Class::inq_CeId() const
-{
- csv_assert(pScope != 0);
- return pScope->CeId();
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/icprivow.hxx b/autodoc/source/parser/cpp/icprivow.hxx
deleted file mode 100644
index 5321df48e34a..000000000000
--- a/autodoc/source/parser/cpp/icprivow.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- 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 ARY_CPP_ICPRIVOW_HXX
-#define ARY_CPP_ICPRIVOW_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <ary/cpp/inpcontx.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-
-
-typedef ary::cpp::Ce_id Cid;
-
-
-class Owner_Namespace : public ary::cpp::InputContext::Owner
-{
- public:
- Owner_Namespace();
- void SetAnotherNamespace(
- ary::cpp::Namespace &
- io_rScope );
- virtual bool HasClass(
- const String & i_sLocalName );
- private:
- virtual void do_Add_Class(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Enum(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool );
- virtual void do_Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic );
- virtual Cid inq_CeId() const;
-
- // DATA
- ary::cpp::Namespace *
- pScope;
-};
-
-class Owner_Class : public ary::cpp::InputContext::Owner
-{
- public:
- Owner_Class();
- void SetAnotherClass(
- ary::cpp::Class & io_rScope );
-
- /** @attention Only a dummy for use at ary::cpp::Gate!
- Will work nerver!
- */
- virtual bool HasClass(
- const String & i_sLocalName );
- private:
- virtual void do_Add_Class(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Enum(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Typedef(
- const String & i_sLocalName,
- Cid i_nId );
- virtual void do_Add_Operation(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsStaticMember );
- virtual void do_Add_Variable(
- const String & i_sLocalName,
- Cid i_nId,
- bool i_bIsConst,
- bool i_bIsStatic );
- virtual Cid inq_CeId() const;
-
- // DATA
- ary::cpp::Class * pScope;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/makefile.mk b/autodoc/source/parser/cpp/makefile.mk
deleted file mode 100644
index 9729ee2d57b1..000000000000
--- a/autodoc/source/parser/cpp/makefile.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=autodoc
-TARGET=parser_cpp
-
-
-# --- Settings -----------------------------------------------------
-
-ENABLE_EXCEPTIONS=true
-PRJINC=$(PRJ)$/source
-
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
-
-
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= \
- $(OBJ)$/all_toks.obj \
- $(OBJ)$/c_dealer.obj \
- $(OBJ)$/c_rcode.obj \
- $(OBJ)$/cpp_pe.obj \
- $(OBJ)$/cx_base.obj \
- $(OBJ)$/cx_c_pp.obj \
- $(OBJ)$/cx_c_std.obj \
- $(OBJ)$/cx_c_sub.obj \
- $(OBJ)$/cxt2ary.obj \
- $(OBJ)$/defdescr.obj \
- $(OBJ)$/icprivow.obj \
- $(OBJ)$/pe_base.obj \
- $(OBJ)$/pe_class.obj \
- $(OBJ)$/pe_defs.obj \
- $(OBJ)$/pe_expr.obj \
- $(OBJ)$/pe_enum.obj \
- $(OBJ)$/pe_enval.obj \
- $(OBJ)$/pe_file.obj \
- $(OBJ)$/pe_funct.obj \
- $(OBJ)$/pe_ignor.obj \
- $(OBJ)$/pe_namsp.obj \
- $(OBJ)$/pe_param.obj \
- $(OBJ)$/pe_tpltp.obj \
- $(OBJ)$/pe_type.obj \
- $(OBJ)$/pe_tydef.obj \
- $(OBJ)$/pe_vafu.obj \
- $(OBJ)$/pe_vari.obj \
- $(OBJ)$/preproc.obj \
- $(OBJ)$/prs_cpp.obj \
- $(OBJ)$/tkp_cpp.obj
-
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-
diff --git a/autodoc/source/parser/cpp/pe_base.cxx b/autodoc/source/parser/cpp/pe_base.cxx
deleted file mode 100644
index 0a4c823a47a4..000000000000
--- a/autodoc/source/parser/cpp/pe_base.cxx
+++ /dev/null
@@ -1,226 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_base.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_type.hxx>
-#include "pe_type.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-static const PE_Base::Base aNullBase_;
-
-
-PE_Base::PE_Base( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati(new PeStatusArray<PE_Base>)
- // aBaseIds,
- // pSpType,
- // pSpuBaseName
-{
- Setup_StatusFunctions();
- aBaseIds.reserve(4);
-
- pSpType = new SP_Type(*this);
- pSpuBaseName = new SPU_BaseName(*pSpType, 0, &PE_Base::SpReturn_BaseName);
-}
-
-
-PE_Base::~PE_Base()
-{
-}
-
-void
-PE_Base::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Base::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Base>::F_Tok F_Tok;
- static F_Tok stateF_startOfNext[] = { &PE_Base::On_startOfNext_Identifier,
- &PE_Base::On_startOfNext_public,
- &PE_Base::On_startOfNext_protected,
- &PE_Base::On_startOfNext_private,
- &PE_Base::On_startOfNext_virtual,
- &PE_Base::On_startOfNext_DoubleColon };
- static INT16 stateT_startOfNext[] = { Tid_Identifier,
- Tid_public,
- Tid_protected,
- Tid_private,
- Tid_virtual,
- Tid_DoubleColon };
- static F_Tok stateF_inName[] = { &PE_Base::On_inName_Identifier,
- &PE_Base::On_inName_virtual,
- &PE_Base::On_inName_SwBracket_Left,
- &PE_Base::On_inName_DoubleColon,
- &PE_Base::On_inName_Comma };
- static INT16 stateT_inName[] = { Tid_Identifier,
- Tid_virtual,
- Tid_SwBracket_Left,
- Tid_DoubleColon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Base, startOfNext, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Base, inName, Hdl_SyntaxError);
-}
-
-void
-PE_Base::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Base::InitData()
-{
- pStati->SetCur(startOfNext);
- csv::erase_container(aBaseIds);
- aBaseIds.push_back(aNullBase_);
-}
-
-void
-PE_Base::TransferData()
-{
- // Does nothing.
-}
-
-void
-PE_Base::SpReturn_BaseName()
-{
- CurObject().nId = pSpuBaseName->Child().Result_Type().Id();
-
- static StreamStr aBaseName(100);
- aBaseName.seekp(0);
- pSpuBaseName->Child().Result_Type().Get_Text( aBaseName, Env().AryGate() );
-
- Env().Event_Class_FinishedBase(aBaseName.c_str());
-}
-
-void
-PE_Base::On_startOfNext_public(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_public;
-}
-
-void
-PE_Base::On_startOfNext_protected(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_protected;
-}
-
-void
-PE_Base::On_startOfNext_private(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inName);
-
- CurObject().eProtection = ary::cpp::PROTECT_private;
-}
-
-void
-PE_Base::On_startOfNext_virtual(const char *)
-{
- SetTokenResult(done, stay);
-
- CurObject().eVirtuality = ary::cpp::VIRTUAL_virtual;
-}
-
-void
-PE_Base::On_startOfNext_Identifier(const char * )
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_startOfNext_DoubleColon(const char *)
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_Identifier(const char * )
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_virtual(const char *)
-{
- SetTokenResult(done, stay);
-
- CurObject().eVirtuality = ary::cpp::VIRTUAL_virtual;
-}
-
-void
-PE_Base::On_inName_DoubleColon(const char *)
-{
- pSpuBaseName->Push(not_done);
-}
-
-void
-PE_Base::On_inName_Comma(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(startOfNext);
-
- aBaseIds.push_back( aNullBase_ );
-}
-
-void
-PE_Base::On_inName_SwBracket_Left(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_base.hxx b/autodoc/source/parser/cpp/pe_base.hxx
deleted file mode 100644
index 0a39160b6a19..000000000000
--- a/autodoc/source/parser/cpp/pe_base.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- 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_CPP_PE_BASE_HXX
-#define ADC_CPP_PE_BASE_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-
-
-
-namespace cpp
-{
-
-class PE_Type;
-
-class PE_Base : public Cpp_PE
-{
- public:
- enum E_State
- {
- startOfNext,
- inName,
- size_of_states
- };
-
- typedef ary::cpp::List_Bases BaseList;
- typedef ary::cpp::S_Classes_Base Base;
-
- PE_Base(
- Cpp_PE * i_pParent );
- ~PE_Base();
-
- const BaseList & Result_BaseIds() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_Base, PE_Type > SP_Type;
- typedef SubPeUse< PE_Base, PE_Type> SPU_BaseName;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_BaseName();
-
- void On_startOfNext_Identifier(const char *);
- void On_startOfNext_public(const char *);
- void On_startOfNext_protected(const char *);
- void On_startOfNext_private(const char *);
- void On_startOfNext_virtual(const char *);
- void On_startOfNext_DoubleColon(const char *);
-
- void On_inName_Identifier(const char *);
- void On_inName_virtual(const char *);
- void On_inName_SwBracket_Left(const char *);
- void On_inName_DoubleColon(const char *);
- void On_inName_Comma(const char *);
-
- Base & CurObject();
-
- // DATA
- Dyn< PeStatusArray<PE_Base> >
- pStati;
-
- Dyn<SP_Type> pSpType; /// till "{" incl.
- Dyn<SPU_BaseName> pSpuBaseName;
-
- BaseList aBaseIds;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const PE_Base::BaseList &
-PE_Base::Result_BaseIds() const
- { return aBaseIds; }
-
-
-inline PE_Base::Base &
-PE_Base::CurObject()
- { return aBaseIds.back(); }
-
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_class.cxx b/autodoc/source/parser/cpp/pe_class.cxx
deleted file mode 100644
index 1b4910aff9be..000000000000
--- a/autodoc/source/parser/cpp/pe_class.cxx
+++ /dev/null
@@ -1,496 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_class.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_base.hxx"
-#include "pe_defs.hxx"
-#include "pe_enum.hxx"
-#include "pe_tydef.hxx"
-#include "pe_vafu.hxx"
-#include "pe_ignor.hxx"
-
-
-namespace cpp {
-
-// using ary::Cid;
-
-PE_Class::PE_Class(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Class> ),
- // pSpBase,
- // pSpTypedef,
- // pSpVarFunc,
- // pSpIgnore,
- // pSpuBase,
- // pSpuTypedef,
- // pSpuVarFunc,
- // pSpuUsing,
- // pSpuIgnoreFailure,
- // sLocalName,
- eClassKey(ary::cpp::CK_class),
- pCurObject(0),
- // aBases,
- eResult_KindOf(is_declaration)
-{
- Setup_StatusFunctions();
-
- pSpBase = new SP_Base(*this);
- pSpTypedef = new SP_Typedef(*this);
- pSpVarFunc = new SP_VarFunc(*this);
- pSpIgnore = new SP_Ignore(*this);
- pSpDefs = new SP_Defines(*this);
-
- pSpuBase = new SPU_Base(*pSpBase, 0, &PE_Class::SpReturn_Base);
- pSpuTypedef = new SPU_Typedef(*pSpTypedef, 0, 0);
- pSpuVarFunc = new SPU_VarFunc(*pSpVarFunc, 0, 0);
-
- pSpuTemplate= new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuUsing = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuIgnoreFailure
- = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuDefs = new SPU_Defines(*pSpDefs, 0, 0);
-}
-
-
-PE_Class::~PE_Class()
-{
-}
-
-void
-PE_Class::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-Cpp_PE *
-PE_Class::Handle_ChildFailure()
-{
- SetCurSPU(pSpuIgnoreFailure.Ptr());
- return &pSpuIgnoreFailure->Child();
-}
-
-void
-PE_Class::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Class>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_Class::On_start_class,
- &PE_Class::On_start_struct,
- &PE_Class::On_start_union };
- static INT16 stateT_start[] = { Tid_class,
- Tid_struct,
- Tid_union };
-
- static F_Tok stateF_expectName[] = { &PE_Class::On_expectName_Identifier,
- &PE_Class::On_expectName_SwBracket_Left,
- &PE_Class::On_expectName_Colon
- };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_SwBracket_Left,
- Tid_Colon
- };
-
- static F_Tok stateF_gotName[] = { &PE_Class::On_gotName_SwBracket_Left,
- &PE_Class::On_gotName_Semicolon,
- &PE_Class::On_gotName_Colon };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Colon };
-
- static F_Tok stateF_bodyStd[] = { &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_ClassKey,
- &PE_Class::On_bodyStd_ClassKey,
- &PE_Class::On_bodyStd_ClassKey,
-
- &PE_Class::On_bodyStd_enum,
- &PE_Class::On_bodyStd_typedef,
- &PE_Class::On_bodyStd_public,
- &PE_Class::On_bodyStd_protected,
- &PE_Class::On_bodyStd_private,
-
- &PE_Class::On_bodyStd_template,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_friend,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
-
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
-
- &PE_Class::On_bodyStd_using,
- &PE_Class::On_bodyStd_SwBracket_Right,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_DefineName,
- &PE_Class::On_bodyStd_MacroName,
-
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc,
- &PE_Class::On_bodyStd_VarFunc, };
-
- static INT16 stateT_bodyStd[] = { Tid_Identifier,
- Tid_operator,
- Tid_class,
- Tid_struct,
- Tid_union,
-
- Tid_enum,
- Tid_typedef,
- Tid_public,
- Tid_protected,
- Tid_private,
-
- Tid_template,
- Tid_virtual,
- Tid_friend,
- Tid_Tilde,
- Tid_const,
-
- Tid_volatile,
- Tid_static,
- Tid_mutable,
- Tid_inline,
- Tid_explicit,
-
- Tid_using,
- Tid_SwBracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_DefineName,
-
- Tid_MacroName,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_inProtection[] = { &PE_Class::On_inProtection_Colon };
- static INT16 stateT_inProtection[] = { Tid_Colon };
-
- static F_Tok stateF_afterDecl[] = { &PE_Class::On_afterDecl_Semicolon };
- static INT16 stateT_afterDecl[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Class, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, gotName, On_gotName_Return2Type);
- SEMPARSE_CREATE_STATUS(PE_Class, bodyStd, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, inProtection, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Class, afterDecl, On_afterDecl_Return2Type);
-
-}
-
-void
-PE_Class::InitData()
-{
- pStati->SetCur(start);
- sLocalName.clear();
- eClassKey = ary::cpp::CK_class;
- pCurObject = 0;
- csv::erase_container(aBases);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Class::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Class::Hdl_SyntaxError( const char * i_sText)
-{
- if ( *i_sText == ';' )
- {
- Cerr() << Env().CurFileName() << ", line "
- << Env().LineCount()
- << ": Sourcecode warning: ';' as a toplevel declaration is deprecated."
- << Endl();
- SetTokenResult(done,stay);
- return;
- }
-
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Class::Init_CurObject()
-{
- // KORR_FUTURE
- // This will have to be done before parsing base classes, because of
- // possible inline documentation for base classes.
- pCurObject = & Env().AryGate().Ces().Store_Class( Env().Context(), sLocalName, eClassKey );
-
- for ( PE_Base::BaseList::const_iterator it = aBases.begin();
- it != aBases.end();
- ++it )
- {
- pCurObject->Add_BaseClass( *it );
- } // end for
-
- Dyn< StringVector >
- pTplParams( Env().Get_CurTemplateParameters() );
- if ( pTplParams )
- {
- for ( StringVector::const_iterator it = pTplParams->begin();
- it != pTplParams->end();
- ++it )
- {
- pCurObject->Add_TemplateParameterType( *it, ary::cpp::Type_id(0) );
- } // end for
- }
-}
-
-void
-PE_Class::SpReturn_Base()
-{
- aBases = pSpuBase->Child().Result_BaseIds();
- pStati->SetCur(gotName);
-}
-
-void
-PE_Class::On_start_class( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_class;
-}
-
-void
-PE_Class::On_start_struct( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_struct;
-}
-
-void
-PE_Class::On_start_union( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
- eClassKey = ary::cpp::CK_union;
-}
-
-void
-PE_Class::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
- sLocalName = i_sText;
-}
-
-void
-PE_Class::On_expectName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- sLocalName = "";
- Init_CurObject();
- sLocalName = pCurObject->LocalName();
-
- Env().OpenClass(*pCurObject);
-}
-
-void
-PE_Class::On_expectName_Colon( const char * )
-{
- pStati->SetCur(gotName);
- sLocalName = "";
-
- pSpuBase->Push(done);
-}
-
-void
-PE_Class::On_gotName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- Init_CurObject();
- if ( sLocalName.empty() )
- sLocalName = pCurObject->LocalName();
-
- Env().OpenClass(*pCurObject);
-}
-
-void
-PE_Class::On_gotName_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_predeclaration;
-}
-
-void
-PE_Class::On_gotName_Colon( const char * )
-{
- pSpuBase->Push(done);
-}
-
-void
-PE_Class::On_gotName_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_qualified_typename;
-}
-
-void
-PE_Class::On_bodyStd_VarFunc( const char * )
-{
- pSpuVarFunc->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_ClassKey( const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // classes are parsed via PE_Type.
-}
-
-void
-PE_Class::On_bodyStd_enum( const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // enums are parsed via PE_Type.
-}
-
-void
-PE_Class::On_bodyStd_typedef( const char * )
-{
- pSpuTypedef->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_public( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_public);
-}
-
-void
-PE_Class::On_bodyStd_protected( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_protected);
-}
-
-void
-PE_Class::On_bodyStd_private( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(inProtection);
-
- Env().SetCurProtection(ary::cpp::PROTECT_private);
-}
-
-void
-PE_Class::On_bodyStd_template( const char * )
-{
- pSpuTemplate->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_friend( const char * )
-{
- // KORR_FUTURE
- pSpuUsing->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_using( const char * )
-{
- pSpuUsing->Push(done);
-}
-
-void
-PE_Class::On_bodyStd_SwBracket_Right( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterDecl);
-
- Env().CloseClass();
-}
-
-void
-PE_Class::On_bodyStd_DefineName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_Class::On_bodyStd_MacroName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-
-void
-PE_Class::On_inProtection_Colon( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-}
-
-void
-PE_Class::On_afterDecl_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Class::On_afterDecl_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_implicit_declaration;
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_class.hxx b/autodoc/source/parser/cpp/pe_class.hxx
deleted file mode 100644
index d94123a26265..000000000000
--- a/autodoc/source/parser/cpp/pe_class.hxx
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- 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_CPP_PE_CLASS_HXX
-#define ADC_CPP_PE_CLASS_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // OTHER
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_slntry.hxx>
-#include "all_toks.hxx"
-
-namespace ary
-{
-namespace cpp
-{
- class Class;
-}
-}
-
-
-namespace cpp
-{
-
-
-using ary::cpp::E_Protection;
-using ary::cpp::E_Virtuality;
-
-
-class PE_Base;
-class PE_Enum;
-class PE_Typedef;
-class PE_VarFunc;
-class PE_Ignore;
-class PE_Defines;
-
-
-class PE_Class : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start, /// before class, struct or union
- expectName, /// after class, struct or union
- gotName, /// after name, before : or {
- bodyStd, /// after {
- inProtection, /// after public, protected or private and before ":"
- afterDecl, /// after ending }
- size_of_states
- };
-
- enum E_KindOfResult
- {
- is_declaration, // normal
- is_implicit_declaration, // like in: class Abc { public int n; } aAbc;
- is_predeclaration, // like: class Abc;
- is_qualified_typename // like in: class Abc * fx();
-
- };
-
- PE_Class(
- Cpp_PE * i_pParent );
- ~PE_Class();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- virtual Cpp_PE * Handle_ChildFailure();
-
- E_KindOfResult Result_KindOf() const;
- const String & Result_LocalName() const;
- const String & Result_FirstNameSegment() const;
-
- private:
- typedef SubPe< PE_Class, PE_Base > SP_Base;
-// typedef SubPe< PE_Class, PE_Enum> SP_Enum;
- typedef SubPe< PE_Class, PE_Typedef> SP_Typedef;
- typedef SubPe< PE_Class, PE_VarFunc> SP_VarFunc;
- typedef SubPe< PE_Class, PE_Ignore > SP_Ignore;
- typedef SubPe< PE_Class, PE_Defines> SP_Defines;
-
- typedef SubPeUse< PE_Class, PE_Base> SPU_Base;
-// typedef SubPeUse< PE_Class, PE_Enum> SPU_Enum;
- typedef SubPeUse< PE_Class, PE_Typedef> SPU_Typedef;
- typedef SubPeUse< PE_Class, PE_VarFunc> SPU_VarFunc;
- typedef SubPeUse< PE_Class, PE_Ignore> SPU_Ignore;
- typedef SubPeUse< PE_Class, PE_Defines> SPU_Defines;
-
- typedef ary::cpp::List_Bases BaseList;
- typedef ary::cpp::S_Classes_Base Base;
- typedef ary::cpp::E_Protection E_Protection;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
- void Init_CurObject();
-
- void SpReturn_Base();
-
- void On_start_class( const char * );
- void On_start_struct( const char * );
- void On_start_union( const char * );
-
- void On_expectName_Identifier( const char * );
- void On_expectName_SwBracket_Left( const char * );
- void On_expectName_Colon( const char * );
-
- void On_gotName_SwBracket_Left( const char * );
- void On_gotName_Semicolon( const char * );
- void On_gotName_Colon( const char * );
- void On_gotName_Return2Type( const char * );
-
- void On_bodyStd_VarFunc( const char * );
- void On_bodyStd_ClassKey( const char * );
- void On_bodyStd_enum( const char * );
- void On_bodyStd_typedef( const char * );
- void On_bodyStd_public( const char * );
- void On_bodyStd_protected( const char * );
- void On_bodyStd_private( const char * );
- void On_bodyStd_template( const char * );
- void On_bodyStd_friend( const char * );
- void On_bodyStd_using( const char * );
- void On_bodyStd_SwBracket_Right( const char * );
- void On_bodyStd_DefineName(const char * );
- void On_bodyStd_MacroName(const char * );
-
- void On_inProtection_Colon( const char * );
-
- void On_afterDecl_Semicolon( const char * );
- void On_afterDecl_Return2Type( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Class> >
- pStati;
-
- Dyn<SP_Base> pSpBase;
-// Dyn<SP_Enum> pSpEnum;
- Dyn<SP_Typedef> pSpTypedef;
- Dyn<SP_VarFunc> pSpVarFunc;
- Dyn<SP_Ignore> pSpIgnore;
- Dyn<SP_Defines> pSpDefs;
-
- Dyn<SPU_Base> pSpuBase;
-// Dyn<SPU_Enum> pSpuEnum;
- Dyn<SPU_Typedef> pSpuTypedef;
- Dyn<SPU_VarFunc> pSpuVarFunc;
-
- Dyn<SPU_Ignore> pSpuTemplate;
- Dyn<SPU_Ignore> pSpuUsing;
- Dyn<SPU_Ignore> pSpuIgnoreFailure;
- Dyn<SPU_Defines> pSpuDefs;
-
-
-
- String sLocalName;
- ary::cpp::E_ClassKey
- eClassKey;
- ary::cpp::Class * pCurObject;
- BaseList aBases;
-
- E_KindOfResult eResult_KindOf;
-};
-
-
-
-// IMPLEMENTATION
-
-inline PE_Class::E_KindOfResult
-PE_Class::Result_KindOf() const
-{
- return eResult_KindOf;
-}
-
-inline const String &
-PE_Class::Result_LocalName() const
-{
- return sLocalName;
-}
-
-inline const String &
-PE_Class::Result_FirstNameSegment() const
-{
- return sLocalName;
-}
-
-
-
-
-} // namespace cpp
-
-
-/* // Branches
-
-class struct union
- -> Class
- -> Predeclaration
-
-typedef
- -> Typedef
-
-enum
- -> Enum
-
-TypeDeclaration
- -> Function In Class
- -> Variable
-
-public, protected, private
- -> Protection declaration
-
-friend
- -> Friend Class
- -> Friend Function
-
-virtual
- -> Function In Class
-
-using
- -> Using Declaration
-*/
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_defs.cxx b/autodoc/source/parser/cpp/pe_defs.cxx
deleted file mode 100644
index d599ea9de1eb..000000000000
--- a/autodoc/source/parser/cpp/pe_defs.cxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_defs.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_define.hxx>
-#include <ary/cpp/c_macro.hxx>
-#include <ary/cpp/cp_def.hxx>
-#include "all_toks.hxx"
-
-
-namespace cpp
-{
-
-
-PE_Defines::PE_Defines( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Defines> ),
- // sName,
- // aParameters,
- // sDefinition,
- bIsMacro(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Defines::~PE_Defines()
-{
-}
-
-void
-PE_Defines::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Defines::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Defines>::F_Tok F_Tok;
- static F_Tok stateF_expectName[] = { &PE_Defines::On_expectName_DefineName,
- &PE_Defines::On_expectName_MacroName
- };
- static INT16 stateT_expectName[] = { Tid_DefineName,
- Tid_MacroName
- };
-
- static F_Tok stateF_gotDefineName[] = { &PE_Defines::On_gotDefineName_PreProDefinition };
- static INT16 stateT_gotDefineName[] = { Tid_PreProDefinition };
-
- static F_Tok stateF_expectMacroParameters[] =
- { &PE_Defines::On_expectMacroParameters_MacroParameter,
- &PE_Defines::On_expectMacroParameters_PreProDefinition
- };
- static INT16 stateT_expectMacroParameters[] =
- { Tid_MacroParameter,
- Tid_PreProDefinition
- };
-
- SEMPARSE_CREATE_STATUS(PE_Defines, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Defines, gotDefineName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Defines, expectMacroParameters, Hdl_SyntaxError);
-}
-
-void
-PE_Defines::InitData()
-{
- pStati->SetCur(expectName);
-
- sName.clear();
- csv::erase_container( aParameters );
- csv::erase_container( aDefinition );
- bIsMacro = false;
-}
-
-void
-PE_Defines::TransferData()
-{
- if (NOT bIsMacro)
- {
- if (aDefinition.empty() OR aDefinition.front().empty())
- return;
-
- ary::cpp::Define &
- rNew = Env().AryGate().Defs().Store_Define(
- Env().Context(), sName, aDefinition );
- Env().Event_Store_CppDefinition(rNew);
- }
- else
- {
- ary::cpp::Macro &
- rNew = Env().AryGate().Defs().Store_Macro(
- Env().Context(), sName, aParameters, aDefinition );
- Env().Event_Store_CppDefinition(rNew);
- }
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Defines::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Defines::On_expectName_DefineName( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotDefineName);
-
- sName = i_sText;
- bIsMacro = false;
-}
-
-void
-PE_Defines::On_expectName_MacroName( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectMacroParameters);
-
- sName = i_sText;
- bIsMacro = true;
-}
-
-void
-PE_Defines::On_gotDefineName_PreProDefinition( const char * i_sText )
-{
- SetTokenResult(done, pop_success);
-
- aDefinition.push_back( String (i_sText) );
-}
-
-void
-PE_Defines::On_expectMacroParameters_MacroParameter( const char * i_sText )
-{
- SetTokenResult(done, stay);
- aParameters.push_back( String (i_sText) );
-}
-
-void
-PE_Defines::On_expectMacroParameters_PreProDefinition( const char * i_sText )
-{
- SetTokenResult(done, pop_success);
-
- aDefinition.push_back( String (i_sText) );
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_defs.hxx b/autodoc/source/parser/cpp/pe_defs.hxx
deleted file mode 100644
index 955dadef7828..000000000000
--- a/autodoc/source/parser/cpp/pe_defs.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- 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_CPP_PE_DEFS_HXX
-#define ADC_CPP_PE_DEFS_HXX
-
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp
-{
-
-
-
-class PE_Defines : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- expectName,
- gotDefineName,
- expectMacroParameters,
- size_of_states
- };
-
- PE_Defines(
- Cpp_PE * i_pParent );
- ~PE_Defines();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_expectName_DefineName( const char * );
- void On_expectName_MacroName( const char * );
-
- void On_gotDefineName_PreProDefinition( const char * );
-
- void On_expectMacroParameters_MacroParameter( const char * );
- void On_expectMacroParameters_PreProDefinition( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Defines> >
- pStati;
-
- String sName;
- StringVector aParameters;
- StringVector aDefinition;
- bool bIsMacro;
-};
-
-
-
-} //namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enum.cxx b/autodoc/source/parser/cpp/pe_enum.cxx
deleted file mode 100644
index b56ffc96380b..000000000000
--- a/autodoc/source/parser/cpp/pe_enum.cxx
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_enum.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_enum.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_enval.hxx"
-
-
-namespace cpp {
-
-
-PE_Enum::PE_Enum(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Enum> ),
- // pSpValue,
- // pSpuValue,
- // sLocalName,
- pCurObject(0),
- eResult_KindOf(is_declaration)
-{
- Setup_StatusFunctions();
-
- pSpValue = new SP_EnumValue(*this);
- pSpuValue = new SPU_EnumValue(*pSpValue, 0, 0);
-}
-
-
-PE_Enum::~PE_Enum()
-{
-}
-
-void
-PE_Enum::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Enum::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Enum>::F_Tok F_Tok;
- static F_Tok stateF_expectName[] = { &PE_Enum::On_expectName_Identifier,
- &PE_Enum::On_expectName_SwBracket_Left
- };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_SwBracket_Left
- };
-
- static F_Tok stateF_gotName[] = { &PE_Enum::On_gotName_SwBracket_Left };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left };
-
- static F_Tok stateF_bodyStd[] = { &PE_Enum::On_bodyStd_Identifier,
- &PE_Enum::On_bodyStd_SwBracket_Right };
- static INT16 stateT_bodyStd[] = { Tid_Identifier,
- Tid_SwBracket_Right };
-
- static F_Tok stateF_afterBlock[] = { &PE_Enum::On_afterBlock_Semicolon };
- static INT16 stateT_afterBlock[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Enum, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Enum, gotName, On_gotName_Return2Type);
- SEMPARSE_CREATE_STATUS(PE_Enum, bodyStd, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Enum, afterBlock, On_afterBlock_Return2Type);
-}
-
-void
-PE_Enum::InitData()
-{
- pStati->SetCur(expectName);
- pCurObject = 0;
- sLocalName.clear();
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Enum::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Enum::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Enum::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
-
- sLocalName = i_sText;
- pCurObject = & Env().AryGate().Ces().Store_Enum( Env().Context(), sLocalName );
-}
-
-void
-PE_Enum::On_expectName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
-
- sLocalName = "";
- pCurObject = & Env().AryGate().Ces().Store_Enum( Env().Context(), sLocalName );
- sLocalName = pCurObject->LocalName();
-
- Env().OpenEnum(*pCurObject);
-}
-
-void
-PE_Enum::On_gotName_SwBracket_Left( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(bodyStd);
- Env().OpenEnum(*pCurObject);
-}
-
-void
-PE_Enum::On_gotName_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
-
- eResult_KindOf = is_qualified_typename;
-}
-
-void
-PE_Enum::On_bodyStd_Identifier( const char * )
-{
- pSpuValue->Push(not_done);
-}
-
-void
-PE_Enum::On_bodyStd_SwBracket_Right( const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterBlock);
-
- Env().CloseEnum();
-}
-
-void
-PE_Enum::On_afterBlock_Semicolon( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_declaration;
-}
-
-void
-PE_Enum::On_afterBlock_Return2Type( const char * )
-{
- SetTokenResult(not_done, pop_success);
- eResult_KindOf = is_implicit_declaration;
-}
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enum.hxx b/autodoc/source/parser/cpp/pe_enum.hxx
deleted file mode 100644
index 3f1a38e022bf..000000000000
--- a/autodoc/source/parser/cpp/pe_enum.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- 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_CPP_PE_ENUM_HXX
-#define ADC_CPP_PE_ENUM_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-
-namespace cpp {
-
-
-class PE_EnumValue;
-
-class PE_Enum : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- expectName, /// after "enum"
- gotName, /// after name, before : or {
- bodyStd, /// after {
- afterBlock, /// after ending }
- size_of_states
- };
-
- enum E_KindOfResult
- {
- is_declaration, // normal
- is_implicit_declaration, // like in: enum Abc { rot, gelb, blau } aAbc;
- is_qualified_typename // like in: enum Abc * fx();
-
- };
- PE_Enum(
- Cpp_PE * i_pParent );
- ~PE_Enum();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- E_KindOfResult Result_KindOf() const;
- const String & Result_LocalName() const;
- const String & Result_FirstNameSegment() const;
-
- private:
- typedef SubPe< PE_Enum, PE_EnumValue > SP_EnumValue;
- typedef SubPeUse< PE_Enum, PE_EnumValue> SPU_EnumValue;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_expectName_Identifier( const char * );
- void On_expectName_SwBracket_Left( const char * );
-
- void On_gotName_SwBracket_Left( const char * );
- void On_gotName_Return2Type( const char * );
-
- void On_bodyStd_Identifier( const char * );
- void On_bodyStd_SwBracket_Right( const char * );
-
- void On_afterBlock_Semicolon( const char * );
- void On_afterBlock_Return2Type( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Enum> >
- pStati;
- Dyn<SP_EnumValue> pSpValue;
- Dyn<SPU_EnumValue> pSpuValue;
-
- String sLocalName;
- ary::cpp::Enum * pCurObject;
-
- E_KindOfResult eResult_KindOf;
-};
-
-
-
-// IMPLEMENTATION
-inline PE_Enum::E_KindOfResult
-PE_Enum::Result_KindOf() const
-{
- return eResult_KindOf;
-}
-
-inline const String &
-PE_Enum::Result_LocalName() const
-{
- return sLocalName;
-}
-
-inline const String &
-PE_Enum::Result_FirstNameSegment() const
-{
- return sLocalName;
-}
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enval.cxx b/autodoc/source/parser/cpp/pe_enval.cxx
deleted file mode 100644
index 0480047fb10b..000000000000
--- a/autodoc/source/parser/cpp/pe_enval.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_enval.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include "pe_expr.hxx"
-
-
-
-namespace cpp {
-
-
-PE_EnumValue::PE_EnumValue( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_EnumValue> )
- // pSpExpression,
- // pSpuInitExpression
-{
- Setup_StatusFunctions();
-
- pSpExpression = new SP_Expression(*this);
- pSpuInitExpression = new SPU_Expression(*pSpExpression, 0, &PE_EnumValue::SpReturn_InitExpression);
-}
-
-PE_EnumValue::~PE_EnumValue()
-{
-}
-
-void
-PE_EnumValue::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_EnumValue::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_EnumValue>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_EnumValue::On_start_Identifier };
- static INT16 stateT_start[] = { Tid_Identifier };
-
- static F_Tok stateF_afterName[] = { &PE_EnumValue::On_afterName_SwBracket_Right,
- &PE_EnumValue::On_afterName_Comma,
- &PE_EnumValue::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_SwBracket_Right,
- Tid_Comma,
- Tid_Assign };
-
- static F_Tok stateF_expectFinish[] = { &PE_EnumValue::On_expectFinish_SwBracket_Right,
- &PE_EnumValue::On_expectFinish_Comma };
- static INT16 stateT_expectFinish[] = { Tid_SwBracket_Right,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_EnumValue, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_EnumValue, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_EnumValue, expectFinish, Hdl_SyntaxError);
-}
-
-void
-PE_EnumValue::InitData()
-{
- pStati->SetCur(start);
-
- sName.clear();
- sInitExpression.clear();
-}
-
-void
-PE_EnumValue::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- ary::cpp::EnumValue &
- rEnVal = Env().AryGate().Ces().Store_EnumValue(
- Env().Context(), sName, sInitExpression );
- Env().Event_Store_EnumValue(rEnVal);
-}
-
-void
-PE_EnumValue::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_EnumValue::SpReturn_InitExpression()
-{
- pStati->SetCur(expectFinish);
-
- sInitExpression = pSpuInitExpression->Child().Result_Text();
-}
-
-void
-PE_EnumValue::On_start_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- sName = i_sText;
-}
-
-void
-PE_EnumValue::On_afterName_SwBracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_EnumValue::On_afterName_Comma(const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_EnumValue::On_afterName_Assign(const char * )
-{
- pSpuInitExpression->Push(done);
-}
-
-void
-PE_EnumValue::On_expectFinish_SwBracket_Right(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_EnumValue::On_expectFinish_Comma(const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_enval.hxx b/autodoc/source/parser/cpp/pe_enval.hxx
deleted file mode 100644
index 5cfdd5f447af..000000000000
--- a/autodoc/source/parser/cpp/pe_enval.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- 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_CPP_PE_ENVAL_HXX
-#define ADC_CPP_PE_ENVAL_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-class PE_Expression;
-
-
-class PE_EnumValue : public Cpp_PE
-{
- public:
- enum E_State
- {
- start, // before name
- afterName,
- expectFinish, // after init-expression
- size_of_states
- };
- PE_EnumValue(
- Cpp_PE * i_pParent );
- ~PE_EnumValue();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_EnumValue, PE_Expression > SP_Expression;
- typedef SubPeUse< PE_EnumValue, PE_Expression> SPU_Expression;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
- void SpReturn_InitExpression();
-
- void On_start_Identifier(const char * );
-
- void On_afterName_SwBracket_Right(const char * );
- void On_afterName_Comma(const char * );
- void On_afterName_Assign(const char * );
-
- void On_expectFinish_SwBracket_Right(const char * );
- void On_expectFinish_Comma(const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_EnumValue> >
- pStati;
- Dyn<SP_Expression> pSpExpression;
- Dyn<SPU_Expression> pSpuInitExpression;
-
- String sName;
- String sInitExpression;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_expr.cxx b/autodoc/source/parser/cpp/pe_expr.cxx
deleted file mode 100644
index 0594e57077c5..000000000000
--- a/autodoc/source/parser/cpp/pe_expr.cxx
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_expr.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp {
-
-
-
-PE_Expression::PE_Expression( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Expression> ),
- aResult_Text(100),
- nBracketCounter(0)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Expression::~PE_Expression()
-{
-}
-
-void
-PE_Expression::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Expression::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Expression>::F_Tok F_Tok;
-
- static F_Tok stateF_std[] = { &PE_Expression::On_std_SwBracket_Left,
- &PE_Expression::On_std_SwBracket_Right,
- &PE_Expression::On_std_ArrayBracket_Left,
- &PE_Expression::On_std_ArrayBracket_Right,
- &PE_Expression::On_std_Bracket_Left,
- &PE_Expression::On_std_Bracket_Right,
- &PE_Expression::On_std_Semicolon,
- &PE_Expression::On_std_Comma };
- static INT16 stateT_std[] = { Tid_SwBracket_Left,
- Tid_SwBracket_Right,
- Tid_ArrayBracket_Left,
- Tid_ArrayBracket_Right,
- Tid_Bracket_Left,
- Tid_Bracket_Right,
- Tid_Semicolon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Expression, std, On_std_Default);
-}
-
-void
-PE_Expression::InitData()
-{
- pStati->SetCur(std);
- aResult_Text.seekp(0);
- nBracketCounter = 0;
-}
-
-void
-PE_Expression::TransferData()
-{
- pStati->SetCur(size_of_states);
- if ( aResult_Text.tellp() > 0)
- aResult_Text.pop_back(1);
-}
-
-void
-PE_Expression::On_std_Default( const char * i_sText)
-{
- SetTokenResult(done, stay);
- aResult_Text << i_sText << " ";
-}
-
-void
-PE_Expression::On_std_SwBracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_SwBracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_ArrayBracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_ArrayBracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Bracket_Left( const char *)
-{
- SetTokenResult(done, stay);
- nBracketCounter++;
-}
-
-void
-PE_Expression::On_std_Bracket_Right( const char *)
-{
- nBracketCounter--;
- if ( nBracketCounter >= 0 )
- SetTokenResult(done, stay);
- else
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Semicolon( const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Expression::On_std_Comma( const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_expr.hxx b/autodoc/source/parser/cpp/pe_expr.hxx
deleted file mode 100644
index 8c1b5a94af9d..000000000000
--- a/autodoc/source/parser/cpp/pe_expr.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- 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_CPP_PE_EXPR_HXX
-#define ADC_CPP_PE_EXPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class PE_Expression : public Cpp_PE
-{
- public:
- enum E_State
- {
- std,
- size_of_states
- };
- PE_Expression(
- Cpp_PE * i_pParent );
- ~PE_Expression();
-
- const char * Result_Text() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void On_std_Default( const char *);
-
- void On_std_SwBracket_Left( const char *);
- void On_std_SwBracket_Right( const char *);
- void On_std_ArrayBracket_Left( const char *);
- void On_std_ArrayBracket_Right( const char *);
- void On_std_Bracket_Left( const char *);
- void On_std_Bracket_Right( const char *);
- void On_std_Semicolon( const char *);
- void On_std_Comma( const char *);
-
- // DATA
- Dyn< PeStatusArray<PE_Expression> >
- pStati;
-
- csv::StreamStr aResult_Text;
-
- intt nBracketCounter;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const char *
-PE_Expression::Result_Text() const
-{
- return aResult_Text.c_str();
-}
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_file.cxx b/autodoc/source/parser/cpp/pe_file.cxx
deleted file mode 100644
index 6160f97b89b8..000000000000
--- a/autodoc/source/parser/cpp/pe_file.cxx
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_file.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include "pe_defs.hxx"
-#include "pe_enum.hxx"
-#include "pe_namsp.hxx"
-#include "pe_tpltp.hxx"
-#include "pe_tydef.hxx"
-#include "pe_vafu.hxx"
-#include "pe_ignor.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp
-{
-
-PE_File::PE_File( cpp::PeEnvironment & io_rEnv)
- : Cpp_PE(io_rEnv),
- pEnv(&io_rEnv),
- pStati( new PeStatusArray<PE_File> ),
- // pSpNamespace,
- // pSpTypedef,
- // pSpVarFunc,
- // pSpIgnore,
- // pSpuNamespace,
- // pSpuClass,
- // pSpuTypedef,
- // pSpuVarFunc,
- // pSpuTemplate,
- // pSpuUsing,
- // pSpuIgnoreFailure,
- bWithinSingleExternC(false)
-{
- Setup_StatusFunctions();
-
- pSpNamespace = new SP_Namespace(*this);
- pSpTypedef = new SP_Typedef(*this);
- pSpVarFunc = new SP_VarFunc(*this);
- pSpTemplate = new SP_Template(*this);
- pSpDefs = new SP_Defines(*this);
- pSpIgnore = new SP_Ignore(*this);
-
- pSpuNamespace = new SPU_Namespace(*pSpNamespace, 0, 0);
- pSpuTypedef = new SPU_Typedef(*pSpTypedef, 0, 0);
- pSpuVarFunc = new SPU_VarFunc(*pSpVarFunc, 0, &PE_File::SpReturn_VarFunc);
- pSpuTemplate = new SPU_Template(*pSpTemplate, 0, &PE_File::SpReturn_Template);
- pSpuDefs = new SPU_Defines(*pSpDefs, 0, 0);
- pSpuUsing = new SPU_Ignore(*pSpIgnore, 0, 0);
- pSpuIgnoreFailure
- = new SPU_Ignore(*pSpIgnore, 0, 0);
-}
-
-PE_File::~PE_File()
-{
-}
-
-void
-PE_File::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-Cpp_PE *
-PE_File::Handle_ChildFailure()
-{
- SetCurSPU(pSpuIgnoreFailure.Ptr());
- return &pSpuIgnoreFailure->Child();
-}
-
-void
-PE_File::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_File>::F_Tok F_Tok;
- static F_Tok stateF_std[] = { &PE_File::On_std_VarFunc,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_ClassKey,
- &PE_File::On_std_enum,
-
- &PE_File::On_std_typedef,
- &PE_File::On_std_template,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_extern,
-
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_namespace,
- &PE_File::On_std_using,
-
- &PE_File::On_std_SwBracketRight,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_DefineName,
- &PE_File::On_std_MacroName,
-
- &PE_File::On_std_VarFunc,
- &PE_File::On_std_VarFunc };
-
- static INT16 stateT_std[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
-
- Tid_typedef,
- Tid_template,
- Tid_const,
- Tid_volatile,
- Tid_extern,
-
- Tid_static,
- Tid_register,
- Tid_inline,
- Tid_namespace,
- Tid_using,
-
- Tid_SwBracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_DefineName,
- Tid_MacroName,
-
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_in_extern[] = { &PE_File::On_in_extern_Constant };
- static INT16 stateT_in_extern[] = { Tid_Constant };
-
- static F_Tok stateF_in_externC[] = { &PE_File::On_in_externC_SwBracket_Left };
- static INT16 stateT_in_externC[] = { Tid_SwBracket_Left };
-
-
- SEMPARSE_CREATE_STATUS(PE_File, std, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_File, in_extern, On_in_extern_Ignore);
- SEMPARSE_CREATE_STATUS(PE_File, in_externC, On_in_externC_NoBlock);
-}
-
-void
-PE_File::InitData()
-{
- pStati->SetCur(std);
-}
-
-void
-PE_File::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_File::Hdl_SyntaxError( const char * i_sText)
-{
- if ( *i_sText == ';' )
- {
- Cerr() << Env().CurFileName() << ", line "
- << Env().LineCount()
- << ": Sourcecode warning: ';' as a toplevel declaration is deprecated."
- << Endl();
- SetTokenResult(done,stay);
- return;
- }
-
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_File::SpReturn_VarFunc()
-{
- if (bWithinSingleExternC)
- {
- access_Env().CloseBlock();
- bWithinSingleExternC = false;
- }
-}
-
-void
-PE_File::SpReturn_Template()
-{
- access_Env().OpenTemplate( pSpuTemplate->Child().Result_Parameters() );
-}
-
-void
-PE_File::On_std_namespace(const char * )
-{
- pSpuNamespace->Push(done);
-}
-
-void
-PE_File::On_std_ClassKey(const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // classes are parsed via PE_Type.
-}
-
-void
-PE_File::On_std_typedef(const char * )
-{
- pSpuTypedef->Push(not_done);
-}
-
-void
-PE_File::On_std_enum(const char * )
-{
- pSpuVarFunc->Push(not_done); // This is correct,
- // enums are parsed via PE_Type.
-}
-
-void
-PE_File::On_std_VarFunc(const char * )
-{
- pSpuVarFunc->Push(not_done);
-}
-
-void
-PE_File::On_std_template(const char * )
-{
- pSpuTemplate->Push(done);
-}
-
-void
-PE_File::On_std_extern(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(in_extern);
-}
-
-void
-PE_File::On_std_using(const char * )
-{
- pSpuUsing->Push(done);
-}
-
-void
-PE_File::On_std_SwBracketRight(const char * )
-{
- SetTokenResult(done,stay);
- access_Env().CloseBlock();
-}
-
-void
-PE_File::On_std_DefineName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_File::On_std_MacroName(const char * )
-{
- pSpuDefs->Push(not_done);
-}
-
-void
-PE_File::On_in_extern_Constant(const char * )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(in_externC);
-
- access_Env().OpenExternC();
-}
-
-void
-PE_File::On_in_extern_Ignore(const char * )
-{
- SetTokenResult(not_done, stay);
- pStati->SetCur(std);
-}
-
-void
-PE_File::On_in_externC_SwBracket_Left(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(std);
-}
-
-void
-PE_File::On_in_externC_NoBlock(const char * )
-{
- SetTokenResult(not_done, stay);
- pStati->SetCur(std);
-
- bWithinSingleExternC = true;
-}
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_file.hxx b/autodoc/source/parser/cpp/pe_file.hxx
deleted file mode 100644
index 7a36f2c6fe9c..000000000000
--- a/autodoc/source/parser/cpp/pe_file.hxx
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- 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_CPP_PE_FILE_HXX
-#define ADC_CPP_PE_FILE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
- class PeEnvironment;
-
- class PE_Namespace;
- class PE_Enum;
- class PE_Typedef;
- class PE_VarFunc;
- class PE_TemplateTop;
- class PE_Defines;
- class PE_Ignore;
-
-class PE_File : public Cpp_PE
-{
- public:
- enum E_State
- {
- std, /// before class, struct or union
- in_extern,
- in_externC,
- size_of_states
- };
-
- PE_File(
- PeEnvironment & io_rEnv );
- ~PE_File();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- virtual Cpp_PE * Handle_ChildFailure();
-
- private:
- typedef SubPe< PE_File, PE_Namespace> SP_Namespace;
- typedef SubPe< PE_File, PE_Typedef> SP_Typedef;
- typedef SubPe< PE_File, PE_VarFunc> SP_VarFunc;
- typedef SubPe< PE_File, PE_TemplateTop> SP_Template;
- typedef SubPe< PE_File, PE_Defines> SP_Defines;
- typedef SubPe< PE_File, PE_Ignore > SP_Ignore;
-
- typedef SubPeUse< PE_File, PE_Namespace> SPU_Namespace;
- typedef SubPeUse< PE_File, PE_Typedef> SPU_Typedef;
- typedef SubPeUse< PE_File, PE_VarFunc> SPU_VarFunc;
- typedef SubPeUse< PE_File, PE_TemplateTop> SPU_Template;
- typedef SubPeUse< PE_File, PE_Defines> SPU_Defines;
- typedef SubPeUse< PE_File, PE_Ignore> SPU_Ignore;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_VarFunc();
- void SpReturn_Template();
-
- void On_std_namespace(const char * i_sText);
- void On_std_ClassKey(const char * i_sText);
- void On_std_typedef(const char * i_sText);
- void On_std_enum(const char * i_sText);
- void On_std_VarFunc(const char * i_sText);
- void On_std_template(const char * i_sText);
- void On_std_extern(const char * i_sText);
- void On_std_using(const char * i_sText);
- void On_std_SwBracketRight(const char * i_sText);
-
- void On_std_DefineName(const char * i_sText);
- void On_std_MacroName(const char * i_sText);
-
- void On_in_extern_Constant(const char * i_sText);
- void On_in_extern_Ignore(const char * i_sText);
- void On_in_externC_SwBracket_Left(const char * i_sText);
- void On_in_externC_NoBlock(const char * i_sText);
-
- PeEnvironment & access_Env() { return *pEnv; }
-
-
- // DATA
- PeEnvironment * pEnv;
-
- Dyn< PeStatusArray<PE_File> >
- pStati;
-
- Dyn<SP_Namespace> pSpNamespace;
- Dyn<SP_Typedef> pSpTypedef;
- Dyn<SP_VarFunc> pSpVarFunc;
- Dyn<SP_Template> pSpTemplate;
- Dyn<SP_Defines> pSpDefs;
-
- Dyn<SP_Ignore> pSpIgnore;
-
- Dyn<SPU_Namespace> pSpuNamespace;
- Dyn<SPU_Typedef> pSpuTypedef;
- Dyn<SPU_VarFunc> pSpuVarFunc;
- Dyn<SPU_Template> pSpuTemplate;
- Dyn<SPU_Defines> pSpuDefs;
-
- Dyn<SPU_Ignore> pSpuUsing;
- Dyn<SPU_Ignore> pSpuIgnoreFailure;
-
- bool bWithinSingleExternC; /** After 'extern "C"' without following '{',
- waiting for the next function or variable to
- set back to false.
- */
-};
-
-} // namespace cpp
-
-
-
-/* // Branches
-
-namespace
- -> Named Namespace declaration
- -> Unnamed Namespace declaration
- -> Namespace alias definition
-
-class struct union
- -> Class
- -> Predeclaration
-
-typedef
- -> Typedef
-
-enum
- -> Enum
-
-extern
- -> Extern-"C"
- -> TypeDeclaration
-
-TypeDeclaration
- -> FunctionDecl
- -> FunctionDef
- -> Variable
-
-template
- -> TemplateClass
- -> TemplateFunction
- -> TemplateFunction/Method-Implementation
- -> TemplatePredeclaration
-
-}
- -> End of Namespace
- -> End of Extern-"C"
-
-asm
- -> AssemblerDeclaration
-
-using
- -> Using-Declaration
- -> Using-Directive
-
-*/
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_funct.cxx b/autodoc/source/parser/cpp/pe_funct.cxx
deleted file mode 100644
index 081f369a0c9c..000000000000
--- a/autodoc/source/parser/cpp/pe_funct.cxx
+++ /dev/null
@@ -1,612 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_funct.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_funct.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include "pe_type.hxx"
-#include "pe_param.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-inline void
-PE_Function::PerformFinishingPunctuation()
-{
- SetTokenResult(not_done,pop_success);
-}
-
-
-PE_Function::PE_Function( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Function> ),
- // pSpParameter,
- // pSpuParameter,
- // pSpType,
- // pSpuException,
- // pSpuCastOperatorType,
- nResult(0),
- bResult_WithImplementation(false),
- aName(60),
- eVirtuality(ary::cpp::VIRTUAL_none),
- eConVol(ary::cpp::CONVOL_none),
- // aFlags,
- nReturnType(0),
- // aParameters
- // aExceptions,
- bThrow(false),
- nBracketCounterInImplementation(0)
-{
- Setup_StatusFunctions();
-
- pSpParameter = new SP_Parameter(*this);
- pSpType = new SP_Type(*this);
-
- pSpuParameter = new SPU_Parameter(*pSpParameter, 0, &PE_Function::SpReturn_Parameter);
- pSpuException = new SPU_Type(*pSpType, 0, &PE_Function::SpReturn_Exception);
- pSpuCastOperatorType = new SPU_Type(*pSpType, &PE_Function::SpInit_CastOperatorType, &PE_Function::SpReturn_CastOperatorType);
-}
-
-PE_Function::~PE_Function()
-{
-
-}
-
-void
-PE_Function::Init_Std( const String & i_sName,
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << i_sName;
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = i_nReturnType;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_Ctor( const String & i_sName,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << i_sName;
- eVirtuality = ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_Dtor( const String & i_sName,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "~" << i_sName;
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterName);
-}
-
-void
-PE_Function::Init_CastOperator( bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "operator ";
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = 0;
- pStati->SetCur(afterCastOperator);
-}
-
-void
-PE_Function::Init_NormalOperator( ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags i_aFlags )
-{
- aName << "operator";
- eVirtuality = i_bVirtual ? ary::cpp::VIRTUAL_virtual : ary::cpp::VIRTUAL_none;
- aFlags = i_aFlags;
- nReturnType = i_nReturnType;
- pStati->SetCur(afterStdOperator);
-}
-
-ary::cpp::Ce_id
-PE_Function::Result_Id() const
-{
- return nResult;
-}
-
-void
-PE_Function::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Function::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Function>::F_Tok F_Tok;
-
- static F_Tok stateF_afterStdOperator[] =
- { &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_LeftBracket,
- &PE_Function::On_afterOperator_Std_LeftBracket,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator,
- &PE_Function::On_afterOperator_Std_Operator };
- static INT16 stateT_afterStdOperator[] =
- { Tid_Operator,
- Tid_ArrayBracket_Left,
- Tid_Bracket_Left,
- Tid_Comma,
- Tid_Assign,
- Tid_Less,
- Tid_Greater,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- static F_Tok stateF_afterStdOperatorLeftBracket[] =
- { &PE_Function::On_afterStdOperatorLeftBracket_RightBracket,
- &PE_Function::On_afterStdOperatorLeftBracket_RightBracket };
- static INT16 stateT_afterStdOperatorLeftBracket[] =
- { Tid_ArrayBracket_Right,
- Tid_Bracket_Right };
-
- static F_Tok stateF_afterCastOperator[] =
- { &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type,
- &PE_Function::On_afterOperator_Cast_Type };
- static INT16 stateT_afterCastOperator[] =
- { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_const,
- Tid_volatile,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_afterName[] = { &PE_Function::On_afterName_Bracket_Left };
- static INT16 stateT_afterName[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_expectParameterSeparator[] =
- { &PE_Function::On_expectParameterSeparator_BracketRight,
- &PE_Function::On_expectParameterSeparator_Comma };
- static INT16 stateT_expectParameterSeparator[] =
- { Tid_Bracket_Right,
- Tid_Comma };
-
- static F_Tok stateF_afterParameters[] = { &PE_Function::On_afterParameters_const,
- &PE_Function::On_afterParameters_volatile,
- &PE_Function::On_afterParameters_throw,
- &PE_Function::On_afterParameters_SwBracket_Left,
- &PE_Function::On_afterParameters_Semicolon,
- &PE_Function::On_afterParameters_Comma,
- &PE_Function::On_afterParameters_Colon,
- &PE_Function::On_afterParameters_Assign };
- static INT16 stateT_afterParameters[] = { Tid_const,
- Tid_volatile,
- Tid_throw,
- Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Colon,
- Tid_Assign };
-
- static F_Tok stateF_afterThrow[] = { &PE_Function::On_afterThrow_Bracket_Left };
- static INT16 stateT_afterThrow[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_expectExceptionSeparator[] =
- { &PE_Function::On_expectExceptionSeparator_BracketRight,
- &PE_Function::On_expectExceptionSeparator_Comma };
- static INT16 stateT_expectExceptionSeparator[] =
- { Tid_Bracket_Right,
- Tid_Comma };
-
- static F_Tok stateF_afterExceptions[] = { &PE_Function::On_afterExceptions_SwBracket_Left,
- &PE_Function::On_afterExceptions_Semicolon,
- &PE_Function::On_afterExceptions_Comma,
- &PE_Function::On_afterExceptions_Colon,
- &PE_Function::On_afterExceptions_Assign };
- static INT16 stateT_afterExceptions[] = { Tid_SwBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Colon,
- Tid_Assign };
-
- static F_Tok stateF_expectZero[] = { &PE_Function::On_expectZero_Constant };
- static INT16 stateT_expectZero[] = { Tid_Constant };
-
- static F_Tok stateF_inImplementation[] =
- { &PE_Function::On_inImplementation_SwBracket_Left,
- &PE_Function::On_inImplementation_SwBracket_Right };
- static INT16 stateT_inImplementation[] =
- { Tid_SwBracket_Left,
- Tid_SwBracket_Right };
-
- SEMPARSE_CREATE_STATUS(PE_Function, afterStdOperator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterStdOperatorLeftBracket, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterCastOperator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectParameterSeparator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterParameters, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterThrow, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectExceptionSeparator, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, afterExceptions, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, expectZero, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Function, inImplementation, On_inImplementation_Default );
-}
-
-void
-PE_Function::InitData()
-{
- pStati->SetCur( afterName ),
- nResult = 0;
- bResult_WithImplementation = false;
- aName.seekp(0);
- eVirtuality = ary::cpp::VIRTUAL_none;
- eConVol = ary::cpp::CONVOL_none;
- aFlags.Reset();
- nReturnType = 0;
- csv::erase_container(aParameters);
- csv::erase_container(aExceptions);
- bThrow = false;
-}
-
-void
-PE_Function::TransferData()
-{
- String sName( aName.c_str() );
- ary::cpp::Function *
- pFunction = Env().AryGate().Ces().Store_Operation(
- Env().Context(),
- sName,
- nReturnType,
- aParameters,
- eVirtuality,
- eConVol,
- aFlags,
- bThrow,
- aExceptions );
- if (pFunction != 0)
- {
- // KORR_FUTURE: How to handle differing documentation?
-
- Dyn< StringVector >
- pTplParams ( Env().Get_CurTemplateParameters() );
- if ( pTplParams )
- {
- for ( StringVector::const_iterator it = pTplParams->begin();
- it != pTplParams->end();
- ++it )
- {
- pFunction->Add_TemplateParameterType( *it, ary::cpp::Type_id(0) );
- } // end for
- }
-
- Env().Event_Store_Function(*pFunction);
- }
-
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Function::Hdl_SyntaxError(const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Function::SpInit_CastOperatorType()
-{
- pSpuCastOperatorType->Child().Init_AsCastOperatorType();
-}
-
-void
-PE_Function::SpReturn_Parameter()
-{
- pStati->SetCur(expectParameterSeparator);
-
- ary::cpp::Type_id nParamType = pSpuParameter->Child().Result_FrontType();
- if ( nParamType.IsValid() ) // Check, if there was a parameter, or only the closing ')'.
- {
- aParameters.push_back( pSpuParameter->Child().Result_ParamInfo() );
- }
-}
-
-void
-PE_Function::SpReturn_Exception()
-{
- pStati->SetCur(expectExceptionSeparator);
-
- ary::cpp::Type_id
- nException = pSpuException->Child().Result_Type().TypeId();
- if ( nException.IsValid() AND pSpuException->Child().Result_KindOf() == PE_Type::is_type )
- {
- aExceptions.push_back( nException );
- }
-}
-
-void
-PE_Function::SpReturn_CastOperatorType()
-{
- pStati->SetCur(afterName);
-
- Env().AryGate().Types().Get_TypeText(
- aName, pSpuCastOperatorType->Child().Result_Type().TypeId() );
-}
-
-void
-PE_Function::On_afterOperator_Std_Operator(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterName);
-
- if ( 'a' <= *i_sText AND *i_sText <= 'z' )
- aName << ' ';
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterOperator_Std_LeftBracket(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterStdOperatorLeftBracket);
-
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterStdOperatorLeftBracket_RightBracket(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterName);
-
- aName << i_sText;
-}
-
-void
-PE_Function::On_afterOperator_Cast_Type(const char *)
-{
- pSpuCastOperatorType->Push(not_done);
-}
-
-void
-PE_Function::On_afterName_Bracket_Left(const char *)
-{
- pSpuParameter->Push(done);
-}
-
-void
-PE_Function::On_expectParameterSeparator_BracketRight(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterParameters);
-}
-
-void
-PE_Function::On_expectParameterSeparator_Comma(const char *)
-{
- pSpuParameter->Push(done);
-}
-
-void
-PE_Function::On_afterParameters_const(const char *)
-{
- SetTokenResult(done,stay);
- eConVol = static_cast<E_ConVol>(
- static_cast<int>(eConVol) | static_cast<int>(ary::cpp::CONVOL_const) );
-}
-
-void
-PE_Function::On_afterParameters_volatile(const char *)
-{
- SetTokenResult(done,stay);
- eConVol = static_cast<E_ConVol>(
- static_cast<int>(eConVol) | static_cast<int>(ary::cpp::CONVOL_volatile) );
-}
-
-void
-PE_Function::On_afterParameters_throw(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterThrow);
- bThrow = true;
-}
-
-void
-PE_Function::On_afterParameters_SwBracket_Left(const char *)
-{
- EnterImplementation(1);
-}
-
-void
-PE_Function::On_afterParameters_Semicolon(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterParameters_Comma(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterParameters_Colon(const char *)
-{
- EnterImplementation(0);
-}
-
-void
-PE_Function::On_afterParameters_Assign(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expectZero);
-}
-
-void
-PE_Function::On_afterThrow_Bracket_Left(const char *)
-{
- pSpuException->Push(done);
-}
-
-void
-PE_Function::On_expectExceptionSeparator_BracketRight(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(afterExceptions);
-}
-
-void
-PE_Function::On_expectExceptionSeparator_Comma(const char *)
-{
- pSpuException->Push(done);
-}
-
-void
-PE_Function::On_afterExceptions_SwBracket_Left(const char *)
-{
- EnterImplementation(1);
-}
-
-void
-PE_Function::On_afterExceptions_Semicolon(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterExceptions_Comma(const char *)
-{
- PerformFinishingPunctuation();
-}
-
-void
-PE_Function::On_afterExceptions_Colon(const char *)
-{
- EnterImplementation(0);
-}
-
-void
-PE_Function::On_afterExceptions_Assign(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expectZero);
-}
-
-void
-PE_Function::On_expectZero_Constant(const char * i_sText)
-{
- if ( strcmp(i_sText,"0") != 0 )
- Hdl_SyntaxError(i_sText);
-
- SetTokenResult(done,stay);
- pStati->SetCur(afterExceptions);
-
- eVirtuality = ary::cpp::VIRTUAL_abstract;
-}
-
-void
-PE_Function::On_inImplementation_SwBracket_Left(const char *)
-{
- SetTokenResult(done,stay);
- nBracketCounterInImplementation++;
-}
-
-void
-PE_Function::On_inImplementation_SwBracket_Right(const char *)
-{
- nBracketCounterInImplementation--;
- if (nBracketCounterInImplementation == 0)
- {
- SetTokenResult(done,pop_success);
- }
- else
- {
- SetTokenResult(done,stay);
- }
-}
-
-void
-PE_Function::On_inImplementation_Default(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Function::EnterImplementation( intt i_nBracketCountStart )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(inImplementation);
-
- bResult_WithImplementation = true;
- nBracketCounterInImplementation = i_nBracketCountStart;
- if ( Env().Context().CurClass() != 0 )
- {
- aFlags.SetInline();
- }
-}
-
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_funct.hxx b/autodoc/source/parser/cpp/pe_funct.hxx
deleted file mode 100644
index 2f6a183150bb..000000000000
--- a/autodoc/source/parser/cpp/pe_funct.hxx
+++ /dev/null
@@ -1,283 +0,0 @@
-/* -*- 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_CPP_PE_FUNCT_HXX
-#define ADC_CPP_PE_FUNCT_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
- // PARAMETERS
-
-
-namespace ary
-{
-namespace cpp
-{
-class Function;
-struct S_VariableInfo;
-}
-}
-
-namespace cpp
-{
-
-class PE_Type;
-class PE_Parameter;
-
-class PE_Function : public Cpp_PE
-{
- public:
- enum E_State
- {
- afterStdOperator, // if initializes as operator
- afterStdOperatorLeftBracket,
- // if initializes as operator with ( or [
- afterCastOperator, // if initializes as operator
- afterName, // undecided
- expectParameterSeparator, //
- afterParameters, // before const, volatile throw or = 0.
- afterThrow, // expect (
- expectExceptionSeparator, //
- afterExceptions, // = 0 oder ; oder ,
- expectZero, // after '='
- inImplementation, // after {
- size_of_states
- };
- typedef ary::cpp::E_Protection E_Protection;
- typedef ary::cpp::E_Virtuality E_Virtuality;
- typedef ary::cpp::E_ConVol E_ConVol;
-
- PE_Function(
- Cpp_PE * i_pParent );
- ~PE_Function();
-
- void Init_Std(
- const String & i_sName,
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_Ctor(
- const String & i_sName,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_Dtor(
- const String & i_sName,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_CastOperator(
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
- void Init_NormalOperator(
- ary::cpp::Type_id i_nReturnType,
- bool i_bVirtual,
- ary::cpp::FunctionFlags
- i_aFlags );
-
- ary::cpp::Ce_id Result_Id() const;
- bool Result_WithImplementation() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- typedef SubPe< PE_Function, PE_Type > SP_Type;
- typedef SubPeUse< PE_Function, PE_Type > SPU_Type;
- typedef SubPe< PE_Function, PE_Parameter> SP_Parameter;
- typedef SubPeUse<PE_Function, PE_Parameter> SPU_Parameter;
-
- typedef std::vector<ary::cpp::S_Parameter> ParameterList;
- typedef std::vector<ary::cpp::Type_id> ExceptionTypeList;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char * i_sText);
-
- void SpInit_CastOperatorType();
-
- void SpReturn_Parameter();
- void SpReturn_Exception();
- void SpReturn_CastOperatorType();
-
- void On_afterOperator_Std_Operator(const char * i_sText); // Operator+() etc.
- void On_afterOperator_Std_LeftBracket(const char * i_sText); // operator [] or ()
- void On_afterStdOperatorLeftBracket_RightBracket(const char * i_sText);
- void On_afterOperator_Cast_Type(const char * i_sText); // Type
-
- void On_afterName_Bracket_Left(const char * i_sText);
-
- void On_expectParameterSeparator_BracketRight(const char * i_sText);
- void On_expectParameterSeparator_Comma(const char * i_sText);
-
- void On_afterParameters_const(const char * i_sText);
- void On_afterParameters_volatile(const char * i_sText);
- void On_afterParameters_throw(const char * i_sText);
- void On_afterParameters_SwBracket_Left(const char * i_sText);
- void On_afterParameters_Semicolon(const char * i_sText);
- void On_afterParameters_Comma(const char * i_sText);
- void On_afterParameters_Colon(const char * i_sText);
- void On_afterParameters_Assign(const char * i_sText);
-
- void On_afterThrow_Bracket_Left(const char * i_sText);
-
- void On_expectExceptionSeparator_BracketRight(const char * i_sText);
- void On_expectExceptionSeparator_Comma(const char * i_sText);
-
- void On_afterExceptions_SwBracket_Left(const char * i_sText);
- void On_afterExceptions_Semicolon(const char * i_sText);
- void On_afterExceptions_Comma(const char * i_sText);
- void On_afterExceptions_Colon(const char * i_sText);
- void On_afterExceptions_Assign(const char * i_sText);
-
- void On_expectZero_Constant(const char * i_sText);
-
- void On_inImplementation_SwBracket_Left(const char * i_sText);
- void On_inImplementation_SwBracket_Right(const char * i_sText);
- void On_inImplementation_Default(const char * i_sText);
-
- void PerformFinishingPunctuation();
- void EnterImplementation(
- intt i_nBracketCountStart ); /// 1 normally, 0 in initialisation section of c'tors.
-
- // DATA
- Dyn< PeStatusArray<PE_Function> >
- pStati;
-
- Dyn< SP_Parameter > pSpParameter;
- Dyn< SPU_Parameter> pSpuParameter;
- Dyn< SP_Type > pSpType;
- Dyn< SPU_Type > pSpuException;
- Dyn< SPU_Type > pSpuCastOperatorType; // in "operator int()" or "operator ThatClass *()"
-
- ary::cpp::Ce_id nResult;
- bool bResult_WithImplementation; // Necessary for the parent ParseEnvironment
- // to know, there is no semicolon or comma following.
- // Pre results
- StreamStr aName;
- E_Virtuality eVirtuality;
- E_ConVol eConVol;
- ary::cpp::FunctionFlags
- aFlags;
- ary::cpp::Type_id nReturnType;
- ParameterList aParameters;
- ExceptionTypeList aExceptions;
- bool bThrow; // Indicates, if there is a throw - important, if there are 0 exceptions listed.
- intt nBracketCounterInImplementation;
-};
-
-
-
-
-// IMPLEMENTATION
-inline bool
-PE_Function::Result_WithImplementation() const
- { return bResult_WithImplementation; }
-
-
-
-
-} // namespace cpp
-#endif
-
-
-
-
-
-/* // Overview of statuses
-
-Undecided
----------
-
-start // before and inside storage class specifiers
-
-->Typ
-
-expectName // type is there
-
-afterName
-
-
-
-
-Variable
---------
-
-start // before and inside storage class specifiers
-
-->Typ
-
-expectName // type is there -> in case of '(': notyetimplemented
-afterName
-
-expectSize // after [
-expectFinish
- // before ; or ,
-expectNextVarName // in contrast to expectName here can also be a * or &
-
-
-
-
-Function
---------
-
-start // before and inside storage class specifiers
-
-->Typ
-
-expectName // type is there
-expectBracket // after name
-expectParameter // after ( or ,
--> Parameter
-after Parameters // before const, volatile throw or = 0.
-after throw // expect (
-expectException // after (
-after exceptions // = 0 oder ; oder ,
-
-
-expectNextVarName // in contrast to expectName here can also be a * or &
-
-
-
-
-
-
-
-*/
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_ignor.cxx b/autodoc/source/parser/cpp/pe_ignor.cxx
deleted file mode 100644
index 67db5593c736..000000000000
--- a/autodoc/source/parser/cpp/pe_ignor.cxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_ignor.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-
-
-namespace cpp {
-
-
-
-PE_Ignore::PE_Ignore( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- nBracketCounter(0),
- bBlockOpened(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_Ignore::~PE_Ignore()
-{
-}
-
-void
-PE_Ignore::Call_Handler( const cpp::Token & i_rTok )
-{
- if ( NOT bBlockOpened )
- {
- switch (i_rTok.TypeId())
- {
- case Tid_SwBracket_Left: SetTokenResult(done, stay);
- nBracketCounter++;
- bBlockOpened = true;
- break;
- case Tid_Semicolon: SetTokenResult(done, pop_success);
- break;
- default:
- SetTokenResult(done, stay);
- } // end switch
- }
- else if ( nBracketCounter > 0 )
- {
- SetTokenResult(done, stay);
-
- switch (i_rTok.TypeId())
- {
- case Tid_SwBracket_Left: nBracketCounter++;
- break;
- case Tid_SwBracket_Right: nBracketCounter--;
- break;
- } // end switch
- }
- else if ( i_rTok.TypeId() == Tid_Semicolon )
- {
- SetTokenResult(done, pop_success);
- }
- else
- {
- SetTokenResult(not_done, pop_success);
- }
-}
-
-void
-PE_Ignore::Setup_StatusFunctions()
-{
- // Does nothing.
-}
-
-void
-PE_Ignore::InitData()
-{
- nBracketCounter = 0;
- bBlockOpened = false;
-}
-
-void
-PE_Ignore::TransferData()
-{
- // Does nothing.
-}
-
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_ignor.hxx b/autodoc/source/parser/cpp/pe_ignor.hxx
deleted file mode 100644
index 7efb2757479b..000000000000
--- a/autodoc/source/parser/cpp/pe_ignor.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- 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_CPP_PE_IGNOR_HXX
-#define ADC_CPP_PE_IGNOR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <cpp_pe.hxx>
- // COMPONENTS
- // PARAMETERS
-
-
-namespace cpp {
-
-
-class PE_Ignore : public Cpp_PE
-{
- public:
- PE_Ignore(
- Cpp_PE * i_pParent );
- ~PE_Ignore();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
-
- // DATA
- uintt nBracketCounter;
- bool bBlockOpened;
-};
-
-
-
-// IMPLEMENTATION
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_namsp.cxx b/autodoc/source/parser/cpp/pe_namsp.cxx
deleted file mode 100644
index bf9ca483abbe..000000000000
--- a/autodoc/source/parser/cpp/pe_namsp.cxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include <pe_namsp.hxx>
-
-
-// NOT FULLY DECLARED SERVICES
-#include <all_toks.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <semantic/callf.hxx>
-#include "x_parse.hxx"
-
-
-
-
-namespace cpp
-{
-
-PE_Namespace::PE_Namespace( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Namespace> ),
- // sLocalname
- bPush(false)
-{
- Setup_StatusFunctions();
-}
-
-PE_Namespace::~PE_Namespace()
-{
-}
-
-void
-PE_Namespace::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Namespace>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Namespace::On_start_Identifier,
- &PE_Namespace::On_start_SwBracket_Left };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_SwBracket_Left };
- static F_Tok stateF_gotName[] = { &PE_Namespace::On_gotName_SwBracket_Left,
- &PE_Namespace::On_gotName_Assign };
- static INT16 stateT_gotName[] = { Tid_SwBracket_Left,
- Tid_Assign };
- static F_Tok stateF_expectSemicolon[] = { &PE_Namespace::On_expectSemicolon_Semicolon };
- static INT16 stateT_expectSemicolon[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Namespace, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Namespace, gotName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Namespace, expectSemicolon, Hdl_SyntaxError);
-}
-
-void
-PE_Namespace::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Namespace::InitData()
-{
- pStati->SetCur(start);
- sLocalName = "";
- bPush = false;
-}
-
-void
-PE_Namespace::TransferData()
-{
- if (bPush)
- {
- ary::cpp::Namespace &
- rNew = Env().AryGate().Ces().CheckIn_Namespace(
- Env().Context(),
- sLocalName );
- Env().OpenNamespace(rNew);
- }
-}
-
-void
-PE_Namespace::Hdl_SyntaxError( const char * i_sText)
-{
- throw X_Parser( X_Parser::x_UnexpectedToken,
- i_sText != 0 ? i_sText : "",
- Env().CurFileName(),
- Env().LineCount() );
-}
-
-void
-PE_Namespace::On_start_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(gotName);
-
- sLocalName = i_sText;
-}
-
-void
-PE_Namespace::On_start_SwBracket_Left(const char * )
-{
- SetTokenResult(done, pop_success);
- pStati->SetCur(size_of_states);
-
- sLocalName = ""; // Anonymous namespace, a name is created in
- // Gate().CheckIn_Namespace() .
-
- bPush = true;
-}
-
-void
-PE_Namespace::On_gotName_SwBracket_Left(const char * )
-{
- SetTokenResult(done, pop_success);
- pStati->SetCur(size_of_states);
-
- bPush = true;
-}
-
-void
-PE_Namespace::On_gotName_Assign(const char * )
-{
- // KORR_FUTURE
- Hdl_SyntaxError(0);
-}
-
-void
-PE_Namespace::On_expectSemicolon_Semicolon(const char * )
-{
- SetTokenResult(done,pop_success);
- pStati->SetCur(size_of_states);
-}
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_namsp.hxx b/autodoc/source/parser/cpp/pe_namsp.hxx
deleted file mode 100644
index d07ab61ad3b7..000000000000
--- a/autodoc/source/parser/cpp/pe_namsp.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- 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_CPP_PE_NAMSP_HXX
-#define ADC_CPP_PE_NAMSP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_pe.hxx>
- // PARAMETERS
-
-namespace ary
-{
-namespace cpp
-{
-class Namespace;
-}
-}
-
-
-namespace cpp
-{
-
-
-class PE_Namespace : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- gotName,
- expectSemicolon, /// after namespace assignment
- size_of_states
- };
- PE_Namespace(
- Cpp_PE * i_pParent );
- ~PE_Namespace();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- ary::cpp::Namespace *
- Result_OpenedNamespace() const;
- private:
- void Setup_StatusFunctions();
-
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void On_start_Identifier(const char * i_sText);
- void On_start_SwBracket_Left(const char * i_sText);
- void On_gotName_SwBracket_Left(const char * i_sText);
- void On_gotName_Assign(const char * i_sText);
- void On_expectSemicolon_Semicolon(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Namespace> >
- pStati;
-
- String sLocalName;
- bool bPush;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_param.cxx b/autodoc/source/parser/cpp/pe_param.cxx
deleted file mode 100644
index 19ce4607d060..000000000000
--- a/autodoc/source/parser/cpp/pe_param.cxx
+++ /dev/null
@@ -1,282 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_param.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include "pe_type.hxx"
-#include "pe_vari.hxx"
-
-
-namespace cpp {
-
-
-
-//*********************** PE_Parameter ***********************//
-
-
-PE_Parameter::PE_Parameter( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Parameter> )
- // pSpType,
- // pSpuType,
- // pSpVariable,
- // pSpuVariable,
- // aResultParamInfo
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, &PE_Parameter::SpInit_Type, &PE_Parameter::SpReturn_Type);
- pSpVariable = new SP_Variable(*this);
- pSpuVariable = new SPU_Variable(*pSpVariable, &PE_Parameter::SpInit_Variable, &PE_Parameter::SpReturn_Variable);
-}
-
-PE_Parameter::~PE_Parameter()
-{
-}
-
-void
-PE_Parameter::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Parameter::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Parameter>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
-
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Bracket_Right,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Ellipse,
-
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type,
- &PE_Parameter::On_start_Type };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
-
- Tid_const,
- Tid_volatile,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_Ellipse,
-
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expectName[] = { &PE_Parameter::On_expectName_Identifier,
- &PE_Parameter::On_expectName_ArrayBracket_Left,
- &PE_Parameter::On_expectName_Bracket_Right,
- &PE_Parameter::On_expectName_Comma,
- &PE_Parameter::On_afterName_Assign };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_ArrayBracket_Left,
- Tid_Bracket_Right,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_afterName[] = { &PE_Parameter::On_afterName_ArrayBracket_Left,
- &PE_Parameter::On_afterName_Bracket_Right,
- &PE_Parameter::On_afterName_Comma,
- &PE_Parameter::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Bracket_Right,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_finished[] = { &PE_Parameter::On_finished_Comma,
- &PE_Parameter::On_finished_Bracket_Right };
- static INT16 stateT_finished[] = { Tid_Bracket_Right,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Parameter, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Parameter, finished, Hdl_SyntaxError);
-}
-
-
-void
-PE_Parameter::InitData()
-{
- pStati->SetCur(start);
- aResultParamInfo.Empty();
-}
-
-void
-PE_Parameter::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Parameter::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Parameter::SpInit_Type()
-{
- // Does nothing.
-}
-
-void
-PE_Parameter::SpInit_Variable()
-{
- // Does nothing.
-}
-
-void
-PE_Parameter::SpReturn_Type()
-{
- aResultParamInfo.nType = pSpuType->Child().Result_Type().Id();
- pStati->SetCur(expectName);
-}
-
-void
-PE_Parameter::SpReturn_Variable()
-{
- if (pSpuVariable->Child().Result_Pattern() > 0)
- {
- aResultParamInfo.sSizeExpression = pSpuVariable->Child().Result_SizeExpression();
- aResultParamInfo.sInitExpression = pSpuVariable->Child().Result_InitExpression();
- }
-}
-
-void
-PE_Parameter::On_start_Type(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_Parameter::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_start_Ellipse(const char *)
-{
- SetTokenResult(done, pop_success);
-
- aResultParamInfo.nType = Env().AryGate().Types().Tid_Ellipse();
-}
-
-void
-PE_Parameter::On_expectName_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- aResultParamInfo.sName = i_sText;
-}
-
-void
-PE_Parameter::On_expectName_ArrayBracket_Left(const char * i_sText)
-{
- On_afterName_ArrayBracket_Left(i_sText);
-}
-
-void
-PE_Parameter::On_expectName_Bracket_Right(const char * i_sText)
-{
- On_afterName_Bracket_Right(i_sText);
-}
-
-void
-PE_Parameter::On_expectName_Comma(const char * i_sText)
-{
- On_afterName_Comma(i_sText);
-}
-
-void
-PE_Parameter::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_Parameter::On_afterName_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_afterName_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_afterName_Assign(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_Parameter::On_finished_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Parameter::On_finished_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_param.hxx b/autodoc/source/parser/cpp/pe_param.hxx
deleted file mode 100644
index 44688796236f..000000000000
--- a/autodoc/source/parser/cpp/pe_param.hxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- 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_CPP_PE_PARAM_HXX
-#define ADC_CPP_PE_PARAM_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-
-
-
-
-namespace cpp
-{
- class PE_Type;
- class PE_Variable;
-
-
-
-
-class PE_Parameter : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectName,
- afterName,
- finished,
- size_of_states
- };
- typedef ary::cpp::S_Parameter S_ParamInfo;
-
- explicit PE_Parameter(
- Cpp_PE * i_pParent );
- ~PE_Parameter();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- ary::cpp::Type_id Result_FrontType() const;
- const S_ParamInfo & Result_ParamInfo() const;
-
- private:
- typedef SubPe< PE_Parameter, PE_Type > SP_Type;
- typedef SubPeUse< PE_Parameter, PE_Type > SPU_Type;
- typedef SubPe< PE_Parameter, PE_Variable > SP_Variable;
- typedef SubPeUse< PE_Parameter, PE_Variable > SPU_Variable;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpInit_Type(); // Type and Ignore.
- void SpInit_Variable();
- void SpReturn_Type();
- void SpReturn_Variable();
-
- void On_start_Type(const char * i_sText);
- void On_start_Bracket_Right(const char * i_sText);
- void On_start_Ellipse(const char * i_sText);
-
- void On_expectName_Identifier(const char * i_sText);
- void On_expectName_ArrayBracket_Left(const char * i_sText);
- void On_expectName_Bracket_Right(const char * i_sText);
- void On_expectName_Comma(const char * i_sText);
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Bracket_Right(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
-
- void On_finished_Bracket_Right(const char * i_sText);
- void On_finished_Comma(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Parameter> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
- Dyn<SP_Variable> pSpVariable;
- Dyn<SPU_Variable> pSpuVariable;
-
- S_ParamInfo aResultParamInfo;
-};
-
-
-
-
-// IMPLEMENTATION
-inline ary::cpp::Type_id
-PE_Parameter::Result_FrontType() const
-{
- return aResultParamInfo.nType;
-}
-
-inline const PE_Parameter::S_ParamInfo &
-PE_Parameter::Result_ParamInfo() const
-{
- return aResultParamInfo;
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tpltp.cxx b/autodoc/source/parser/cpp/pe_tpltp.cxx
deleted file mode 100644
index 1cbb5b47c851..000000000000
--- a/autodoc/source/parser/cpp/pe_tpltp.cxx
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_tpltp.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-
-
-
-namespace cpp {
-
-
-
-PE_TemplateTop::PE_TemplateTop( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_TemplateTop> ),
- // aResult_Parameters,
- bCurIsConstant(false)
-{
- Setup_StatusFunctions();
-}
-
-
-PE_TemplateTop::~PE_TemplateTop()
-{
-}
-
-void
-PE_TemplateTop::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_TemplateTop::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_TemplateTop>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_TemplateTop::On_start_Less };
- static INT16 stateT_start[] = { Tid_Less };
-
- static F_Tok stateF_expect_qualifier[]= { &PE_TemplateTop::On_expect_qualifier_ClassOrTypename,
- &PE_TemplateTop::On_expect_qualifier_Greater,
- &PE_TemplateTop::On_expect_qualifier_ClassOrTypename };
- static INT16 stateT_expect_qualifier[]= { Tid_class,
- Tid_Greater,
- Tid_typename };
-
- static F_Tok stateF_expect_name[] = { &PE_TemplateTop::On_expect_name_Identifier };
- static INT16 stateT_expect_name[] = { Tid_Identifier };
-
- static F_Tok stateF_expect_separator[]= { &PE_TemplateTop::On_expect_separator_Comma,
- &PE_TemplateTop::On_expect_separator_Greater };
- static INT16 stateT_expect_separator[]= { Tid_Comma,
- Tid_Greater };
-
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_qualifier, On_expect_qualifier_Other);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_name, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_TemplateTop, expect_separator, Hdl_SyntaxError);
-}
-
-void
-PE_TemplateTop::InitData()
-{
- pStati->SetCur(start);
- csv::erase_container(aResult_Parameters);
- bCurIsConstant = false;
-}
-
-void
-PE_TemplateTop::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_TemplateTop::Hdl_SyntaxError(const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_TemplateTop::On_start_Less( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_qualifier);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_ClassOrTypename( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_name);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_Greater(const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_TemplateTop::On_expect_qualifier_Other( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_name);
-
- bCurIsConstant = true;
-}
-
-void
-PE_TemplateTop::On_expect_name_Identifier( const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_separator);
-
- StreamLock sl(50);
- if ( NOT bCurIsConstant )
- {
- String sText( sl() << "typename " << i_sText << c_str );
- aResult_Parameters.push_back(sText);
- }
- else //
- {
- String sText( sl() << "constant " << i_sText << c_str );
- aResult_Parameters.push_back(sText);
- bCurIsConstant = false;
- } // endif
-}
-
-void
-PE_TemplateTop::On_expect_separator_Comma( const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expect_qualifier);
-}
-
-void
-PE_TemplateTop::On_expect_separator_Greater( const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-
-
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tpltp.hxx b/autodoc/source/parser/cpp/pe_tpltp.hxx
deleted file mode 100644
index 9d1fdbff8911..000000000000
--- a/autodoc/source/parser/cpp/pe_tpltp.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- 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_CPP_PE_TPLTP_HXX
-#define ADC_CPP_PE_TPLTP_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-
-
-class PE_TemplateTop : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expect_qualifier,
- expect_name,
- expect_separator,
- size_of_states
- };
- PE_TemplateTop(
- Cpp_PE * i_pParent );
- ~PE_TemplateTop();
-
- const StringVector &
- Result_Parameters() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
-
- void On_start_Less(const char *);
-
- void On_expect_qualifier_ClassOrTypename(const char *);
- void On_expect_qualifier_Greater(const char *);
- void On_expect_qualifier_Other(const char *);
-
- void On_expect_name_Identifier(const char *);
-
- void On_expect_separator_Comma(const char *);
- void On_expect_separator_Greater(const char *);
-
- // DATA
- Dyn< PeStatusArray<PE_TemplateTop> >
- pStati;
-
- StringVector
- aResult_Parameters;
- bool bCurIsConstant;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const StringVector &
-PE_TemplateTop::Result_Parameters() const
- { return aResult_Parameters; }
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tydef.cxx b/autodoc/source/parser/cpp/pe_tydef.cxx
deleted file mode 100644
index fa5527fefbc4..000000000000
--- a/autodoc/source/parser/cpp/pe_tydef.cxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_tydef.hxx"
-
-
-// NOT FULLY DECLARED SERVICES
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_type.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <all_toks.hxx>
-#include "pe_type.hxx"
-
-
-namespace cpp {
-
-
-PE_Typedef::PE_Typedef(Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Typedef> ),
- // pSpType,
- // pSpuType,
- // sName
- nType(0)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, 0, &PE_Typedef::SpReturn_Type);
-}
-
-PE_Typedef::~PE_Typedef()
-{
-}
-
-void
-PE_Typedef::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Typedef::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Typedef>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Typedef::On_start_typedef };
- static INT16 stateT_start[] = { Tid_typedef };
-
- static F_Tok stateF_expectName[] = { &PE_Typedef::On_expectName_Identifier };
- static INT16 stateT_expectName[] = { Tid_Identifier };
-
- static F_Tok stateF_afterName[] = { &PE_Typedef::On_afterName_Semicolon };
- static INT16 stateT_afterName[] = { Tid_Semicolon };
-
- SEMPARSE_CREATE_STATUS(PE_Typedef, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Typedef, expectName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Typedef, afterName, Hdl_SyntaxError);
-}
-
-void
-PE_Typedef::InitData()
-{
- pStati->SetCur(start);
-
- sName.clear();
- nType = 0;
-}
-
-void
-PE_Typedef::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- ary::cpp::Typedef &
- rTypedef = Env().AryGate().Ces().Store_Typedef(
- Env().Context(), sName, nType );
- Env().Event_Store_Typedef(rTypedef);
-}
-
-void
-PE_Typedef::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Typedef::SpReturn_Type()
-{
- pStati->SetCur(expectName);
-
- nType = pSpuType->Child().Result_Type().Id();
-}
-
-void
-PE_Typedef::On_start_typedef( const char * )
-{
- pSpuType->Push(done);
-}
-
-void
-PE_Typedef::On_expectName_Identifier( const char * i_sText )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-
- sName = i_sText;
-}
-
-void
-PE_Typedef::On_afterName_Semicolon( const char * )
-{
- SetTokenResult(done, pop_success);
-}
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_tydef.hxx b/autodoc/source/parser/cpp/pe_tydef.hxx
deleted file mode 100644
index 5c4cac474814..000000000000
--- a/autodoc/source/parser/cpp/pe_tydef.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- 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_CPP_PE_TYDEF_HXX
-#define ADC_CPP_PE_TYDEF_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-
-
-namespace cpp
-{
- class PE_Type;
-
-
-
-
-class PE_Typedef : public cpp::Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectName,
- afterName,
- size_of_states
- };
- PE_Typedef(
- Cpp_PE * i_pParent );
- ~PE_Typedef();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
- private:
- typedef SubPe< PE_Typedef, PE_Type > SP_Type;
- typedef SubPeUse< PE_Typedef, PE_Type> SPU_Type;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_Type();
-
- void On_start_typedef( const char * );
- void On_expectName_Identifier( const char * );
- void On_afterName_Semicolon( const char * );
-
- // DATA
- Dyn< PeStatusArray<PE_Typedef> >
- pStati;
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
-
- String sName;
- ary::cpp::Type_id nType;
-};
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_type.cxx b/autodoc/source/parser/cpp/pe_type.cxx
deleted file mode 100644
index 1f34ddffc14e..000000000000
--- a/autodoc/source/parser/cpp/pe_type.cxx
+++ /dev/null
@@ -1,556 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_type.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <ary/cpp/inpcontx.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_namesp.hxx>
-#include <ary/cpp/cp_type.hxx>
-#include "pe_class.hxx"
-#include "pe_enum.hxx"
-#include <x_parse.hxx>
-
-
-
-class NullType : public ary::cpp::Type
-{
- private:
- virtual void do_Accept(
- csv::ProcessorIfc & io_processor ) const;
- virtual ary::ClassId
- get_AryClass() const;
- virtual bool inq_IsConst() const;
- virtual void inq_Get_Text(
- StreamStr & o_rPreName,
- StreamStr & o_rName,
- StreamStr & o_rPostName,
- const ary::cpp::Gate &
- i_rGate ) const;
-};
-
-void
-NullType::do_Accept(csv::ProcessorIfc & ) const
-{
- // Does nothing.
-}
-
-ary::ClassId
-NullType::get_AryClass() const
-{
- return 0;
-}
-
-bool
-NullType::inq_IsConst() const
-{
- return true;
-}
-
-void
-NullType::inq_Get_Text( StreamStr & ,
- StreamStr & ,
- StreamStr & ,
- const ary::cpp::Gate & ) const
-{
- // Does nothing.
-}
-
-
-
-
-namespace cpp
-{
-
-
-inline bool
-PE_Type::IsType() const
- { return eResult_KindOf == is_type; }
-
-
-PE_Type::PE_Type( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Type> ),
- pSpType(0),
- pSpuType_TemplateParameter(0),
- // pSpClass,
- // pSpuClass,
- // pSpEnum,
- // pSpuEnum,
- pType(0),
- pCurTemplate_ParameterList(0),
- // sOwningClassName,
- // sParsedClass_Name,
- pResult_Type(0),
- eResult_KindOf(is_none),
- bIsCastOperatorType(false)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpClass = new SP_Class(*this);
- pSpEnum = new SP_Enum(*this);
-
- pSpuType_TemplateParameter
- = new SPU_Type( *pSpType, 0,
- &PE_Type::SpReturn_Type_TemplateParameter );
- pSpuClass = new SPU_Class( *pSpClass, 0,
- & PE_Type::SpReturn_Class );
- pSpuEnum = new SPU_Enum( *pSpEnum, 0,
- & PE_Type::SpReturn_Enum );
-}
-
-PE_Type::~PE_Type()
-{
-}
-
-void
-PE_Type::Init_AsCastOperatorType()
-{
- bIsCastOperatorType = true;
-}
-
-void
-PE_Type::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Type::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Type>::F_Tok F_Tok;
- static F_Tok stateF_start[] = { &PE_Type::On_start_Identifier,
- &PE_Type::On_start_class,
- &PE_Type::On_start_class,
- &PE_Type::On_start_class,
- &PE_Type::On_start_enum,
- &PE_Type::On_start_const,
- &PE_Type::On_start_volatile,
- &PE_Type::On_start_Bracket_Right,
- &PE_Type::On_start_DoubleColon,
- &PE_Type::On_start_typename,
- &PE_Type::On_start_BuiltInType,
- &PE_Type::On_start_TypeSpecializer };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_const,
- Tid_volatile,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expect_namesegment[] = { &PE_Type::On_expect_namesegment_Identifier,
- &PE_Type::On_expect_namesegment_Identifier };
- static INT16 stateT_expect_namesegment[] = { Tid_Identifier,
- Tid_BuiltInType };
-
- static F_Tok stateF_after_namesegment[] = { &PE_Type::On_after_namesegment_const,
- &PE_Type::On_after_namesegment_volatile,
- &PE_Type::On_after_namesegment_Bracket_Left,
- &PE_Type::On_after_namesegment_DoubleColon,
- &PE_Type::On_after_namesegment_Less,
- &PE_Type::On_after_namesegment_Asterix,
- &PE_Type::On_after_namesegment_AmpersAnd };
- static INT16 stateT_after_namesegment[] = { Tid_const,
- Tid_volatile,
- Tid_Bracket_Left,
- Tid_DoubleColon,
- Tid_Less,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- static F_Tok stateF_afterclass_expect_semicolon[] =
- { &PE_Type::On_afterclass_expect_semicolon_Semicolon };
- static INT16 stateT_afterclass_expect_semicolon[] =
- { Tid_Semicolon };
-
- static F_Tok stateF_within_template[] = { &PE_Type::On_within_template_Comma,
- &PE_Type::On_within_template_Greater,
- &PE_Type::On_within_template_Constant };
- static INT16 stateT_within_template[] = { Tid_Comma,
- Tid_Greater,
- Tid_Constant };
-
- static F_Tok stateF_within_indirection[] = { &PE_Type::On_within_indirection_const,
- &PE_Type::On_within_indirection_volatile,
- &PE_Type::On_within_indirection_Asterix,
- &PE_Type::On_within_indirection_AmpersAnd };
- static INT16 stateT_within_indirection[] = { Tid_const,
- Tid_volatile,
- Tid_Asterix,
- Tid_AmpersAnd };
-
- SEMPARSE_CREATE_STATUS(PE_Type, start, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Type, expect_namesegment, On_EndOfType);
- SEMPARSE_CREATE_STATUS(PE_Type, after_namesegment, On_EndOfType);
- SEMPARSE_CREATE_STATUS(PE_Type, afterclass_expect_semicolon, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Type, within_template, On_within_template_TypeStart);
- SEMPARSE_CREATE_STATUS(PE_Type, within_indirection, On_EndOfType);
-}
-
-void
-PE_Type::InitData()
-{
- pStati->SetCur(start);
-
- ary::cpp::Ce_id
- scope_id = Env().Context().CurClass() != 0
- ? Env().Context().CurClass()->CeId()
- : Env().Context().CurNamespace().CeId();
-
- pType = new ary::cpp::UsedType(scope_id);
- pCurTemplate_ParameterList = 0;
- sOwningClassName
- = Env().Context().CurClass() != 0
- ? Env().Context().CurClass()->LocalName().c_str()
- : "";
- sParsedClass_Name.clear();
- pResult_Type = 0;
- eResult_KindOf = is_type;
- bIsCastOperatorType = false;
-}
-
-void
-PE_Type::TransferData()
-{
- pStati->SetCur(size_of_states);
-
- if ( IsType() )
- pResult_Type = & Env().AryGate().Types().CheckIn_UsedType(
- Env().Context(),
- *pType.Release() );
- else
- pResult_Type = new NullType;
-}
-
-void
-PE_Type::Hdl_SyntaxError( const char * i_sText )
-{
- StdHandlingOfSyntaxError( i_sText );
-}
-
-void
-PE_Type::SpReturn_Type_TemplateParameter()
-{
- if ( pSpuType_TemplateParameter->Child().Result_KindOf() != is_type )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- pCurTemplate_ParameterList->AddParam_Type(
- pSpuType_TemplateParameter->Child().Result_Type().TypeId() );
-}
-
-void
-PE_Type::SpReturn_Class()
-{
- switch ( pSpuClass->Child().Result_KindOf() )
- {
- case PE_Class::is_declaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_explicit_class_declaration;
- break;
- case PE_Class::is_implicit_declaration:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuClass->Child().Result_LocalName() );
- break;
- case PE_Class::is_predeclaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_class_predeclaration;
- break;
- case PE_Class::is_qualified_typename:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuClass->Child().Result_FirstNameSegment() );
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Type::SpReturn_Enum()
-{
- switch ( pSpuEnum->Child().Result_KindOf() )
- {
- case PE_Enum::is_declaration:
- pStati->SetCur(afterclass_expect_semicolon);
- eResult_KindOf = is_explicit_enum_declaration;
- break;
- case PE_Enum::is_implicit_declaration:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuEnum->Child().Result_LocalName() );
- break;
- case PE_Enum::is_qualified_typename:
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(
- pSpuEnum->Child().Result_FirstNameSegment() );
- break;
- default:
- csv_assert(false);
- }
-}
-
-void
-PE_Type::On_EndOfType(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Type::On_start_Identifier( const char * i_sText )
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
-
- pType->Add_NameSegment(i_sText);
-}
-
-void
-PE_Type::On_start_class(const char *)
-{
- pSpuClass->Push(not_done);
-}
-
-void
-PE_Type::On_start_enum(const char *)
-{
- pSpuEnum->Push(done);
-}
-
-void
-PE_Type::On_start_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_start_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done,pop_success);
-
- eResult_KindOf = is_none;
-}
-
-void
-PE_Type::On_start_DoubleColon(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Absolute();
-}
-
-void
-PE_Type::On_start_BuiltInType(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(after_namesegment);
- pType->Set_BuiltIn(i_sText);
-}
-
-void
-PE_Type::On_start_TypeSpecializer(const char * i_sText)
-{
- SetTokenResult(done,stay);
- if (*i_sText == 'u') {
- pType->Set_Unsigned();
- }
- else if (*i_sText == 's') {
- pType->Set_Signed();
- }
- else {
- csv_assert(false);
- }
-}
-
-void
-PE_Type::On_start_typename(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Type::On_expect_namesegment_Identifier(const char * i_sText)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
- pType->Add_NameSegment(i_sText);
-}
-
-void
-PE_Type::On_after_namesegment_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_after_namesegment_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_after_namesegment_Bracket_Left(const char * i_sText)
-{
- if ( bIsCastOperatorType )
- {
- SetTokenResult(not_done, pop_success);
- }
- else if ( pType->LocalName() == sOwningClassName )
- {
- SetTokenResult(not_done,pop_success);
- eResult_KindOf = is_constructor;
-
- }
- else //
- {
- On_EndOfType(i_sText);
- } // endif
-}
-
-void
-PE_Type::On_after_namesegment_DoubleColon(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(expect_namesegment);
-}
-
-void
-PE_Type::On_after_namesegment_Less(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(within_template);
-
- pCurTemplate_ParameterList = & pType->Enter_Template();
-}
-
-void
-PE_Type::On_after_namesegment_Asterix(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(within_indirection);
- pType->Add_PtrLevel();
-}
-
-void
-PE_Type::On_after_namesegment_AmpersAnd(const char *)
-{
- SetTokenResult(done,pop_success);
- pType->Set_Reference();
-}
-
-void
-PE_Type::On_afterclass_expect_semicolon_Semicolon(const char *)
-{
- csv_assert( NOT IsType() );
- SetTokenResult(not_done,pop_success);
-}
-
-void
-PE_Type::On_within_template_Comma(const char *)
-{
- SetTokenResult(done,stay);
-}
-
-void
-PE_Type::On_within_template_Greater(const char *)
-{
- SetTokenResult(done,stay);
- pStati->SetCur(after_namesegment);
-
- pCurTemplate_ParameterList = 0;
-}
-
-void
-PE_Type::On_within_template_Constant(const char * i_sText)
-{
- // KORR_FUTURE
- Cerr() << "Templates with constants as parameters are not yet supported by Autodoc" << Endl();
- Hdl_SyntaxError(i_sText);
-}
-
-void
-PE_Type::On_within_template_TypeStart(const char *)
-{
- pSpuType_TemplateParameter->Push(not_done);
-}
-
-void
-PE_Type::On_within_indirection_const(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Const();
-}
-
-void
-PE_Type::On_within_indirection_volatile(const char *)
-{
- SetTokenResult(done,stay);
- pType->Set_Volatile();
-}
-
-void
-PE_Type::On_within_indirection_Asterix(const char *)
-{
- SetTokenResult(done,stay);
- pType->Add_PtrLevel();
-}
-
-void
-PE_Type::On_within_indirection_AmpersAnd(const char *)
-{
- SetTokenResult(done,pop_success);
- pType->Set_Reference();
-}
-
-} // namespace cpp
-
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_type.hxx b/autodoc/source/parser/cpp/pe_type.hxx
deleted file mode 100644
index 55eeaa5279f4..000000000000
--- a/autodoc/source/parser/cpp/pe_type.hxx
+++ /dev/null
@@ -1,187 +0,0 @@
-/* -*- 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_CPP_PE_TYPE_HXX
-#define ADC_CPP_PE_TYPE_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <ary/cpp/usedtype.hxx>
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-
-
-namespace cpp {
-
-class PE_Class;
-class PE_Enum;
-class PE_Expression;
-
-class PE_Type : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expect_namesegment,
- after_namesegment,
- afterclass_expect_semicolon,
- within_template,
- within_indirection,
- size_of_states
- };
- enum E_KindOfResult
- {
- is_none,
- is_type,
- is_constructor,
- is_explicit_class_declaration,
- is_class_predeclaration,
- is_explicit_enum_declaration
- };
-
- PE_Type(
- Cpp_PE * i_pParent );
- ~PE_Type();
-
- void Init_AsCastOperatorType();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- E_KindOfResult Result_KindOf() const;
- const ary::cpp::Type &
- Result_Type() const;
- private:
- typedef SubPe< PE_Type, PE_Type > SP_Type;
- typedef SubPe< PE_Type, PE_Class > SP_Class;
- typedef SubPe< PE_Type, PE_Enum > SP_Enum;
- typedef SubPeUse< PE_Type, PE_Type > SPU_Type;
- typedef SubPeUse< PE_Type, PE_Class > SPU_Class;
- typedef SubPeUse< PE_Type, PE_Enum > SPU_Enum;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError( const char *);
-
- void SpReturn_Type_TemplateParameter();
- void SpReturn_Class();
- void SpReturn_Enum();
-
- void On_EndOfType(const char *);
-
- void On_start_Identifier(const char *);
- void On_start_class(const char *);
- void On_start_enum(const char *);
- void On_start_const(const char *);
- void On_start_volatile(const char *);
- void On_start_Bracket_Right(const char *);
- void On_start_DoubleColon(const char *);
- void On_start_BuiltInType(const char *);
- void On_start_TypeSpecializer(const char *);
- void On_start_typename(const char *);
-
- void On_expect_namesegment_Identifier(const char *);
-
- void On_after_namesegment_const(const char *);
- void On_after_namesegment_volatile(const char *);
- void On_after_namesegment_Bracket_Left(const char *);
- void On_after_namesegment_DoubleColon(const char *);
- void On_after_namesegment_Less(const char *);
- void On_after_namesegment_Asterix(const char *);
- void On_after_namesegment_AmpersAnd(const char *);
-
- void On_afterclass_expect_semicolon_Semicolon(const char *);
-
- void On_within_template_Comma(const char *);
- void On_within_template_Greater(const char *);
- void On_within_template_Constant(const char *);
- void On_within_template_TypeStart(const char *);
-
- void On_within_indirection_const(const char *);
- void On_within_indirection_volatile(const char *);
- void On_within_indirection_Asterix(const char *);
- void On_within_indirection_AmpersAnd(const char *);
-
- bool IsType() const;
-
- // DATA
- Dyn< PeStatusArray<PE_Type> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType_TemplateParameter;
- Dyn<SP_Class> pSpClass;
- Dyn<SPU_Class> pSpuClass;
- Dyn<SP_Enum> pSpEnum;
- Dyn<SPU_Enum> pSpuEnum;
-
- Dyn<ary::cpp::UsedType>
- pType;
- ary::cpp::ut::List_TplParameter *
- pCurTemplate_ParameterList;
- String sOwningClassName;
- String sParsedClass_Name;
-
- const ary::cpp::Type *
- pResult_Type;
- E_KindOfResult eResult_KindOf;
- bool bIsCastOperatorType;
-};
-
-
-
-// IMPLEMENTATION
-
-
-inline const ary::cpp::Type &
-PE_Type::Result_Type() const
- { csv_assert(pResult_Type != 0);
- return *pResult_Type; }
-inline PE_Type::E_KindOfResult
-PE_Type::Result_KindOf() const
- { return eResult_KindOf; }
-
-
-} // namespace cpp
-
-
-#endif
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vafu.cxx b/autodoc/source/parser/cpp/pe_vafu.cxx
deleted file mode 100644
index ca9a538f544e..000000000000
--- a/autodoc/source/parser/cpp/pe_vafu.cxx
+++ /dev/null
@@ -1,651 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_vafu.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <ary/cpp/c_class.hxx>
-#include <ary/cpp/c_vari.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-#include <ary/cpp/cp_ce.hxx>
-#include <ary/cpp/inpcontx.hxx>
-#include "pe_type.hxx"
-#include "pe_vari.hxx"
-#include "pe_funct.hxx"
-#include "pe_ignor.hxx"
-#include <x_parse.hxx>
-
-
-
-
-namespace cpp {
-
-
-
-//*********************** PE_VarFunc ***********************//
-
-
-PE_VarFunc::PE_VarFunc( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_VarFunc> ),
- // pSpType,
- // pSpuType,
- // pSpVariable,
- // pSpuVariable,
- // pSpFunction,
- // pSpuFunctionStd,
- // pSpuFunctionCtor,
- // pSpuFunctionDtor,
- // pSpuFunctionCastOperator,
- // pSpuFunctionNormalOperator
- // pSpIgnore,
- // pSpuIgnore,
- nCounter_TemplateBrackets(0),
- bInDestructor(false),
- // aResultIds,
- nResultFrontType(0),
- eResultType(result_unknown),
- bVirtual(false),
- bStatic(false),
- bExtern(false),
- bExternC(false),
- bMutable(false),
- bInline(false),
- bRegister(false),
- bExplicit(false)
-{
- Setup_StatusFunctions();
-
- pSpType = new SP_Type(*this);
- pSpuType = new SPU_Type(*pSpType, 0, &PE_VarFunc::SpReturn_Type);
- pSpVariable = new SP_Variable(*this);
- pSpuVariable = new SPU_Variable(*pSpVariable, 0, &PE_VarFunc::SpReturn_Variable);
- pSpFunction = new SP_Function(*this);
- pSpuFunctionStd = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionStd, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionCtor = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionCtor, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionDtor = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionDtor, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionCastOperator
- = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionCastOperator, &PE_VarFunc::SpReturn_FunctionStd);
- pSpuFunctionNormalOperator
- = new SPU_Function(*pSpFunction, &PE_VarFunc::SpInit_FunctionNormalOperator, &PE_VarFunc::SpReturn_FunctionStd);
- pSpIgnore = new SP_Ignore(*this);
- pSpuIgnore = new SPU_Ignore(*pSpIgnore, 0, &PE_VarFunc::SpReturn_Ignore);
-}
-
-PE_VarFunc::~PE_VarFunc()
-{
-}
-
-void
-PE_VarFunc::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_VarFunc::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_VarFunc>::F_Tok F_Tok;
-
- static F_Tok stateF_start[] = { &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_operator,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_TypeKey,
- &PE_VarFunc::On_start_virtual,
- &PE_VarFunc::On_start_Tilde,
- &PE_VarFunc::On_start_const,
- &PE_VarFunc::On_start_volatile,
- &PE_VarFunc::On_start_extern,
- &PE_VarFunc::On_start_static,
- &PE_VarFunc::On_start_mutable,
- &PE_VarFunc::On_start_register,
- &PE_VarFunc::On_start_inline,
- &PE_VarFunc::On_start_explicit,
- &PE_VarFunc::On_start_Bracket_Right,
- &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_typename,
- &PE_VarFunc::On_start_Identifier,
- &PE_VarFunc::On_start_Identifier };
- static INT16 stateT_start[] = { Tid_Identifier,
- Tid_operator,
- Tid_class,
- Tid_struct,
- Tid_union,
- Tid_enum,
- Tid_virtual,
- Tid_Tilde,
- Tid_const,
- Tid_volatile,
- Tid_extern,
- Tid_static,
- Tid_mutable,
- Tid_register,
- Tid_inline,
- Tid_explicit,
- Tid_Bracket_Right,
- Tid_DoubleColon,
- Tid_typename,
- Tid_BuiltInType,
- Tid_TypeSpecializer };
-
- static F_Tok stateF_expectCtor[] = { &PE_VarFunc::On_expectCtor_Bracket_Left };
- static INT16 stateT_expectCtor[] = { Tid_Bracket_Left };
-
- static F_Tok stateF_afterClassDecl[] = { &PE_VarFunc::On_afterClassDecl_Semicolon };
- static INT16 stateT_afterClassDecl[] = { Tid_Semicolon };
-
- static F_Tok stateF_expectName[] = { &PE_VarFunc::On_expectName_Identifier,
- &PE_VarFunc::On_expectName_operator,
- &PE_VarFunc::On_expectName_Bracket_Left };
- static INT16 stateT_expectName[] = { Tid_Identifier,
- Tid_operator,
- Tid_Bracket_Left };
-
- static F_Tok stateF_afterName[] = { &PE_VarFunc::On_afterName_ArrayBracket_Left,
- &PE_VarFunc::On_afterName_Bracket_Left,
- &PE_VarFunc::On_afterName_DoubleColon,
- &PE_VarFunc::On_afterName_Semicolon,
- &PE_VarFunc::On_afterName_Comma,
- &PE_VarFunc::On_afterName_Assign,
- &PE_VarFunc::On_afterName_Less };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Bracket_Left,
- Tid_DoubleColon,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Assign,
- Tid_Less };
-
- static F_Tok stateF_afterName_inErraneousTemplate[] =
- { &PE_VarFunc::On_afterName_inErraneousTemplate_Less,
- &PE_VarFunc::On_afterName_inErraneousTemplate_Greater };
- static INT16 stateT_afterName_inErraneousTemplate[] =
- { Tid_Less,
- Tid_Greater };
-
- static F_Tok stateF_finished[] = { &PE_VarFunc::On_finished_Semicolon,
- &PE_VarFunc::On_finished_Comma };
- static INT16 stateT_finished[] = { Tid_Semicolon,
- Tid_Comma };
-
- static F_Tok stateF_finishedIncludingFunctionImplementation[] =
- { &PE_VarFunc::On_finishedIncludingFunctionImplementation_Default
- };
- static INT16 stateT_finishedIncludingFunctionImplementation[] =
- { Tid_BuiltInType // Just to have one entry, but it is default handled, too.
- };
-
- SEMPARSE_CREATE_STATUS(PE_VarFunc, start, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, expectCtor, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterClassDecl, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, expectName, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterName, Hdl_UnknownToken);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, afterName_inErraneousTemplate, On_afterName_inErraneousTemplate_Default);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, finished, On_finished_Default);
- SEMPARSE_CREATE_STATUS(PE_VarFunc, finishedIncludingFunctionImplementation, On_finishedIncludingFunctionImplementation_Default);
-}
-
-void
-PE_VarFunc::InitData()
-{
- pStati->SetCur(start);
- csv::erase_container(aResultIds);
-
- nCounter_TemplateBrackets = 0;
- bInDestructor = false;
-
- nResultFrontType = 0;
- eResultType = result_unknown;
- sName.clear();
- bVirtual = ary::cpp::VIRTUAL_none;
- bStatic = false;
- bExtern = false;
- bExternC = false;
- bMutable = false;
- bInline = false;
- bRegister = false;
- bExplicit = false;
-}
-
-void
-PE_VarFunc::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_VarFunc::Hdl_UnknownToken( const char *)
-{
- pSpuIgnore->Push(not_done);
-}
-
-void
-PE_VarFunc::SpInit_FunctionStd()
-{
- if ( nResultFrontType.IsValid() AND sName.length() > 0 )
- {
- pSpuFunctionStd->Child().Init_Std(
- sName,
- nResultFrontType,
- bVirtual,
- CreateFunctionFlags() );
- }
- else
- {
- throw X_Parser( X_Parser::x_UnexpectedToken,
- "",
- Env().CurFileName(),
- Env().LineCount() );
- }
-}
-
-void
-PE_VarFunc::SpInit_FunctionCtor()
-{
- ary::cpp::Class * pOwnerClass = Env().Context().CurClass();
- csv_assert( pOwnerClass != 0 );
- pSpuFunctionStd->Child().Init_Ctor( pOwnerClass->LocalName(),
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionDtor()
-{
- pSpuFunctionStd->Child().Init_Dtor( sName,
- bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionCastOperator()
-{
- pSpuFunctionStd->Child().Init_CastOperator( bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpInit_FunctionNormalOperator()
-{
- pSpuFunctionStd->Child().Init_NormalOperator( nResultFrontType,
- bVirtual,
- CreateFunctionFlags() );
-}
-
-void
-PE_VarFunc::SpReturn_Type()
-{
- switch ( pSpuType->Child().Result_KindOf() )
- {
- case PE_Type::is_type:
- pStati->SetCur(expectName);
- nResultFrontType
- = pSpuType->Child().Result_Type().Id();
- break;
- case PE_Type::is_constructor:
- pStati->SetCur(expectCtor);
- eResultType = result_function;
- break;
- case PE_Type::is_explicit_class_declaration:
- case PE_Type::is_explicit_enum_declaration:
- pStati->SetCur(afterClassDecl);
- eResultType = result_ignore;
- break;
- case PE_Type::is_class_predeclaration:
- pStati->SetCur(afterClassDecl);
- eResultType = result_ignore;
- break;
- default:
- ;
- }
-}
-
-void
-PE_VarFunc::SpReturn_Variable()
-{
- typedef ary::cpp::VariableFlags VarFlags;
-
- if ( NOT bExtern )
- {
- VarFlags aFlags( UINT16(
- ( bStatic AND Env().Context().CurClass() == 0 ? VarFlags::f_static_local : 0 )
- | ( bStatic AND Env().Context().CurClass() != 0 ? VarFlags::f_static_member : 0 )
- | ( bMutable ? VarFlags::f_mutable : 0 ) )
- );
-
-// ary::S_InitData aData( 0, Env().CurCeSpace().Id(), i_sName, 0 );
- ary::cpp::Variable & rCurParsedVariable
- = Env().AryGate().Ces().Store_Variable( Env().Context(),
- sName,
- nResultFrontType,
- aFlags,
- pSpuVariable->Child().Result_SizeExpression(),
- pSpuVariable->Child().Result_InitExpression() );
- Env().Event_Store_Variable(rCurParsedVariable);
- aResultIds.push_back( rCurParsedVariable.CeId() );
- eResultType = result_variable;
- }
- else if (bExtern)
- {
- eResultType = result_ignore;
- }
-
- pStati->SetCur(finished);
-}
-
-void
-PE_VarFunc::SpReturn_FunctionStd()
-{
- if ( (NOT bExtern) OR bExternC )
- {
- aResultIds.push_back(pSpuFunctionStd->Child().Result_Id());
- eResultType = result_function;
- }
- else
- {
- eResultType = result_ignore;
- }
-
- if ( NOT pSpuFunctionStd->Child().Result_WithImplementation() )
- pStati->SetCur(finished);
- else
- pStati->SetCur(finishedIncludingFunctionImplementation);
-}
-
-void
-PE_VarFunc::SpReturn_Ignore()
-{
- pStati->SetCur(finished);
-}
-
-void
-PE_VarFunc::On_start_Identifier(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_operator(const char *)
-{
- pSpuFunctionCastOperator->Push(done);
-}
-
-void
-PE_VarFunc::On_start_TypeKey(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_virtual(const char *)
-{
- SetTokenResult(done, stay);
- bVirtual = true;
-}
-
-void
-PE_VarFunc::On_start_Tilde(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
-
- bInDestructor = true;
-}
-
-void
-PE_VarFunc::On_start_const(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_volatile(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_start_extern(const char *)
-{
- SetTokenResult(done, stay);
- bExtern = true;
-}
-
-void
-PE_VarFunc::On_start_static(const char *)
-{
- SetTokenResult(done, stay);
- bStatic = true;
-}
-
-void
-PE_VarFunc::On_start_mutable(const char *)
-{
- SetTokenResult(done, stay);
- bMutable = true;
-}
-
-void
-PE_VarFunc::On_start_register(const char *)
-{
- SetTokenResult(done, stay);
- bRegister = true;
-}
-
-void
-PE_VarFunc::On_start_inline(const char *)
-{
- SetTokenResult(done, stay);
-
- bInline = true;
-}
-
-void
-PE_VarFunc::On_start_explicit(const char *)
-{
- SetTokenResult(done, stay);
- bExplicit = true;
-}
-
-void
-PE_VarFunc::On_start_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_VarFunc::On_start_typename(const char *)
-{
- pSpuType->Push(not_done);
-}
-
-void
-PE_VarFunc::On_expectCtor_Bracket_Left(const char *)
-{
- pSpuFunctionCtor->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterClassDecl_Semicolon(const char *)
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_VarFunc::On_expectName_Identifier(const char * i_sText)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
- sName = i_sText;
-}
-
-void
-PE_VarFunc::On_expectName_operator(const char *)
-{
- pSpuFunctionNormalOperator->Push(done);
-}
-
-void
-PE_VarFunc::On_expectName_Bracket_Left(const char *)
-{
- // Function pointer declaration
- pSpuIgnore->Push(not_done);
- // TODO
-}
-
-
-void
-PE_VarFunc::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Bracket_Left(const char *)
-{
- if ( NOT bInDestructor)
- pSpuFunctionStd->Push(not_done);
- else
- pSpuFunctionDtor->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_DoubleColon(const char *)
-{
- pSpuIgnore->Push(done); // This seems to be only an implementation.
-
- // This may have been a template.
- // In that case, the declaration needs to be closed.
- Env().Close_OpenTemplate();
-}
-
-void
-PE_VarFunc::On_afterName_Semicolon(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Comma(const char *)
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Assign(const char * )
-{
- pSpuVariable->Push(not_done);
-}
-
-void
-PE_VarFunc::On_afterName_Less(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName_inErraneousTemplate);
-
- nCounter_TemplateBrackets = 1;
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Less(const char * )
-{
- SetTokenResult(done, stay);
-
- nCounter_TemplateBrackets++;
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Greater(const char * )
-{
- SetTokenResult(done, stay);
-
- nCounter_TemplateBrackets--;
- if ( nCounter_TemplateBrackets == 0 )
- pStati->SetCur(afterName);
-}
-
-void
-PE_VarFunc::On_afterName_inErraneousTemplate_Default(const char * )
-{
- SetTokenResult(done, stay);
-}
-
-void
-PE_VarFunc::On_finished_Semicolon(const char * ) // Should be Semicolon !!!
-{
- SetTokenResult(done, pop_success);
-}
-
-void
-PE_VarFunc::On_finished_Comma(const char * )
-{
- SetTokenResult(done, stay);
- pStati->SetCur(expectName);
-}
-
-void
-PE_VarFunc::On_finished_Default(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_VarFunc::On_finishedIncludingFunctionImplementation_Default(const char * )
-{
- SetTokenResult(not_done, pop_success);
-}
-
-ary::cpp::FunctionFlags
-PE_VarFunc::CreateFunctionFlags()
-{
- typedef ary::cpp::FunctionFlags FuncFlags;
-
- return FuncFlags( UINT16(
- ( bStatic AND Env().Context().CurClass() == 0 ? FuncFlags::f_static_local : 0 )
- | ( bStatic AND Env().Context().CurClass() != 0 ? FuncFlags::f_static_member : 0 )
- | ( bExtern ? FuncFlags::f_extern : 0 )
- | ( Env().IsExternC() ? FuncFlags::f_externC : 0 )
- | ( bMutable ? FuncFlags::f_mutable : 0 )
- | ( bInline ? FuncFlags::f_inline : 0 )
- | ( bRegister ? FuncFlags::f_register : 0 )
- | ( bExplicit ? FuncFlags::f_explicit : 0 ) )
- );
-
-}
-
-
-} // namespace cpp
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vafu.hxx b/autodoc/source/parser/cpp/pe_vafu.hxx
deleted file mode 100644
index 0fa760c36b0a..000000000000
--- a/autodoc/source/parser/cpp/pe_vafu.hxx
+++ /dev/null
@@ -1,292 +0,0 @@
-/* -*- 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_CPP_PE_VAFU_HXX
-#define ADC_CPP_PE_VAFU_HXX
-
-// BASE CLASSES
-#include "cpp_pe.hxx"
-// USED SERVICES
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
-
-
-
-namespace cpp
-{
-
-class PE_Type;
-class PE_Variable;
-class PE_Function;
-class PE_Ignore;
-
-
-
-
-class PE_VarFunc : public Cpp_PE
-{
- public:
- enum E_State
- {
- start,
- expectCtor,
- afterClassDecl, // Also used for after enum declaration.
- expectName,
- afterName,
- afterName_inErraneousTemplate,
- finished,
- finishedIncludingFunctionImplementation,
- size_of_states
- };
- enum E_ResultType
- {
- result_unknown = 0,
- result_ignore, /// Used for class and enum declarations and predeclarations and for extern variables and functions.
- result_variable,
- result_function
- };
-
- typedef ary::cpp::E_Protection E_Protection;
-
-
- PE_VarFunc(
- Cpp_PE * i_pParent );
- ~PE_VarFunc();
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- const std::vector<ary::cpp::Ce_id> &
- Result_Ids() const;
- ary::cpp::Type_id Result_FrontType() const;
- const StringVector &
- Result_Names() const;
- E_ResultType Result_CeType() const;
-
- private:
- typedef SubPe< PE_VarFunc, PE_Type > SP_Type;
- typedef SubPeUse< PE_VarFunc, PE_Type > SPU_Type;
- typedef SubPe< PE_VarFunc, PE_Variable > SP_Variable;
- typedef SubPeUse< PE_VarFunc, PE_Variable > SPU_Variable;
- typedef SubPe< PE_VarFunc, PE_Function > SP_Function;
- typedef SubPeUse< PE_VarFunc, PE_Function > SPU_Function;
- typedef SubPe< PE_VarFunc, PE_Ignore > SP_Ignore;
- typedef SubPeUse< PE_VarFunc, PE_Ignore > SPU_Ignore;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_UnknownToken( const char *);
-
- void SpInit_FunctionStd();
- void SpInit_FunctionCtor();
- void SpInit_FunctionDtor();
- void SpInit_FunctionCastOperator();
- void SpInit_FunctionNormalOperator();
- void SpReturn_Type();
- void SpReturn_Variable();
- void SpReturn_FunctionStd();
- void SpReturn_Ignore();
-
- void On_start_Identifier(const char * i_sText);
- void On_start_operator(const char * i_sText);
- void On_start_TypeKey(const char * i_sText);
- void On_start_virtual(const char * i_sText);
- void On_start_Tilde(const char * i_sText);
- void On_start_const(const char * i_sText);
- void On_start_volatile(const char * i_sText);
- void On_start_extern(const char * i_sText);
- void On_start_static(const char * i_sText);
- void On_start_mutable(const char * i_sText);
- void On_start_register(const char * i_sText);
- void On_start_inline(const char * i_sText);
- void On_start_explicit(const char * i_sText);
- void On_start_Bracket_Right(const char * i_sText);
- void On_start_typename(const char * i_sText);
-
- void On_expectCtor_Bracket_Left(const char * i_sText);
-
- void On_afterClassDecl_Semicolon(const char * i_sText);
-
- void On_expectName_Identifier(const char * i_sText);
- void On_expectName_operator(const char * i_sText);
- void On_expectName_Bracket_Left(const char * i_sText);
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Bracket_Left(const char * i_sText);
- void On_afterName_DoubleColon(const char * i_sText);
- void On_afterName_Semicolon(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
- void On_afterName_Less(const char * i_sText);
-
- void On_afterName_inErraneousTemplate_Less(const char * i_sText);
- void On_afterName_inErraneousTemplate_Greater(const char * i_sText);
- void On_afterName_inErraneousTemplate_Default(const char * i_sText);
-
- void On_finished_Semicolon(const char * i_sText);
- void On_finished_Comma(const char * i_sText);
- void On_finished_Default(const char * i_sText);
-
- void On_finishedIncludingFunctionImplementation_Default(const char * i_sText);
-
- ary::cpp::FunctionFlags
- CreateFunctionFlags();
-
- // DATA
- Dyn< PeStatusArray<PE_VarFunc> >
- pStati;
-
- Dyn<SP_Type> pSpType;
- Dyn<SPU_Type> pSpuType;
- Dyn<SP_Variable> pSpVariable;
- Dyn<SPU_Variable> pSpuVariable;
- Dyn<SP_Function> pSpFunction;
- Dyn<SPU_Function> pSpuFunctionStd;
- Dyn<SPU_Function> pSpuFunctionCtor;
- Dyn<SPU_Function> pSpuFunctionDtor;
- Dyn<SPU_Function> pSpuFunctionCastOperator;
- Dyn<SPU_Function> pSpuFunctionNormalOperator;
- Dyn<SP_Ignore> pSpIgnore;
- Dyn<SPU_Ignore> pSpuIgnore;
-
- intt nCounter_TemplateBrackets;
- bool bInDestructor;
-
- std::vector<ary::cpp::Ce_id>
- aResultIds;
- ary::cpp::Type_id nResultFrontType;
- E_ResultType eResultType;
-
- // Pre-Results
- String sName;
-
- bool bVirtual;
- bool bStatic;
- bool bExtern;
- bool bExternC;
- bool bMutable;
- bool bInline;
- bool bRegister;
- bool bExplicit;
-};
-
-
-
-// IMPLEMENTATION
-
-inline const std::vector<ary::cpp::Ce_id> &
-PE_VarFunc::Result_Ids() const
- { return aResultIds; }
-inline ary::cpp::Type_id
-PE_VarFunc::Result_FrontType() const
- { return nResultFrontType; }
-inline PE_VarFunc::E_ResultType
-PE_VarFunc::Result_CeType() const
- { return eResultType; }
-
-
-
-} // namespace cpp
-
-
-
-
-#endif
-
-
-/* // Overview of statuses
-
-Undecided
----------
-
-start // before and inside storage class specifiers
- any ->stay
- operaator ->goto Function
-
-->Typ
-
-expectName
- Identifier ->stay
- operator ->goto Function
-
-afterName ->goto Variable or Function
-
-
-
-
-Variable
---------
-
-start // before and inside storage class specifiers
-
-->Typ
-
-expectName // type is there -> in case of '(': notyetimplemented
-afterName
-
-expectSize // after [
-expectFinish
- // before ; or ,
-expectNextVarName // in contrast to expectName here can also be a * or &
-
-
-
-
-
-Function
---------
-
-start // before and inside storage class specifiers
-
-->Typ
-
-expectName // type is there
-expectBracket // after name
-expectParameter // after ( or ,
--> Parameter
-after Parameters // before const, volatile throw or = 0.
-after throw // expect (
-expectException // after (
-after exceptions // = 0 or ; or ,
-
-
-expectNextVarName // in contrast to expectName here can also be a * or &
-
-
-
-
-
-
-
-*/
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vari.cxx b/autodoc/source/parser/cpp/pe_vari.cxx
deleted file mode 100644
index f062c5a1901f..000000000000
--- a/autodoc/source/parser/cpp/pe_vari.cxx
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "pe_vari.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include "pe_expr.hxx"
-
-
-
-
-namespace cpp {
-
-
-PE_Variable::PE_Variable( Cpp_PE * i_pParent )
- : Cpp_PE(i_pParent),
- pStati( new PeStatusArray<PE_Variable> )
- // pSpExpression,
- // pSpuArraySizeExpression,
- // pSpuInitExpression,
- // sResultSizeExpression,
- // sResultInitExpression
-{
- Setup_StatusFunctions();
-
- pSpExpression = new SP_Expression(*this);
-
- pSpuArraySizeExpression = new SPU_Expression(*pSpExpression, 0, &PE_Variable::SpReturn_ArraySizeExpression);
- pSpuInitExpression = new SPU_Expression(*pSpExpression, 0, &PE_Variable::SpReturn_InitExpression);
-}
-
-PE_Variable::~PE_Variable()
-{
-}
-
-void
-PE_Variable::Call_Handler( const cpp::Token & i_rTok )
-{
- pStati->Cur().Call_Handler(i_rTok.TypeId(), i_rTok.Text());
-}
-
-void
-PE_Variable::Setup_StatusFunctions()
-{
- typedef CallFunction<PE_Variable>::F_Tok F_Tok;
-
- static F_Tok stateF_afterName[] = { &PE_Variable::On_afterName_ArrayBracket_Left,
- &PE_Variable::On_afterName_Semicolon,
- &PE_Variable::On_afterName_Comma,
- &PE_Variable::On_afterName_Assign };
- static INT16 stateT_afterName[] = { Tid_ArrayBracket_Left,
- Tid_Semicolon,
- Tid_Comma,
- Tid_Assign };
- static F_Tok stateF_afterSize[] = { &PE_Variable::On_afterSize_ArrayBracket_Right };
- static INT16 stateT_afterSize[] = { Tid_ArrayBracket_Right };
- static F_Tok stateF_expectFinish[] = { &PE_Variable::On_expectFinish_Bracket_Right,
- &PE_Variable::On_expectFinish_Semicolon,
- &PE_Variable::On_expectFinish_Comma };
- static INT16 stateT_expectFinish[] = { Tid_Bracket_Right,
- Tid_Semicolon,
- Tid_Comma };
-
- SEMPARSE_CREATE_STATUS(PE_Variable, afterName, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Variable, afterSize, Hdl_SyntaxError);
- SEMPARSE_CREATE_STATUS(PE_Variable, expectFinish, Hdl_SyntaxError);
-}
-
-void
-PE_Variable::InitData()
-{
- pStati->SetCur(afterName);
-
- sResultSizeExpression.clear();
- sResultInitExpression.clear();
-}
-
-void
-PE_Variable::TransferData()
-{
- pStati->SetCur(size_of_states);
-}
-
-void
-PE_Variable::Hdl_SyntaxError( const char * i_sText)
-{
- StdHandlingOfSyntaxError(i_sText);
-}
-
-void
-PE_Variable::SpReturn_ArraySizeExpression()
-{
- pStati->SetCur(afterSize);
-
- sResultSizeExpression = pSpuArraySizeExpression->Child().Result_Text();
-}
-
-void
-PE_Variable::SpReturn_InitExpression()
-{
- pStati->SetCur(expectFinish);
-
- sResultInitExpression = pSpuInitExpression->Child().Result_Text();
-}
-
-void
-PE_Variable::On_afterName_ArrayBracket_Left(const char *)
-{
- pSpuArraySizeExpression->Push(done);
-}
-
-void
-PE_Variable::On_afterName_Semicolon(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_afterName_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_afterName_Assign(const char *)
-{
- pSpuInitExpression->Push(done);
-}
-
-void
-PE_Variable::On_afterSize_ArrayBracket_Right(const char *)
-{
- SetTokenResult(done, stay);
- pStati->SetCur(afterName);
-}
-
-void
-PE_Variable::On_expectFinish_Semicolon(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_expectFinish_Comma(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-void
-PE_Variable::On_expectFinish_Bracket_Right(const char *)
-{
- SetTokenResult(not_done, pop_success);
-}
-
-
-} // namespace cpp
-
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pe_vari.hxx b/autodoc/source/parser/cpp/pe_vari.hxx
deleted file mode 100644
index 58370616359a..000000000000
--- a/autodoc/source/parser/cpp/pe_vari.hxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- 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_CPP_PE_VARI_HXX
-#define ADC_CPP_PE_VARI_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cpp_pe.hxx"
- // COMPONENTS
-#include <semantic/callf.hxx>
-#include <semantic/sub_peu.hxx>
-#include <ary/cpp/c_types4cpp.hxx>
-#include <ary/cpp/c_vfflag.hxx>
- // PARAMETERS
-
-
-namespace cpp {
-
-class PE_Expression;
-
-
-class PE_Variable : public Cpp_PE
-{
- public:
- enum E_State
- {
- afterName, //
- afterSize, // after ]
- expectFinish, // after InitExpression
- size_of_states
- };
- PE_Variable(
- Cpp_PE * i_pParent );
- ~PE_Variable();
-
- /** @return
- Bit 0x0001 != 0, if there is a size and
- bit 0x0002 != 0, if there is an initialisation.
- */
- UINT16 Result_Pattern() const;
- const String & Result_SizeExpression() const;
- const String & Result_InitExpression() const;
-
- virtual void Call_Handler(
- const cpp::Token & i_rTok );
-
- private:
- typedef SubPe< PE_Variable, PE_Expression > SP_Expression;
- typedef SubPeUse< PE_Variable, PE_Expression> SPU_Expression;
-
- void Setup_StatusFunctions();
- virtual void InitData();
- virtual void TransferData();
- void Hdl_SyntaxError(const char *);
-
- void SpReturn_ArraySizeExpression();
- void SpReturn_InitExpression();
-
- void On_afterName_ArrayBracket_Left(const char * i_sText);
- void On_afterName_Semicolon(const char * i_sText);
- void On_afterName_Comma(const char * i_sText);
- void On_afterName_Assign(const char * i_sText);
-
- void On_afterSize_ArrayBracket_Right(const char * i_sText);
-
- void On_expectFinish_Semicolon(const char * i_sText);
- void On_expectFinish_Comma(const char * i_sText);
- void On_expectFinish_Bracket_Right(const char * i_sText);
-
- // DATA
- Dyn< PeStatusArray<PE_Variable> >
- pStati;
-
- Dyn<SP_Expression> pSpExpression;
- Dyn<SPU_Expression> pSpuArraySizeExpression;
- Dyn<SPU_Expression> pSpuInitExpression;
-
- String sResultSizeExpression;
- String sResultInitExpression;
-};
-
-
-
-// IMPLEMENTATION
-
-
-inline UINT16
-PE_Variable::Result_Pattern() const
- { return ( sResultSizeExpression.length() > 0 ? 1 : 0 )
- + ( sResultInitExpression.length() > 0 ? 2 : 0 ); }
-inline const String &
-PE_Variable::Result_SizeExpression() const
- { return sResultSizeExpression; }
-inline const String &
-PE_Variable::Result_InitExpression() const
- { return sResultInitExpression; }
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/pev.hxx b/autodoc/source/parser/cpp/pev.hxx
deleted file mode 100644
index 31a873ef7f0f..000000000000
--- a/autodoc/source/parser/cpp/pev.hxx
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -*- 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_CPP_PEV_HXX
-#define ADC_CPP_PEV_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tokproct.hxx>
- // COMPONENTS
- // PARAMETERS
-#include <ary/cpp/c_types4cpp.hxx>
-
-namespace ary
-{
- namespace cpp
- {
- class Gate;
- class InputContext;
-
- class Namespace;
- class Class;
- class Enum;
- class Typedef;
- class Function;
- class Variable;
- class EnumValue;
-
- class DefineEntity;
- }
-
- class Documentation;
-}
-
-
-namespace cpp
-{
-
-
-class PeEnvironment : protected TokenProcessing_Types
-{
- public:
- // INQUIRY
- virtual ~PeEnvironment() {}
-
- // OPERATIONS
- // Token results
- void SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push = 0 );
-
- // Owner stack
- void OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- void OpenExternC(
- bool i_bOnlyForOneDeclaration = false );
- void OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- void OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- void CloseBlock(); /// Handles a '}' on file scope.
- void CloseClass();
- void CloseEnum();
- void SetCurProtection( /// Handles 'public:', 'protected:' and 'private:' on class scope.
- ary::cpp::E_Protection
- i_eProtection );
- void OpenTemplate(
- const StringVector &
- i_rParameters );
- /// Removes parameters from this object.
- DYN StringVector * Get_CurTemplateParameters();
- /// Checks, if a template is still open, and if yes, closes it.
- void Close_OpenTemplate();
-
- // Special events
- void Event_Class_FinishedBase(
- const String & i_sParameterName );
-
- void Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef );
- void Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue );
- void Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition );
-
- void Event_EnterFunction_ParameterList();
- void Event_Function_FinishedParameter(
- const String & i_sParameterName );
- void Event_LeaveFunction_ParameterList();
- void Event_EnterFunction_Implementation();
- void Event_LeaveFunction_Implementation();
-
- void Event_Store_Function(
- ary::cpp::Function &
- io_rFunction );
- void Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable );
- // Error recovery
- void StartWaitingFor_Recovery();
-
- // INQUIRY
- ary::cpp::Gate & AryGate() const;
- const ary::cpp::InputContext &
- Context() const;
- String CurFileName() const;
- uintt LineCount() const;
- bool IsWaitingFor_Recovery() const;
- bool IsExternC() const;
-
- private:
- virtual void do_SetTokenResult(
- E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push ) = 0;
- virtual void do_OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace ) = 0;
- virtual void do_OpenExternC(
- bool i_bOnlyForOneDeclaration ) = 0;
- virtual void do_OpenClass(
- ary::cpp::Class & io_rOpenedClass ) = 0;
- virtual void do_OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum ) = 0;
- virtual void do_CloseBlock() = 0;
- virtual void do_CloseClass() = 0;
- virtual void do_CloseEnum() = 0;
- virtual void do_SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection ) = 0;
- virtual void do_OpenTemplate(
- const StringVector &
- i_rParameters ) = 0;
- virtual DYN StringVector *
- do_Get_CurTemplateParameters() = 0;
- virtual void do_Close_OpenTemplate() = 0;
- virtual void do_Event_Class_FinishedBase(
- const String & i_sBaseName ) = 0;
-
- virtual void do_Event_Store_Typedef(
- ary::cpp::Typedef & io_rTypedef ) = 0;
- virtual void do_Event_Store_EnumValue(
- ary::cpp::EnumValue &
- io_rEnumValue ) = 0;
- virtual void do_Event_Store_CppDefinition(
- ary::cpp::DefineEntity &
- io_rDefinition ) = 0;
- virtual void do_Event_EnterFunction_ParameterList() = 0;
- virtual void do_Event_Function_FinishedParameter(
- const String & i_sParameterName ) = 0;
- virtual void do_Event_LeaveFunction_ParameterList() = 0;
- virtual void do_Event_EnterFunction_Implementation() = 0;
- virtual void do_Event_LeaveFunction_Implementation() = 0;
- virtual void do_Event_Store_Function(
- ary::cpp::Function &
- io_rFunction ) = 0;
- virtual void do_Event_Store_Variable(
- ary::cpp::Variable &
- io_rVariable ) = 0;
- virtual void do_StartWaitingFor_Recovery() = 0;
- virtual ary::cpp::Gate &
- inq_AryGate() const = 0;
- virtual const ary::cpp::InputContext &
- inq_Context() const = 0;
- virtual String inq_CurFileName() const = 0;
- virtual uintt inq_LineCount() const = 0;
- virtual bool inq_IsWaitingFor_Recovery() const = 0;
- virtual bool inq_IsExternC() const = 0;
-};
-
-
-
-// IMPLEMENTATION
-
-inline void
-PeEnvironment::SetTokenResult( E_TokenDone i_eDone,
- E_EnvStackAction i_eWhat2DoWithEnvStack,
- ParseEnvironment * i_pParseEnv2Push )
- { do_SetTokenResult(i_eDone, i_eWhat2DoWithEnvStack, i_pParseEnv2Push); }
-inline void
-PeEnvironment::OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
- { do_OpenNamespace(io_rOpenedNamespace); }
-inline void
-PeEnvironment::OpenExternC( bool i_bOnlyForOneDeclaration )
- { do_OpenExternC(i_bOnlyForOneDeclaration); }
-inline void
-PeEnvironment::OpenClass( ary::cpp::Class & io_rOpenedClass )
- { do_OpenClass(io_rOpenedClass); }
-inline void
-PeEnvironment::OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
- { do_OpenEnum(io_rOpenedEnum); }
-inline void
-PeEnvironment::CloseBlock()
- { do_CloseBlock(); }
-inline void
-PeEnvironment::CloseClass()
- { do_CloseClass(); }
-inline void
-PeEnvironment::CloseEnum()
- { do_CloseEnum(); }
-inline void
-PeEnvironment::SetCurProtection( ary::cpp::E_Protection i_eProtection )
- { do_SetCurProtection(i_eProtection); }
-inline void
-PeEnvironment::OpenTemplate( const StringVector & i_rParameters )
- { do_OpenTemplate(i_rParameters); }
-inline DYN StringVector *
-PeEnvironment::Get_CurTemplateParameters()
- { return do_Get_CurTemplateParameters(); }
-inline void
-PeEnvironment::Close_OpenTemplate()
- { do_Close_OpenTemplate(); }
-inline void
-PeEnvironment::Event_Class_FinishedBase( const String & i_sBaseName )
- { do_Event_Class_FinishedBase(i_sBaseName); }
-inline void
-PeEnvironment::Event_Store_Typedef( ary::cpp::Typedef & io_rTypedef )
- { do_Event_Store_Typedef(io_rTypedef); }
-inline void
-PeEnvironment::Event_Store_EnumValue( ary::cpp::EnumValue & io_rEnumValue )
- { do_Event_Store_EnumValue(io_rEnumValue); }
-inline void
-PeEnvironment::Event_Store_CppDefinition( ary::cpp::DefineEntity & io_rDefinition )
- { do_Event_Store_CppDefinition(io_rDefinition); }
-inline void
-PeEnvironment::Event_EnterFunction_ParameterList()
- { do_Event_EnterFunction_ParameterList(); }
-inline void
-PeEnvironment::Event_Function_FinishedParameter( const String & i_sParameterName )
- { do_Event_Function_FinishedParameter(i_sParameterName); }
-inline void
-PeEnvironment::Event_LeaveFunction_ParameterList()
- { do_Event_LeaveFunction_ParameterList(); }
-inline void
-PeEnvironment::Event_EnterFunction_Implementation()
- { do_Event_EnterFunction_Implementation(); }
-inline void
-PeEnvironment::Event_LeaveFunction_Implementation()
- { do_Event_LeaveFunction_Implementation(); }
-inline void
-PeEnvironment::Event_Store_Function( ary::cpp::Function & io_rFunction )
- { do_Event_Store_Function(io_rFunction); }
-inline void
-PeEnvironment::Event_Store_Variable( ary::cpp::Variable & io_rVariable )
- { do_Event_Store_Variable(io_rVariable); }
-inline void
-PeEnvironment::StartWaitingFor_Recovery()
- { do_StartWaitingFor_Recovery(); }
-inline ary::cpp::Gate &
-PeEnvironment::AryGate() const
- { return inq_AryGate(); }
-inline const ary::cpp::InputContext &
-PeEnvironment::Context() const
- { return inq_Context(); }
-inline String
-PeEnvironment::CurFileName() const
- { return inq_CurFileName(); }
-inline uintt
-PeEnvironment::LineCount() const
- { return inq_LineCount(); }
-inline bool
-PeEnvironment::IsWaitingFor_Recovery() const
- { return inq_IsWaitingFor_Recovery(); }
-inline bool
-PeEnvironment::IsExternC() const
- { return inq_IsExternC(); }
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/preproc.cxx b/autodoc/source/parser/cpp/preproc.cxx
deleted file mode 100644
index 856736b96442..000000000000
--- a/autodoc/source/parser/cpp/preproc.cxx
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "preproc.hxx"
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/tpl/tpltools.hxx>
-#include "all_toks.hxx"
-#include "defdescr.hxx"
-#include <tools/tkpchars.hxx>
-#include "c_rcode.hxx"
-
-
-namespace cpp
-{
-
-
-PreProcessor::F_TOKENPROC PreProcessor::aTokProcs[PreProcessor::state_MAX] =
- {
- &PreProcessor::On_plain,
- &PreProcessor::On_expect_macro_bracket_left,
- &PreProcessor::On_expect_macro_param
- };
-
-
-PreProcessor::PreProcessor()
- : pCppExplorer(0),
- pSourceText(0),
- pCurValidDefines(0),
- // aTokens,
- eState(plain),
- pCurMacro(0),
- dpCurMacroName(0),
- // aCurMacroParams,
- aCurParamText(60000),
- nBracketInParameterCounter(0)
- // aBlockedMacroNames
-{
-}
-
-PreProcessor::~PreProcessor()
-{
-}
-
-void
-PreProcessor::AssignPartners( CodeExplorer & o_rCodeExplorer,
- CharacterSource & o_rCharSource,
- const MacroMap & i_rCurValidDefines )
-{
- pCppExplorer = &o_rCodeExplorer;
- pSourceText = &o_rCharSource;
- pCurValidDefines = &i_rCurValidDefines;
-}
-
-void
-PreProcessor::Process_Token( cpp::Token & let_drToken )
-{
- csv_assert(pCppExplorer != 0); // Implies pSourceText and pCurValidDefines.
-
- (this->*aTokProcs[eState])(let_drToken);
-}
-
-void
-PreProcessor::On_plain( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Identifier )
- {
- if (CheckForDefine(let_drToken))
- return;
- }
-
- pCppExplorer->Process_Token(let_drToken);
-}
-
-void
-PreProcessor::On_expect_macro_bracket_left( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Bracket_Left )
- {
- aCurParamText.seekp(0);
- eState = expect_macro_param;
- }
- else
- {
- pCppExplorer->Process_Token(*dpCurMacroName);
- dpCurMacroName = 0;
- pCppExplorer->Process_Token(let_drToken);
- eState = plain;
- }
-}
-
-void
-PreProcessor::On_expect_macro_param( cpp::Token & let_drToken )
-{
- if ( let_drToken.TypeId() == Tid_Bracket_Left )
- nBracketInParameterCounter++;
- else if ( let_drToken.TypeId() == Tid_Bracket_Right )
- {
- if ( nBracketInParameterCounter > 0 )
- nBracketInParameterCounter--;
- else
- {
- if ( NOT csv::no_str(aCurParamText.c_str()) )
- {
- aCurMacroParams.push_back( String(aCurParamText.c_str()) );
- }
- csv_assert( aCurMacroParams.size() == pCurMacro->ParamCount() );
-
- InterpretMacro();
- eState = plain;
- return;
- }
- }
- else if ( let_drToken.TypeId() == Tid_Comma AND nBracketInParameterCounter == 0 )
- {
- aCurMacroParams.push_back( String (aCurParamText.c_str()) );
- aCurParamText.seekp(0);
- return;
- }
-
- // KORR_FUTURE:
- // If in future whitespace is parsed also, that should match exactly and the
- // safety spaces, " ", here should be removed.
- aCurParamText << let_drToken.Text() << " ";
-}
-
-bool
-PreProcessor::CheckForDefine( cpp::Token & let_drToken )
-{
- String sTokenText(let_drToken.Text());
- pCurMacro = csv::value_from_map( *pCurValidDefines, sTokenText );
- if (pCurMacro == 0 )
- return false;
- for ( StringVector::const_iterator it = aBlockedMacroNames.begin();
- it != aBlockedMacroNames.end();
- ++it )
- {
- if ( strcmp( (*it).c_str(), let_drToken.Text() ) == 0 )
- return false;
- }
-
- if ( pCurMacro->DefineType() == DefineDescription::type_define )
- {
- delete &let_drToken;
-
- aCurParamText.seekp(0);
- pCurMacro->GetDefineText(aCurParamText);
-
- if ( aCurParamText.tellp() > 1 )
- pSourceText->InsertTextAtCurPos(aCurParamText.c_str());
- }
- else // ( pCurMacro->DefineType() == DefineDescription::type_macro )
- {
- dpCurMacroName = &let_drToken;
- eState = expect_macro_bracket_left;
- csv::erase_container( aCurMacroParams );
- aCurParamText.seekp(0);
- nBracketInParameterCounter = 0;
- } // endif
-
- return true;
-}
-
-void
-PreProcessor::UnblockMacro( const char * i_sMacroName )
-{
- for ( StringVector::iterator it = aBlockedMacroNames.begin();
- it != aBlockedMacroNames.end();
- ++it )
- {
- if ( strcmp( (*it), i_sMacroName ) == 0 )
- {
- aBlockedMacroNames.erase(it);
- break;
- }
- } /// end for
-}
-
-void
-PreProcessor::InterpretMacro()
-{
- aCurParamText.seekp(0);
- pCurMacro->GetMacroText(aCurParamText, aCurMacroParams);
-
- if ( NOT csv::no_str(aCurParamText.c_str()) )
- {
- aCurParamText.seekp(-1, csv::cur);
- aCurParamText << " #unblock-" << dpCurMacroName->Text() << " ";
-
- pSourceText->InsertTextAtCurPos(aCurParamText.c_str());
- String sCurMacroName(dpCurMacroName->Text());
- aBlockedMacroNames.insert( aBlockedMacroNames.begin(), sCurMacroName );
- }
-
- delete dpCurMacroName;
- dpCurMacroName = 0;
- pCurMacro = 0;
- csv::erase_container(aCurMacroParams);
- aCurParamText.seekp(0);
-}
-
-
-} // end namespace cpp
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/preproc.hxx b/autodoc/source/parser/cpp/preproc.hxx
deleted file mode 100644
index 0f78e5affb1f..000000000000
--- a/autodoc/source/parser/cpp/preproc.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- 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_CPP_PREPROC_HXX
-#define ADC_CPP_PREPROC_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
- // COMPONENTS
-#include <deque>
- // PARAMETERS
-
-class CharacterSource;
-
-
-namespace cpp
-{
-
-class Token;
-class CodeExplorer;
-class DefineDescription;
-
-
-class PreProcessor
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- PreProcessor();
- ~PreProcessor();
- // OPERATONS
- void AssignPartners(
- CodeExplorer & o_rCodeExplorer,
- CharacterSource & o_rCharSource,
- const MacroMap & i_rCurValidDefines );
- void Process_Token(
- cpp::Token & let_drToken );
- void UnblockMacro(
- const char * i_sMacroName );
- private:
- public: // Necessary for instantiation of static variable:
- enum E_State
- {
- plain = 0,
- expect_macro_bracket_left,
- expect_macro_param,
- state_MAX
- };
- typedef void (PreProcessor::* F_TOKENPROC )(cpp::Token &);
- void On_plain( cpp::Token & );
- void On_expect_macro_bracket_left( cpp::Token & );
- void On_expect_macro_param( cpp::Token & );
-
- private: // Reprivate again:
- typedef std::deque< DYN cpp::Token * > TokenQueue;
- typedef StringVector List_MacroParams;
-
-
- bool CheckForDefine(
- cpp::Token & let_drToken );
- void InterpretMacro();
-
- // DATA
- static F_TOKENPROC aTokProcs[state_MAX];
- // Referenced extern objects
- CodeExplorer * pCppExplorer;
- CharacterSource * pSourceText;
- const MacroMap * pCurValidDefines;
-
- // internal data
- TokenQueue aTokens;
-
- E_State eState;
-
- DefineDescription * pCurMacro;
- DYN Token * dpCurMacroName;
- List_MacroParams aCurMacroParams;
- csv::StreamStr aCurParamText;
-
- intt nBracketInParameterCounter;
- StringVector aBlockedMacroNames;
-};
-
-
-
-} // end namespace cpp
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/prs_cpp.cxx b/autodoc/source/parser/cpp/prs_cpp.cxx
deleted file mode 100644
index 6cda9eab509a..000000000000
--- a/autodoc/source/parser/cpp/prs_cpp.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include <cpp/prs_cpp.hxx>
-
-
-// NOT FULLY DEFINED SERVICES
-#include <cosv/file.hxx>
-#include <ary/ary.hxx>
-#include <ary/cpp/c_gate.hxx>
-#include <autodoc/prs_docu.hxx>
-#include <autodoc/filecoli.hxx>
-#include <autodoc/x_parsing.hxx>
-#include <tools/tkpchars.hxx>
-#include <adc_cl.hxx>
-#include "c_dealer.hxx"
-#include "defdescr.hxx"
-#include "tkp_cpp.hxx"
-
-
-// Helper function
-static bool Local_LoadFile(
- CharacterSource & o_rTextBuffer,
- const String & i_rFullFilePath );
-
-
-
-
-namespace cpp
-{
-
-// This class is used for the UDK as workaround for the missing
-// feature of parsing #define s.
-
-class Udk_MacroMap
-{
- public:
- typedef std::map< String , DefineDescription* > Data;
-
- Udk_MacroMap();
- ~Udk_MacroMap();
-
- const Data & GetData() const { return aData; }
-
- private:
- Data aData;
-};
-
-struct S_RunningData
-{
- CharacterSource aFileContent;
- ary::cpp::Gate & rCppGate;
- Udk_MacroMap aMacros;
- Distributor aDealer;
- TokenParser_Cpp aTkp;
-
- S_RunningData(
- ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc &
- i_rDocumentationInterpreter );
-};
-
-
-
-
-Cpluplus_Parser::Cpluplus_Parser()
-// : pRunningData
-{
-}
-
-Cpluplus_Parser::~Cpluplus_Parser()
-{
-}
-
-void
-Cpluplus_Parser::Setup( ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc & i_rDocumentationInterpreter )
-{
- pRunningData = new S_RunningData(o_rRepository, i_rDocumentationInterpreter);
-}
-
-void
-Cpluplus_Parser::Run( const autodoc::FileCollector_Ifc & i_rFiles )
-{
- for ( autodoc::FileCollector_Ifc::const_iterator iter = i_rFiles.Begin();
- iter != i_rFiles.End();
- ++iter )
- {
- csv::ploc::Path
- aFilePath(*iter);
-
- try
- {
- if ( NOT Local_LoadFile(pRunningData->aFileContent, *iter) )
- continue;
- for ( pRunningData->aTkp.StartNewFile(aFilePath);
- pRunningData->aTkp.HasMore();
- pRunningData->aTkp.GetNextToken() )
- ;
- }
- catch (autodoc::X_Parser_Ifc & rX_Parse)
- {
- if ( DEBUG_ShowStoring() OR DEBUG_ShowText() )
- Cerr() << rX_Parse << Endl();
- }
- catch (...)
- {
- if ( DEBUG_ShowStoring() OR DEBUG_ShowText() )
- Cerr() << "Error: Unknown exception." << Endl();
- }
- } // end for (iter)
-}
-
-S_RunningData::S_RunningData( ary::Repository & o_rRepository,
- const autodoc::DocumentationParser_Ifc & i_rDocumentationInterpreter )
- : aFileContent(),
- rCppGate( o_rRepository.Gate_Cpp() ),
- aMacros(),
- aDealer(o_rRepository.Gate_Cpp()),
- aTkp( * i_rDocumentationInterpreter.Create_DocuContext() )
-{
- aDealer.AssignPartners( aFileContent,
- aMacros.GetData() );
- aTkp.AssignPartners( aFileContent, aDealer );
-}
-
-
-Udk_MacroMap::Udk_MacroMap()
-{
- String sSAL_CALL("SAL_CALL");
- String sSAL_CALL_ELLIPSE("SAL_CALL_ELLIPSE");
- String sSAL_NO_VTABLE("SAL_NO_VTABLE");
- String sREGISTRY_CALLTYPE("REGISTRY_CALLTYPE");
- String sSAL_THROW("SAL_THROW");
- String sSAL_THROW_EXTERN_C("SAL_THROW_EXTERN_C");
-
- String s__DEF_COMPIMPLHELPER_A("__DEF_COMPIMPLHELPER_A");
- String s__DEF_COMPIMPLHELPER_B("__DEF_COMPIMPLHELPER_B");
- String s__DEF_COMPIMPLHELPER("__DEF_COMPIMPLHELPER");
-
- String s__DEF_IMPLHELPER_PRE("__DEF_IMPLHELPER_PRE");
- String s__IFC_WRITEOFFSET("__IFC_WRITEOFFSET");
- String s__DEF_IMPLHELPER_POST("__DEF_IMPLHELPER_POST");
-
- String sSAL_EXCEPTION_DLLPUBLIC_EXPORT("SAL_EXCEPTION_DLLPUBLIC_EXPORT");
- String sSAL_EXCEPTION_DLLPRIVATE("SAL_EXCEPTION_DLLPRIVATE");
-
-
- StringVector aEmpty;
-
- StringVector aParamsSAL_THROW;
- aParamsSAL_THROW.push_back( String ("exc") );
- StringVector aDefSAL_THROW;
- aDefSAL_THROW.push_back( String ("throw") );
- aDefSAL_THROW.push_back( String ("exc") );
-
- StringVector aCompImplHelperParams;
- aCompImplHelperParams.push_back(String ("N"));
-
-
- // filling up the list
-
-
- aData[sSAL_CALL] = new DefineDescription(sSAL_CALL, aEmpty);
- aData[sSAL_CALL_ELLIPSE] = new DefineDescription(sSAL_CALL_ELLIPSE, aEmpty);
- aData[sSAL_NO_VTABLE] = new DefineDescription(sSAL_NO_VTABLE, aEmpty);
- aData[sREGISTRY_CALLTYPE] = new DefineDescription(sREGISTRY_CALLTYPE, aEmpty);
-
- aData[sSAL_THROW] = new DefineDescription(sSAL_THROW, aParamsSAL_THROW, aDefSAL_THROW);
- aData[sSAL_THROW_EXTERN_C] = new DefineDescription(sSAL_THROW_EXTERN_C, aEmpty, aEmpty);
-
- aData[s__DEF_COMPIMPLHELPER_A]
- = new DefineDescription( s__DEF_COMPIMPLHELPER_A, aCompImplHelperParams, aEmpty);
- aData[s__DEF_COMPIMPLHELPER_B]
- = new DefineDescription(s__DEF_COMPIMPLHELPER_B, aCompImplHelperParams, aEmpty);
- aData[s__DEF_COMPIMPLHELPER]
- = new DefineDescription(s__DEF_COMPIMPLHELPER, aCompImplHelperParams, aEmpty);
-
- aData[s__DEF_IMPLHELPER_PRE]
- = new DefineDescription(s__DEF_IMPLHELPER_PRE, aCompImplHelperParams, aEmpty);
- aData[s__IFC_WRITEOFFSET]
- = new DefineDescription(s__IFC_WRITEOFFSET, aCompImplHelperParams, aEmpty);
- aData[s__DEF_IMPLHELPER_POST]
- = new DefineDescription(s__DEF_IMPLHELPER_POST, aCompImplHelperParams, aEmpty);
-
- aData[sSAL_EXCEPTION_DLLPUBLIC_EXPORT]
- = new DefineDescription(sSAL_EXCEPTION_DLLPUBLIC_EXPORT, aEmpty);
- aData[sSAL_EXCEPTION_DLLPRIVATE]
- = new DefineDescription(sSAL_EXCEPTION_DLLPRIVATE, aEmpty);
-}
-
-Udk_MacroMap::~Udk_MacroMap()
-{
- for ( Data::iterator it = aData.begin(); it != aData.end(); ++it )
- {
- delete (*it).second;
- }
-}
-
-
-
-} // namespace cpp
-
-
-bool
-Local_LoadFile( CharacterSource & o_rTextBuffer,
- const String & i_rFullFilePath )
-{
- Cout() << "Parse " << i_rFullFilePath << " ..." << Endl();
-
- csv::File aFile( i_rFullFilePath, csv::CFM_READ );
- if (NOT aFile.open())
- {
- Cerr() << " could not be opened.\n" << Endl();
- return false;
- }
- o_rTextBuffer.LoadText(aFile);
- aFile.close();
- return true;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sdocdist.hxx b/autodoc/source/parser/cpp/sdocdist.hxx
deleted file mode 100644
index 10e6fd4dced8..000000000000
--- a/autodoc/source/parser/cpp/sdocdist.hxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- 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_CPP_SDOCDIST_HXX
-#define ADC_CPP_SDOCDIST_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
-#include <ary/info/docstore.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-using ary::Documentation;
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-
-struct ContextForAry::S_DocuDistributor : public ary::info::DocuStore
-{
- public:
- S_DocuDistributor() : pCurRe(0) {}
- ~S_DocuDistributor() {}
-
- void Reset() { pCurRe = 0; pLastStoredDocu = 0; }
-
- void SetCurrentlyStoredRe(
- ary::cpp::CppEntity &
- io_rRe );
- void Event_LineBreak();
-
- private:
- // Interface ary::info::DocuStore
- virtual void do_Store2CurFile(
- DYN ary::doc::Node& let_drDocu );
- virtual void do_Store2CurNamespace(
- DYN ary::doc::Node& let_drDocu );
-
- virtual void do_Store2ConnectedDeclaration(
- DYN ary::doc::Node& let_drDocu );
-
- virtual void do_Store2Glossary(
- DYN ary::doc::Node& let_drDocu,
- const String & i_sExplainedTerm );
- virtual void do_Store2GlobalTexts(
- DYN ary::doc::Node& let_drDocu,
- ary::info::GlobalTextId
- i_nId );
- // DATA
- ary::cpp::CppEntity *
- pCurRe;
- Dyn<ary::doc::Node> pLastStoredDocu;
-};
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not all inline, because this file
- is included in cxt2ary.cxx only!
-*/
-
-
-void
-ContextForAry::
-S_DocuDistributor::SetCurrentlyStoredRe( ary::cpp::CppEntity & io_rRe )
-{
- pCurRe = &io_rRe;
- if ( pLastStoredDocu )
- pCurRe->Set_Docu( *pLastStoredDocu.Release() );
-}
-
-inline void
-ContextForAry::
-S_DocuDistributor::Event_LineBreak()
-{
- pCurRe = 0;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2CurFile( DYN ary::doc::Node & let_drDocu )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2CurNamespace( DYN ary::doc::Node & let_drDocu )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2ConnectedDeclaration( DYN ary::doc::Node & let_drDocu )
-{
- if ( pCurRe != 0 )
- pCurRe->Set_Docu(let_drDocu);
- else
- pLastStoredDocu = &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2Glossary( DYN ary::doc::Node & let_drDocu,
- const String & // i_sExplainedTerm
- )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-void
-ContextForAry::
-S_DocuDistributor::do_Store2GlobalTexts( DYN ary::doc::Node & let_drDocu,
- ary::info::GlobalTextId // i_nId
- )
-{
- // KORR_FUTURE
- delete &let_drDocu;
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sfscope.hxx b/autodoc/source/parser/cpp/sfscope.hxx
deleted file mode 100644
index 6f3eaa7b4225..000000000000
--- a/autodoc/source/parser/cpp/sfscope.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- 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_CPP_SFSCOPE_HXX
-#define ADC_CPP_SFSCOPE_HXX
-
-// USED SERVICES
-#include "cxt2ary.hxx"
-
-
-
-
-namespace cpp
-{
-
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_FileScopeInfo
-{
- ary::loc::File * pCurFile;
- uintt nLineCount;
- Dyn<StringVector> pCurTemplateParameters;
-
- S_FileScopeInfo();
-};
-
-
-
-
-// IMPLEMENTATION
-inline
-ContextForAry::
-S_FileScopeInfo::S_FileScopeInfo()
- : pCurFile(0),
- nLineCount(0),
- pCurTemplateParameters(0)
-{
-}
-
-
-
-
-} // namespace cpp
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/sownstck.hxx b/autodoc/source/parser/cpp/sownstck.hxx
deleted file mode 100644
index 5c00e40dabf7..000000000000
--- a/autodoc/source/parser/cpp/sownstck.hxx
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- 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_CPP_SOWNSTCK_HXX
-#define ADC_CPP_SOWNSTCK_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
- // COMPONENTS
-#include <ary/cpp/c_types4cpp.hxx>
-#include <estack.hxx>
- // PARAMETERS
-#include <ary/cpp/c_namesp.hxx>
-#include <x_parse.hxx>
-
-
-namespace cpp
-{
-
-using ary::cpp::E_Protection;
-
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_OwnerStack
-{
- public:
- S_OwnerStack();
- void SetGlobalNamespace(
- ary::cpp::Namespace &
- io_rGlobalNamespace );
- ~S_OwnerStack();
-
- void Reset();
-
- void OpenNamespace(
- ary::cpp::Namespace &
- io_rOpenedNamespace );
- void OpenExternC();
- void OpenClass(
- ary::cpp::Class & io_rOpenedClass );
- void OpenEnum(
- ary::cpp::Enum & io_rOpenedEnum );
- void CloseBlock();
- void CloseClass();
- void CloseEnum();
- void SetCurProtection(
- ary::cpp::E_Protection
- i_eProtection );
- ary::cpp::Namespace &
- CurNamespace() const;
- ary::cpp::Class * CurClass() const;
- ary::cpp::Enum * CurEnum() const;
-
- Owner & CurOwner() const;
- ary::cpp::E_Protection
- CurProtection() const;
- bool IsExternC() const { return nExternC > 0; }
-
- private:
- typedef std::pair< ary::cpp::Class*, E_Protection > ClassEnv;
- typedef EStack< ary::cpp::Namespace* > Stack_Namespaces;
- typedef EStack< ClassEnv > Stack_Classes;
- typedef ary::cpp::InputContext::Owner Ifc_Owner;
-
- void SetOwner_2CurNamespace();
- void SetOwner_2CurClass();
- void SetOwner_2None();
-
- // DATA
- Stack_Namespaces aStack_Namespaces;
- Stack_Classes aStack_Classes;
- ary::cpp::Enum * pCurEnum;
- uintt nExternC; /// This is a number, for the case that extern "C" blocks are nested.
-
- Dyn<Owner_Namespace>
- pOwner_Namespace;
- Dyn<Owner_Class> pOwner_Class;
- Ifc_Owner * pOwner_Cur;
-};
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not inline, because this file is included
- in cxt2ary.cxx only!
-*/
-
-inline ary::cpp::Namespace &
-ContextForAry::
-S_OwnerStack::CurNamespace() const
-{
- csv_assert( aStack_Namespaces.size() > 0 );
- return *aStack_Namespaces.top();
-}
-
-inline ary::cpp::Class *
-ContextForAry::
-S_OwnerStack::CurClass() const
-{
- return aStack_Classes.size() > 0
- ? aStack_Classes.top().first
- : (ary::cpp::Class *) 0;
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2CurNamespace()
-{
- csv_assert( aStack_Namespaces.size() > 0 );
- pOwner_Cur = pOwner_Namespace.MutablePtr();
- pOwner_Namespace->SetAnotherNamespace( CurNamespace() );
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2CurClass()
-{
- csv_assert( aStack_Classes.size() > 0 );
- pOwner_Cur = pOwner_Class.MutablePtr();
- pOwner_Class->SetAnotherClass( *CurClass() );
-}
-
-ContextForAry::
-S_OwnerStack::S_OwnerStack()
- : // aStack_Namespaces,
- // aStack_Classes,
- pCurEnum(0),
- nExternC(0),
- pOwner_Namespace(new Owner_Namespace),
- pOwner_Class(new Owner_Class),
- pOwner_Cur(0)
-{
-}
-
-void
-ContextForAry::
-S_OwnerStack::Reset()
-{
- while ( aStack_Namespaces.top()->Owner().IsValid() )
- aStack_Namespaces.pop();
- while ( NOT aStack_Classes.empty() )
- aStack_Classes.pop();
- pCurEnum = 0;
- nExternC = 0;
- SetOwner_2CurNamespace();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetGlobalNamespace( ary::cpp::Namespace & io_rGlobalNamespace )
-{
- csv_assert( aStack_Namespaces.size() == 0 );
- aStack_Namespaces.push(&io_rGlobalNamespace);
- SetOwner_2CurNamespace();
-}
-
-ContextForAry::
-S_OwnerStack::~S_OwnerStack()
-{
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
-{
- csv_assert( aStack_Namespaces.size() > 0 OR io_rOpenedNamespace.Parent() == 0 );
- aStack_Namespaces.push(&io_rOpenedNamespace);
- SetOwner_2CurNamespace();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenExternC()
-{
- ++nExternC;
-// SetOwner_2None();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetCurProtection( ary::cpp::E_Protection i_eProtection )
-{
- csv_assert( aStack_Classes.size() > 0 );
- aStack_Classes.top().second = i_eProtection;
-}
-
-inline ary::cpp::Enum *
-ContextForAry::
-S_OwnerStack::CurEnum() const
-{
- return pCurEnum;
-}
-
-
-inline ary::cpp::InputContext::Owner &
-ContextForAry::
-S_OwnerStack::CurOwner() const
-{
- csv_assert( pOwner_Cur != 0 );
- return *pOwner_Cur;
-}
-
-inline E_Protection
-ContextForAry::
-S_OwnerStack::CurProtection() const
-{
- return aStack_Classes.size() > 0
- ? aStack_Classes.top().second
- : ary::cpp::PROTECT_global;
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::SetOwner_2None()
-{
- pOwner_Cur = 0;
-}
-
-void
-ContextForAry::
-S_OwnerStack::OpenClass( ary::cpp::Class & io_rOpenedClass )
-{
- E_Protection eDefaultProtection
- = io_rOpenedClass.ClassKey() == ary::cpp::CK_class
- ? ary::cpp::PROTECT_private
- : ary::cpp::PROTECT_public;
- aStack_Classes.push( ClassEnv(&io_rOpenedClass, eDefaultProtection) );
- SetOwner_2CurClass();
-}
-
-inline void
-ContextForAry::
-S_OwnerStack::OpenEnum( ary::cpp::Enum & io_rOpenedEnum )
-{
- csv_assert( pCurEnum == 0 );
- pCurEnum = &io_rOpenedEnum;
- SetOwner_2None();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseBlock()
-{
- if (nExternC > 0)
- {
- --nExternC;
- }
- else
- {
- // csv_assert( aStack_Classes.size() == 0 );
- if ( aStack_Classes.size() > 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- csv_assert( pCurEnum == 0 );
- aStack_Namespaces.pop();
-
- // csv_assert( aStack_Namespaces.size() > 0 );
- if( aStack_Namespaces.size() == 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- }
- SetOwner_2CurNamespace();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseClass()
-{
- // csv_assert( aStack_Classes.size() > 0 );
- if ( aStack_Classes.size() == 0 )
- throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
-
- aStack_Classes.pop();
- if ( aStack_Classes.size() > 0 )
- SetOwner_2CurClass();
- else
- SetOwner_2CurNamespace();
-}
-
-void
-ContextForAry::
-S_OwnerStack::CloseEnum()
-{
- csv_assert( pCurEnum != 0 );
- pCurEnum = 0;
- if ( aStack_Classes.size() > 0 )
- SetOwner_2CurClass();
- else
- SetOwner_2CurNamespace();
-}
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/srecover.hxx b/autodoc/source/parser/cpp/srecover.hxx
deleted file mode 100644
index 8408604db3fd..000000000000
--- a/autodoc/source/parser/cpp/srecover.hxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- 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_CPP_SRECOVER_HXX
-#define ADC_CPP_SRECOVER_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include "cxt2ary.hxx"
-#include <ary/info/docstore.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp
-{
-
-/** Implementation struct for cpp::ContextForAry.
-*/
-struct ContextForAry::S_RecoveryGuard
-{
- public:
- S_RecoveryGuard();
- ~S_RecoveryGuard();
-
- void Reset() { bIsWithinRecovery = false; nBlockBracketsCounter = 0; }
-
- void StartWaitingFor_Recovery();
-
- void Hdl_SwBracketOpen();
- void Hdl_SwBracketClose();
- void Hdl_Semicolon();
-
- bool IsWithinRecovery() const;
-
- private:
- // DATA
- bool bIsWithinRecovery;
- intt nBlockBracketsCounter;
-};
-
-
-
-// IMPLEMENTATION
-
-/* The implementation is in header, though not all inline, because this file
- is included in cxt2ary.cxx only!
-*/
-
-ContextForAry::
-S_RecoveryGuard::S_RecoveryGuard()
- : bIsWithinRecovery(false),
- nBlockBracketsCounter(0)
-{
-}
-
-ContextForAry::
-S_RecoveryGuard::~S_RecoveryGuard()
-{
-}
-
-inline void
-ContextForAry::
-S_RecoveryGuard::StartWaitingFor_Recovery()
-{
- bIsWithinRecovery = true;
- nBlockBracketsCounter = 0;
-}
-
-void
-ContextForAry::
-S_RecoveryGuard::Hdl_SwBracketOpen()
-{
- if ( bIsWithinRecovery )
- ++nBlockBracketsCounter;
-}
-
-void
-ContextForAry::
-S_RecoveryGuard::Hdl_SwBracketClose()
-{
- if ( bIsWithinRecovery )
- --nBlockBracketsCounter;
-}
-
-inline void
-ContextForAry::
-S_RecoveryGuard::Hdl_Semicolon()
-{
- if (bIsWithinRecovery AND nBlockBracketsCounter == 0)
- bIsWithinRecovery = false;
-}
-
-inline bool
-ContextForAry::
-S_RecoveryGuard::IsWithinRecovery() const
-{
- return bIsWithinRecovery;
-}
-
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tkp_cpp.cxx b/autodoc/source/parser/cpp/tkp_cpp.cxx
deleted file mode 100644
index ffe0ca26dfdb..000000000000
--- a/autodoc/source/parser/cpp/tkp_cpp.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- 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.
- *
- ************************************************************************/
-
-#include <precomp.h>
-#include "tkp_cpp.hxx"
-
-// NOT FULLY DECLARED SERVICES
-#include "cx_c_std.hxx"
-#include "c_dealer.hxx"
-
-
-namespace cpp {
-
-
-
-
-TokenParser_Cpp::TokenParser_Cpp( DYN autodoc::TkpDocuContext & let_drDocuContext )
- : pBaseContext( new Context_CppStd( let_drDocuContext ) ),
- pCurContext(0),
- pDealer(0),
- pCharacterSource(0)
-{
- SetStartContext();
-}
-
-TokenParser_Cpp::~TokenParser_Cpp()
-{
-}
-
-void
-TokenParser_Cpp::AssignPartners( CharacterSource & io_rCharacterSource,
- cpp::Distributor & o_rDealer )
-{
- pDealer = &o_rDealer;
- pBaseContext->AssignDealer(o_rDealer);
- pCharacterSource = &io_rCharacterSource;
-}
-
-void
-TokenParser_Cpp::StartNewFile( const csv::ploc::Path & i_file )
-{
- csv_assert(pDealer != 0);
- pDealer->StartNewFile(i_file);
-
- csv_assert(pCharacterSource != 0);
- Start(*pCharacterSource);
-}
-
-void
-TokenParser_Cpp::SetStartContext()
-{
- pCurContext = pBaseContext.Ptr();
-}
-
-void
-TokenParser_Cpp::SetCurrentContext( TkpContext & io_rContext )
-{
- pCurContext = &io_rContext;
-}
-
-TkpContext &
-TokenParser_Cpp::CurrentContext()
-{
- return *pCurContext;
-}
-
-} // namespace cpp
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tkp_cpp.hxx b/autodoc/source/parser/cpp/tkp_cpp.hxx
deleted file mode 100644
index 70dfab605c6f..000000000000
--- a/autodoc/source/parser/cpp/tkp_cpp.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- 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_TKP_CPP_HXX
-#define ADC_TKP_CPP_HXX
-
-// USED SERVICES
- // BASE CLASSES
-#include <tokens/tkp.hxx>
- // COMPONENTS
- // PARAMETRS
-
-namespace autodoc
-{
- class TkpDocuContext;
-}
-
-namespace csv
-{
- namespace ploc
- {
- class Path;
- class DirectoryChain;
- }
-}
-
-
-namespace cpp {
-
-class Context_CppStd;
-class DefineDescription;
-class Distributor;
-
-
-/** This is a TokenParser which is able to parse tokens from
- C++ source code.
-*/
-class TokenParser_Cpp : public TokenParser
-{
- public:
- typedef std::map< String, DefineDescription* > MacroMap;
-
- // LIFECYCLE
- TokenParser_Cpp(
- DYN autodoc::TkpDocuContext &
- let_drDocuContext );
- virtual ~TokenParser_Cpp();
-
- // OPERATIONS
- void AssignPartners(
- CharacterSource & io_rCharacterSource,
- cpp::Distributor & o_rDealer );
- void StartNewFile(
- const csv::ploc::Path &
- i_file );
- private:
- virtual void SetStartContext();
- virtual void SetCurrentContext(
- TkpContext & io_rContext );
- virtual TkpContext &
- CurrentContext();
- // DATA
- Dyn<Context_CppStd> pBaseContext;
- TkpContext * pCurContext;
- Distributor * pDealer;
- CharacterSource * pCharacterSource;
-};
-
-
-} // namespace cpp
-
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/parser/cpp/tokintpr.hxx b/autodoc/source/parser/cpp/tokintpr.hxx
deleted file mode 100644
index f526ba00ee06..000000000000
--- a/autodoc/source/parser/cpp/tokintpr.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- 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_CPP_TOKINTPR_HXX
-#define ADC_CPP_TOKINTPR_HXX
-
-
-
-// USED SERVICES
- // BASE CLASSES
-#include <all_toks.hxx>
- // COMPONENTS
- // PARAMETERS
-
-namespace cpp {
-
-
-
-#define DECL_TOK_HANDLER(token) \
- void Hdl_##token( \
- const Tok_##token & i_rTok ) { Call_Handler(i_rTok); }
-
-class TokenInterpreter
-{
- public:
- virtual ~TokenInterpreter() {}
-
- DECL_TOK_HANDLER(Identifier)
- DECL_TOK_HANDLER(Operator)
- DECL_TOK_HANDLER(operator)
- DECL_TOK_HANDLER(class)
- DECL_TOK_HANDLER(struct)
- DECL_TOK_HANDLER(union)
- DECL_TOK_HANDLER(enum)
- DECL_TOK_HANDLER(typedef)
- DECL_TOK_HANDLER(public)
- DECL_TOK_HANDLER(protected)
- DECL_TOK_HANDLER(private)
- DECL_TOK_HANDLER(template)
- DECL_TOK_HANDLER(virtual)
- DECL_TOK_HANDLER(friend)
- DECL_TOK_HANDLER(Tilde)
- DECL_TOK_HANDLER(const)
- DECL_TOK_HANDLER(volatile)
- DECL_TOK_HANDLER(extern)
- DECL_TOK_HANDLER(static)
- DECL_TOK_HANDLER(mutable)
- DECL_TOK_HANDLER(register)
- DECL_TOK_HANDLER(inline)
- DECL_TOK_HANDLER(explicit)
- DECL_TOK_HANDLER(namespace)
- DECL_TOK_HANDLER(using)
- DECL_TOK_HANDLER(throw)
- DECL_TOK_HANDLER(SwBracket_Left)
- DECL_TOK_HANDLER(SwBracket_Right)
- DECL_TOK_HANDLER(ArrayBracket_Left)
- DECL_TOK_HANDLER(ArrayBracket_Right)
- DECL_TOK_HANDLER(Bracket_Left)
- DECL_TOK_HANDLER(Bracket_Right)
- DECL_TOK_HANDLER(DoubleColon)
- DECL_TOK_HANDLER(Semicolon)
- DECL_TOK_HANDLER(Comma)
- DECL_TOK_HANDLER(Colon)
- DECL_TOK_HANDLER(Assign)
- DECL_TOK_HANDLER(Less)
- DECL_TOK_HANDLER(Greater)
- DECL_TOK_HANDLER(Asterix)
- DECL_TOK_HANDLER(AmpersAnd)
- DECL_TOK_HANDLER(Ellipse)
- DECL_TOK_HANDLER(typename)
- DECL_TOK_HANDLER(DefineName)
- DECL_TOK_HANDLER(MacroName)
- DECL_TOK_HANDLER(MacroParameter)
- DECL_TOK_HANDLER(PreProDefinition)
- DECL_TOK_HANDLER(BuiltInType)
- DECL_TOK_HANDLER(TypeSpecializer)
- DECL_TOK_HANDLER(Constant)
-
- protected:
- virtual void Call_Handler(
- const cpp::Token & i_rTok ) = 0;
-};
-
-#undef DECL_TOK_HANDLER
-
-
-// IMPLEMENTATION
-
-
-} // namespace cpp
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */