Vaucanson 1.4
|
00001 // krat_exp_parser.hxx: this file is part of the Vaucanson project. 00002 // 00003 // Vaucanson, a generic library for finite state machines. 00004 // 00005 // Copyright (C) 2008, 2009 The Vaucanson Group. 00006 // 00007 // This program is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 00010 // of the License, or (at your option) any later version. 00011 // 00012 // The complete GNU General Public Licence Notice can be found as the 00013 // `COPYING' file in the root directory. 00014 // 00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file. 00016 // 00017 00018 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_PRIVATE_HH 00019 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_PRIVATE_HH 00020 00021 # include <vaucanson/algebra/implementation/series/krat_exp_proxy.hh> 00022 00023 // These definitions really belong to lib/krat_exp/krat_exp_bison.yy, 00024 // but we need to have them in the public headers so they are installed. 00025 namespace vcsnyy 00026 { 00027 struct token_queue; 00028 00029 struct krat_exp_parser 00030 { 00031 krat_exp_parser(); 00032 ~krat_exp_parser(); 00033 void insert_word(vcsn::algebra::krat_exp_virtual* rexp); 00034 void insert_weight(vcsn::algebra::semiring_virtual* sem); 00035 void insert_zero(vcsn::algebra::krat_exp_virtual* rexp); 00036 void insert_token(int i, std::string* str); 00037 int parse(vcsn::algebra::krat_exp_virtual& rexp, std::string& error); 00038 00039 token_queue* tok_q_; 00040 }; 00041 } // vcsnyy 00042 00043 #endif // VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_PRIVATE_HH