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_CPP_CPP_PE_HXX 25 #define ADC_CPP_CPP_PE_HXX 26 27 28 29 // USED SERVICES 30 // BASE CLASSES 31 #include <semantic/parseenv.hxx> 32 #include "tokintpr.hxx" 33 // COMPONENTS 34 #include "pev.hxx" 35 // PARAMETERS 36 #include <ary/cpp/c_types4cpp.hxx> 37 38 39 namespace cpp { 40 41 class Cpp_PE : public ::ParseEnvironment, 42 public TokenInterpreter 43 { 44 public: 45 typedef cpp::PeEnvironment EnvData; 46 47 void SetTokenResult( 48 E_TokenDone i_eDone, 49 E_EnvStackAction i_eWhat2DoWithEnvStack, 50 ParseEnvironment * i_pParseEnv2Push = 0 ); 51 52 virtual Cpp_PE * Handle_ChildFailure(); // Defaulted to 0. 53 54 protected: 55 Cpp_PE( 56 Cpp_PE * io_pParent ); 57 Cpp_PE( 58 EnvData & i_rEnv ); 59 60 EnvData & Env() const; 61 62 void StdHandlingOfSyntaxError( 63 const char * i_sText ); 64 65 private: 66 // DATA 67 EnvData & rMyEnv; 68 }; 69 70 inline Cpp_PE::EnvData & Env() const71Cpp_PE::Env() const 72 { return rMyEnv; } 73 74 } // namespace cpp 75 76 #endif 77 78