1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tkp2.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
37 class CharacterSource
;
43 /** This is the interface for parser classes, which get a sequence of Token s from
46 Start() starts to parse the text from the given i_rSource.
47 GetNextToken() returns a Token on the heap as long as there are
48 still characters in the text left. The last time GetNextToken()
51 The algorithms for parsing tokens from the text are an issue of
59 virtual ~TokenParse2() {}
66 /** @short Gets the next identifiable token out of the
68 @return true, if there was passed a valid token.
69 false, if the parsed stream is finished or
75 virtual void SetStartContext() = 0;
76 virtual void SetCurrentContext(
77 TkpContext
& io_rContext
) = 0;
81 CharacterSource
* pChars
;