Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef ADC_TOKPROCT_HXX
21 : #define ADC_TOKPROCT_HXX
22 :
23 :
24 :
25 : // USED SERVICES
26 : // BASE CLASSES
27 : // COMPONENTS
28 : // PARAMETERS
29 :
30 :
31 : namespace csi
32 : {
33 : namespace uidl
34 : {
35 :
36 :
37 : class UnoIDL_PE;
38 :
39 :
40 : /** is a parent class for classes, which take part in parsing tokens semantically.
41 : It provides some types for them.
42 : */
43 294 : class TokenProcessing_Types
44 : {
45 : public:
46 : enum E_TokenDone
47 : {
48 : not_done = 0,
49 : done = 1
50 : };
51 :
52 : enum E_EnvStackAction
53 : {
54 : stay, // same parse environment
55 : push_sure, // push sub environment, which must be the correct one
56 : push_try, // push sub environment, which is tried, if it may be the right one
57 : pop_success, // return to parent environment, parsing was successful
58 : pop_failure // return to parent environment, but an error occurred.
59 : };
60 :
61 : struct TokenProcessing_Result
62 : {
63 : E_TokenDone eDone;
64 : E_EnvStackAction eStackAction;
65 : UnoIDL_PE * pEnv2Push;
66 :
67 3 : TokenProcessing_Result()
68 3 : : eDone(not_done), eStackAction(stay), pEnv2Push(0) {}
69 526996 : void reset() { eDone = not_done; eStackAction = stay; pEnv2Push = 0; }
70 : };
71 :
72 : enum E_ParseResult
73 : {
74 : res_error,
75 : res_complete,
76 : res_predeclaration
77 : };
78 : };
79 :
80 :
81 : } // namespace uidl
82 : } // namespace csi
83 :
84 : #endif
85 :
86 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|