1 /* rsyslog parser interface.
2  *
3  * Copyright 2011-2016 Rainer Gerhards
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *       http://www.apache.org/licenses/LICENSE-2.0
10  *       -or-
11  *       see COPYING.ASL20 in the source distribution
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 #ifndef PARSERIF_H_DEFINED
20 #define PARSERIF_H_DEFINED
21 #include "rainerscript.h"
22 int cnfSetLexFile(const char*);
23 void parser_errmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
24 void parser_warnmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
25 void tellLexEndParsing(void);
26 #ifndef IN_GRAMMAR_Y
27 int yyparse(void);
28 extern int yydebug;
29 extern int yylineno;
30 extern char *cnfcurrfn;
31 extern FILE *fp_rs_full_conf_output;
32 #endif
33 
34 /* entry points to be called after the parser has processed the
35  * element in question. Actual processing must than be done inside
36  * these functions.
37  */
38 void cnfDoObj(struct cnfobj *o);
39 void cnfDoScript(struct cnfstmt *script);
40 void cnfDoCfsysline(char *ln);
41 void cnfDoBSDTag(char *ln);
42 void cnfDoBSDHost(char *ln);
43 int cnfAddConfigBuffer(es_str_t *const str, const char *const cnfobj_name);
44 #endif
45