00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_HH
00019 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_HH
00020 
00036 # include <vaucanson/design_pattern/design_pattern.hh>
00037 # include <vector>
00038 # include <string>
00039 
00040 namespace vcsn {
00041 
00042   namespace algebra {
00046     struct token_representation_t
00047     {
00048       std::string               open_par;
00049       std::string               close_par;
00050       std::string               plus;
00051       std::string               times;
00052       std::string               star;
00053       std::string               one;
00054       std::string               zero;
00055       std::string               open_weight;
00056       std::string               close_weight;
00057       std::vector<std::string>  spaces;
00058 
00059       
00060       token_representation_t() :
00061         open_par("("),
00062         close_par(")"),
00063         plus("+"),
00064         times("."),
00065         star("*"),
00066         one("1"),
00067         zero("0"),
00068         open_weight("{"),
00069         close_weight("}")
00070         {
00071           spaces.push_back(" ");
00072         }
00073     };
00074 
00116     template <class S, class T>
00117     std::pair<bool, std::string>
00118     parse(const std::string& from,
00119           Element<S, T>& exp,
00120           const token_representation_t tok_rep = token_representation_t(),
00121           bool lex_trace = false,
00122           bool parse_trace = false);
00123 
00127   } 
00128 
00129 } 
00130 
00131 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00132 #  include <vaucanson/algebra/implementation/series/krat_exp_parser.hxx>
00133 # endif // VCSN_USE_INTERFACE_ONLY
00134 
00135 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PARSER_HH