Doxygen Generated Documentation of Ben-Jose Trainable SAT Solver Library
parse_funcs.h
1 
2 
3 /*************************************************************
4 
5 This file is part of ben-jose.
6 
7 ben-jose is free software: you can redistribute it and/or modify
8 it under the terms of the version 3 of the GNU General Public
9 License as published by the Free Software Foundation.
10 
11 ben-jose is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with ben-jose. If not, see <http://www.gnu.org/licenses/>.
18 
19 ------------------------------------------------------------
20 
21 Copyright (C) 2007-2012, 2014-2016. QUIROGA BELTRAN, Jose Luis.
22 Id (cedula): 79523732 de Bogota - Colombia.
23 See https://github.com/joseluisquiroga/ben-jose
24 
25 ben-jose is free software thanks to The Glory of Our Lord
26  Yashua Melej Hamashiaj.
27 Our Resurrected and Living, both in Body and Spirit,
28  Prince of Peace.
29 
30 ------------------------------------------------------------
31 
32 parse_funcs.h
33 
34 parse funcs.
35 
36 --------------------------------------------------------------*/
37 
38 #ifndef PARSE_FUNCS_H
39 #define PARSE_FUNCS_H
40 
41 #include "top_exception.h"
42 #include "ch_string.h"
43 
44 #define PARSE_FN_DBG(prm) DBG(prm)
45 #define PARSE_FN_CK(prm) DBG_CK(prm)
46 
47 //======================================================================
48 // parse_exception
49 
50 typedef enum {
51  pax_bad_int
52 } pa_ex_cod_t;
53 
54 class parse_exception : public top_exception {
55 public:
56  char val;
57  long line;
58  parse_exception(long the_id = 0, char vv = 0, long ll = 0) : top_exception(the_id)
59  {
60  val = vv;
61  line = ll;
62  }
63 };
64 
65 //=================================================================
66 // parse funcs
67 
68 ch_string get_parse_err_msg(ch_string hd_msg, long num_line, char ch_err, ch_string msg);
69 
70 void skip_whitespace(const char*& pt_in, long& line);
71 void skip_line(const char*& pt_in, long& line);
72 ch_string read_text_line(const char*& pt_in, long& line);
73 long parse_long(const char*& pt_in, long line);
74 long parse_long_str(ch_string& in_str);
75 
76 
77 #endif // PARSE_FUNCS_H
78 
79