diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-01-28 20:56:31 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-01-28 20:56:31 +0100 |
commit | c687d917f059089d41545c995597357568adce92 (patch) | |
tree | 9e9f67205cd5b72f1031721273e1534a3a1e5b0f /autodoc/source/parser_i/tokens | |
parent | 85e7f01992844cc9f1fbba855075f0c59b2942c4 (diff) |
replace obsolete "master" branch with README that points at new repoHEADmaster-deletedmaster
Diffstat (limited to 'autodoc/source/parser_i/tokens')
-rw-r--r-- | autodoc/source/parser_i/tokens/makefile.mk | 63 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/stmstar2.cxx | 104 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/stmstat2.cxx | 48 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/stmstfi2.cxx | 63 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/tkp2.cxx | 64 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/tkpcont2.cxx | 67 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/tkpstam2.cxx | 177 | ||||
-rw-r--r-- | autodoc/source/parser_i/tokens/x_parse2.cxx | 63 |
8 files changed, 0 insertions, 649 deletions
diff --git a/autodoc/source/parser_i/tokens/makefile.mk b/autodoc/source/parser_i/tokens/makefile.mk deleted file mode 100644 index 9674e668..00000000 --- a/autodoc/source/parser_i/tokens/makefile.mk +++ /dev/null @@ -1,63 +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=garden -TARGET=parser2_tokens -TARGETTYPE=CUI - - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=true -PRJINC=$(PRJ)$/source - - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk - - - -# --- Files -------------------------------------------------------- - -OBJFILES= \ - $(OBJ)$/stmstar2.obj \ - $(OBJ)$/stmstat2.obj \ - $(OBJ)$/stmstfi2.obj \ - $(OBJ)$/tkpstam2.obj \ - $(OBJ)$/tkp2.obj \ - $(OBJ)$/tkpcont2.obj \ - $(OBJ)$/x_parse2.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - - diff --git a/autodoc/source/parser_i/tokens/stmstar2.cxx b/autodoc/source/parser_i/tokens/stmstar2.cxx deleted file mode 100644 index f8894451..00000000 --- a/autodoc/source/parser_i/tokens/stmstar2.cxx +++ /dev/null @@ -1,104 +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 <tokens/stmstar2.hxx> - - -// NOT FULLY DECLARED SERVICES -#include <x_parse2.hxx> - - - -StmArrayStatu2::StmArrayStatu2( intt i_nStatusSize, - const INT16 * in_aArrayModel, - uintt i_nTokenId, - bool in_bIsDefault ) - : dpBranches(new StmStatu2::Branch[i_nStatusSize]), - nNrOfBranches(i_nStatusSize), - nTokenId(UINT16(i_nTokenId)), - bIsADefault(in_bIsDefault) -{ - // KORR_FUTURE: Interface of StmArrayStatu2() has to be changed. - csv_assert(i_nTokenId < 64536); - - if (in_aArrayModel != 0) - { - intt count = 0; - for (const INT16 * get = in_aArrayModel; count < nNrOfBranches; count++, get++) - dpBranches[count] = *get; - } - else // - { - memset(dpBranches, 0, nNrOfBranches); - } // endif -} - -StmArrayStatu2::~StmArrayStatu2() -{ - delete [] dpBranches; -} - -bool -StmArrayStatu2::SetBranch( intt in_nBranchIx, - StmStatu2::Branch in_nBranch ) -{ - if ( csv::in_range(intt(0), in_nBranchIx, intt(nNrOfBranches) ) ) - { - dpBranches[in_nBranchIx] = in_nBranch; - return true; - } - return false; -} - - -StmStatu2::Branch -StmArrayStatu2::NextBy(intt in_nIndex) const -{ - if (in_nIndex < 0) - throw X_AutodocParser(X_AutodocParser::x_InvalidChar); - - return in_nIndex < nNrOfBranches - ? dpBranches[in_nIndex] - : dpBranches[nNrOfBranches - 1]; -} - - -bool -StmArrayStatu2::IsADefault() const -{ - return bIsADefault; -} - -StmArrayStatu2 * -StmArrayStatu2::AsArray() -{ - return this; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/stmstat2.cxx b/autodoc/source/parser_i/tokens/stmstat2.cxx deleted file mode 100644 index 701bfa33..00000000 --- a/autodoc/source/parser_i/tokens/stmstat2.cxx +++ /dev/null @@ -1,48 +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 <tokens/stmstat2.hxx> - - -// NOT FULLY DECLARED SERVICES - -StmArrayStatu2 * -StmStatu2::AsArray() -{ - return 0; -} - -StmBoundsStatu2 * -StmStatu2::AsBounds() -{ - return 0; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/stmstfi2.cxx b/autodoc/source/parser_i/tokens/stmstfi2.cxx deleted file mode 100644 index 52801190..00000000 --- a/autodoc/source/parser_i/tokens/stmstfi2.cxx +++ /dev/null @@ -1,63 +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 <tokens/stmstfi2.hxx> - - -// NOT FULLY DECLARED SERVICES -#include <tokens/tkpcont2.hxx> - - -StmBoundsStatu2::StmBoundsStatu2( StateMachineContext & - o_rOwner, - TkpContext & i_rFollowUpContext, - uintt i_nStatusFunctionNr, - bool i_bIsDefault ) - : pOwner(&o_rOwner), - pFollowUpContext(&i_rFollowUpContext), - nStatusFunctionNr(i_nStatusFunctionNr), - bIsDefault(i_bIsDefault) -{ -} - -bool -StmBoundsStatu2::IsADefault() const -{ - return bIsDefault; -} - -StmBoundsStatu2 * -StmBoundsStatu2::AsBounds() -{ - return this; -} - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/tkp2.cxx b/autodoc/source/parser_i/tokens/tkp2.cxx deleted file mode 100644 index 95021501..00000000 --- a/autodoc/source/parser_i/tokens/tkp2.cxx +++ /dev/null @@ -1,64 +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 <tokens/tkp2.hxx> - -// NOT FULLY DECLARED SERVICES -#include <tools/tkpchars.hxx> -#include <tokens/tkpcont2.hxx> - -TokenParse2::TokenParse2() - : pChars(0) -{ -} - -void -TokenParse2::Start( CharacterSource & i_rSource ) -{ - pChars = &i_rSource; - SetStartContext(); -} - -bool -TokenParse2::GetNextToken() -{ - csv_assert(pChars != 0); - - bool bDone = false; - while ( NOT bDone AND NOT pChars->IsFinished() ) - { - CurrentContext().ReadCharChain(*pChars); - bDone = CurrentContext().PassNewToken(); - SetCurrentContext(CurrentContext().FollowUpContext()); - } - return bDone; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/tkpcont2.cxx b/autodoc/source/parser_i/tokens/tkpcont2.cxx deleted file mode 100644 index 73c93c5e..00000000 --- a/autodoc/source/parser_i/tokens/tkpcont2.cxx +++ /dev/null @@ -1,67 +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 <tokens/tkpcont2.hxx> - -// NOT FULLY DECLARED SERVICES - - - -TkpNullContex2 G_aNullContex2; - -TkpNullContex2 & -TkpContext_Null2_() -{ - return G_aNullContex2; -} - -TkpNullContex2::~TkpNullContex2() -{ -} - -void -TkpNullContex2::ReadCharChain( CharacterSource & ) -{ -} - -bool -TkpNullContex2::PassNewToken() -{ - return false; -} - -TkpContext & -TkpNullContex2::FollowUpContext() -{ - return *this; -} - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/tkpstam2.cxx b/autodoc/source/parser_i/tokens/tkpstam2.cxx deleted file mode 100644 index 39cf31e1..00000000 --- a/autodoc/source/parser_i/tokens/tkpstam2.cxx +++ /dev/null @@ -1,177 +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 <tokens/tkpstam2.hxx> - -// NOT FULLY DECLARED SERVICES -#include <tokens/stmstar2.hxx> -#include <tools/tkpchars.hxx> - - -const intt C_nStatuslistResizeValue = 32; -const intt C_nTopStatus = 0; - -StateMachin2::StateMachin2( intt in_nStatusSize, - intt in_nInitial_StatusListSize ) - : pStati(new StmStatu2*[in_nInitial_StatusListSize]), - nCurrentStatus(C_nTopStatus), - nPeekedStatus(C_nTopStatus), - nStatusSize(in_nStatusSize), - nNrofStati(0), - nStatiSpace(in_nInitial_StatusListSize) -{ - csv_assert(in_nStatusSize > 0); - csv_assert(in_nInitial_StatusListSize > 0); - - memset(pStati, 0, sizeof(StmStatu2*) * nStatiSpace); -} - -intt -StateMachin2::AddStatus(StmStatu2 * let_dpStatus) -{ - if (nNrofStati == nStatiSpace) - { - ResizeStati(); - } - pStati[nNrofStati] = let_dpStatus; - return nNrofStati++; -} - -void -StateMachin2::AddToken( const char * in_sToken, - UINT16 in_nTokenId, - const INT16 * in_aBranches, - INT16 in_nBoundsStatus ) -{ - if (csv::no_str(in_sToken)) - return; - - // Durch existierende Stati durchhangeln: - nCurrentStatus = 0; - nPeekedStatus = 0; - - for ( const char * pChar = in_sToken; - *pChar != NULCH; - ++pChar ) - { - Peek(*pChar); - StmStatu2 & rPst = Status(nPeekedStatus); - if ( rPst.IsADefault() OR rPst.AsBounds() != 0 ) - { - nPeekedStatus = AddStatus( new StmArrayStatu2(nStatusSize, in_aBranches, 0, false ) ); - CurrentStatus().SetBranch( *pChar, nPeekedStatus ); - } - nCurrentStatus = nPeekedStatus; - } // end for - StmArrayStatu2 & rLastStatus = CurrentStatus(); - rLastStatus.SetTokenId(in_nTokenId); - for (intt i = 0; i < nStatusSize; i++) - { - if (Status(rLastStatus.NextBy(i)).AsBounds() != 0) - rLastStatus.SetBranch(i,in_nBoundsStatus); - } // end for -} - -StateMachin2::~StateMachin2() -{ - for (intt i = 0; i < nNrofStati; i++) - { - delete pStati[i]; - } - delete [] pStati; -} - -StmBoundsStatu2 & -StateMachin2::GetCharChain( UINT16 & o_nTokenId, - CharacterSource & io_rText ) -{ - nCurrentStatus = C_nTopStatus; - Peek(io_rText.CurChar()); - while (BoundsStatus() == 0) - { - nCurrentStatus = nPeekedStatus; - Peek(io_rText.MoveOn()); - } - o_nTokenId = CurrentStatus().TokenId(); - - return *BoundsStatus(); -} - -void -StateMachin2::ResizeStati() -{ - intt nNewSize = nStatiSpace + C_nStatuslistResizeValue; - intt i = 0; - StatusList pNewStati = new StmStatu2*[nNewSize]; - - for ( ; i < nNrofStati; i++) - { - pNewStati[i] = pStati[i]; - } - memset( pNewStati+i, - 0, - (nNewSize-i) * sizeof(StmStatu2*) ); - - delete [] pStati; - pStati = pNewStati; - nStatiSpace = nNewSize; -} - -StmStatu2 & -StateMachin2::Status(intt in_nStatusNr) const -{ - csv_assert( csv::in_range(intt(0), in_nStatusNr, intt(nNrofStati)) ); - return *pStati[in_nStatusNr]; -} - -StmArrayStatu2 & -StateMachin2::CurrentStatus() const -{ - StmArrayStatu2 * pCurSt = Status(nCurrentStatus).AsArray(); - if (pCurSt == 0) - { - csv_assert(false); - } - return *pCurSt; -} - -StmBoundsStatu2 * -StateMachin2::BoundsStatus() const -{ - return Status(nPeekedStatus).AsBounds(); -} - -void -StateMachin2::Peek(intt in_nBranch) -{ - StmArrayStatu2 & rSt = CurrentStatus(); - nPeekedStatus = rSt.NextBy(in_nBranch); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/autodoc/source/parser_i/tokens/x_parse2.cxx b/autodoc/source/parser_i/tokens/x_parse2.cxx deleted file mode 100644 index 8824d2cc..00000000 --- a/autodoc/source/parser_i/tokens/x_parse2.cxx +++ /dev/null @@ -1,63 +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 <x_parse2.hxx> - -// NOT FULLY DECLARED SERVICES - - enum E_Type - { - x_Any = 0, - x_InvalidChar, - x_UnexpectedEOF - }; -void -X_AutodocParser::GetInfo( std::ostream & o_rOutputMedium ) const -{ - switch (eType) - { - case x_Any: - o_rOutputMedium << "Unspecified parsing exception ." << Endl(); - break; - case x_InvalidChar: - o_rOutputMedium << "Unknown character during parsing." << Endl(); - break; - case x_UnexpectedToken: - o_rOutputMedium << "Unexpected token " << sName << " found." << Endl(); - break; - case x_UnexpectedEOF: - o_rOutputMedium << "Unexpected end of file found." << Endl(); - break; - default: - o_rOutputMedium << "Unknown exception during parsing." << Endl(); - } -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |