Awali
Another Weighted Automata library
parse_ctx.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef AWALI_DYN_LOADING_PARSE_HH
18 #define AWALI_DYN_LOADING_PARSE_HH
19 
20 #include<list>
21 #include<string>
22 #include<set>
23 
24 namespace awali { namespace dyn {
25  namespace loading {
26 
27 
28  /* Transforms the string representing a weighset into the string of
29  * the file (without ".hh") where it is defined.
30  */
31  std::string filename_of_ws(std::string w);
32 
33  /* Transforms the string representing a weighset into the string of
34  * its type.
35  */
36  std::string classname_of_ws(std::string w);
37 
38  /*
39  * C -> L_W
40  * L -> lao | lal_char lal_int | law_char | lan<L> | lat<LL>
41  * LL -> L | L,LL
42  * W -> b | z | q | r | c | f2 | zmin | zmax | pmax | zzN | nnK
43  * | ratexpset<C> | series<C> | product<WW>
44  * WW -> W | W,WW
45  *
46  * where N is a positive number.
47  */
48 
49  void rec_parse_labelset(const std::string& s, size_t& p,
50  std::set<std::string>& labelsets, std::string& ls);
51 
52  void rec_parse_context(const std::string& s, size_t& p,
53  std::set<std::string>& weightsets, std::set<std::string>& labelsets,
54  std::string& ws, std::string& ls);
55 
56 }}}//end of ns awali::dyn
57 
58 #endif
std::string filename_of_ws(std::string w)
void rec_parse_labelset(const std::string &s, size_t &p, std::set< std::string > &labelsets, std::string &ls)
std::string classname_of_ws(std::string w)
void rec_parse_context(const std::string &s, size_t &p, std::set< std::string > &weightsets, std::set< std::string > &labelsets, std::string &ws, std::string &ls)
Main namespace of Awali.
Definition: ato.hh:22