1 /* -*- mode: C -*- 2 * 3 * File: rec-sex-parser.h 4 * Date: Tue Jan 12 17:59:45 2010 5 * 6 * GNU recutils - Sexy parser 7 * 8 */ 9 10 /* Copyright (C) 2010-2019 Jose E. Marchesi */ 11 12 /* This program is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation, either version 3 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program. If not, see <http://www.gnu.org/licenses/>. 24 */ 25 26 27 #ifndef REC_SEX_PARSER_H 28 #define REC_SEX_PARSER_H 29 30 #include <config.h> 31 32 #include <stdbool.h> 33 34 #include <rec-sex-ast.h> 35 36 typedef struct rec_sex_parser_s *rec_sex_parser_t; 37 38 /* 39 * Public functions 40 */ 41 42 rec_sex_parser_t rec_sex_parser_new (void); 43 void rec_sex_parser_destroy (rec_sex_parser_t parser); 44 45 bool rec_sex_parser_case_insensitive (rec_sex_parser_t parser); 46 void rec_sex_parser_set_case_insensitive (rec_sex_parser_t parser, 47 bool case_insensitive); 48 void rec_sex_parser_set_in (rec_sex_parser_t parser, 49 const char *str); 50 int rec_sex_parser_getc (rec_sex_parser_t parser); 51 rec_sex_ast_t rec_sex_parser_ast (rec_sex_parser_t parser); 52 void rec_sex_parser_set_ast (rec_sex_parser_t parser, rec_sex_ast_t ast); 53 bool rec_sex_parser_run (rec_sex_parser_t parser, const char *expr); 54 void *rec_sex_parser_scanner (rec_sex_parser_t parser); 55 56 void rec_sex_parser_print_ast (rec_sex_parser_t parser); 57 58 #endif /* rec-sex-parser.h */ 59 60 /* End of rec-sex-parser.h */ 61