1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef ADC_TOKPROCT_HXX 25 #define ADC_TOKPROCT_HXX 26 27 28 29 // USED SERVICES 30 // BASE CLASSES 31 // COMPONENTS 32 // PARAMETERS 33 34 35 namespace csi 36 { 37 namespace uidl 38 { 39 40 41 class UnoIDL_PE; 42 43 44 /** is a parent class for classes, which take part in parsing tokens semantically. 45 It provides some types for them. 46 */ 47 class TokenProcessing_Types 48 { 49 public: 50 enum E_TokenDone 51 { 52 not_done = 0, 53 done = 1 54 }; 55 56 enum E_EnvStackAction 57 { 58 stay, // same parse environment 59 push_sure, // push sub environment, which must be the correct one 60 push_try, // push sub environment, which is tried, if it may be the right one 61 pop_success, // return to parent environment, parsing was successful 62 pop_failure // return to parent environment, but an error occurred. 63 }; 64 65 struct TokenProcessing_Result 66 { 67 E_TokenDone eDone; 68 E_EnvStackAction eStackAction; 69 UnoIDL_PE * pEnv2Push; 70 TokenProcessing_Resultcsi::uidl::TokenProcessing_Types::TokenProcessing_Result71 TokenProcessing_Result() 72 : eDone(not_done), eStackAction(stay), pEnv2Push(0) {} resetcsi::uidl::TokenProcessing_Types::TokenProcessing_Result73 void reset() { eDone = not_done; eStackAction = stay; pEnv2Push = 0; } 74 }; 75 76 enum E_ParseResult 77 { 78 res_error, 79 res_complete, 80 res_predeclaration 81 }; 82 }; 83 84 85 } // namespace uidl 86 } // namespace csi 87 88 #endif 89 90