/usr/include/syslog-ng/cfg-grammar.h is in syslog-ng-dev 3.13.2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_MAIN_LIB_CFG_GRAMMAR_H_INCLUDED
# define YY_MAIN_LIB_CFG_GRAMMAR_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int main_debug;
#endif
/* "%code requires" blocks. */
#line 25 "../../lib/cfg-grammar.y" /* yacc.c:1909 */
/* this block is inserted into cfg-grammar.h, so it is included
practically all of the syslog-ng code. Please add headers here
with care. If you need additional headers, please look for a
massive list of includes further below. */
/* YYSTYPE and YYLTYPE is defined by the lexer */
#include "cfg-lexer.h"
#include "afinter.h"
#include "type-hinting.h"
#include "filter/filter-expr-parser.h"
#include "filter/filter-pipe.h"
#include "parser/parser-expr-parser.h"
#include "rewrite/rewrite-expr-parser.h"
#include "logmatcher.h"
#include "logthrdestdrv.h"
/* uses struct declarations instead of the typedefs to avoid having to
* include logreader/logwriter/driver.h, which defines the typedefs. This
* is to avoid including unnecessary dependencies into grammars that are not
* themselves reader/writer based */
extern struct _LogSourceOptions *last_source_options;
extern struct _LogReaderOptions *last_reader_options;
extern struct _LogProtoServerOptions *last_proto_server_options;
extern struct _LogWriterOptions *last_writer_options;
extern struct _FilePermOptions *last_file_perm_options;
extern struct _MsgFormatOptions *last_msg_format_options;
extern struct _LogDriver *last_driver;
extern struct _LogParser *last_parser;
extern struct _LogTemplateOptions *last_template_options;
extern struct _LogTemplate *last_template;
extern struct _ValuePairs *last_value_pairs;
extern struct _ValuePairsTransformSet *last_vp_transset;
extern struct _LogMatcherOptions *last_matcher_options;
extern struct _HostResolveOptions *last_host_resolve_options;
extern struct _StatsOptions *last_stats_options;
#line 85 "lib/cfg-grammar.h" /* yacc.c:1909 */
/* Token type. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
LL_CONTEXT_ROOT = 1,
LL_CONTEXT_DESTINATION = 2,
LL_CONTEXT_SOURCE = 3,
LL_CONTEXT_PARSER = 4,
LL_CONTEXT_REWRITE = 5,
LL_CONTEXT_FILTER = 6,
LL_CONTEXT_LOG = 7,
LL_CONTEXT_BLOCK_DEF = 8,
LL_CONTEXT_BLOCK_REF = 9,
LL_CONTEXT_BLOCK_CONTENT = 10,
LL_CONTEXT_BLOCK_ARG = 11,
LL_CONTEXT_PRAGMA = 12,
LL_CONTEXT_FORMAT = 13,
LL_CONTEXT_TEMPLATE_FUNC = 14,
LL_CONTEXT_INNER_DEST = 15,
LL_CONTEXT_INNER_SRC = 16,
LL_CONTEXT_CLIENT_PROTO = 17,
LL_CONTEXT_SERVER_PROTO = 18,
LL_CONTEXT_SELECTOR = 19,
KW_SOURCE = 10000,
KW_FILTER = 10001,
KW_PARSER = 10002,
KW_DESTINATION = 10003,
KW_LOG = 10004,
KW_OPTIONS = 10005,
KW_INCLUDE = 10006,
KW_BLOCK = 10007,
KW_JUNCTION = 10008,
KW_CHANNEL = 10009,
KW_INTERNAL = 10010,
KW_FILE = 10011,
KW_SYSLOG = 10060,
KW_MARK_FREQ = 10071,
KW_STATS_FREQ = 10072,
KW_STATS_LEVEL = 10073,
KW_STATS_LIFETIME = 10074,
KW_FLUSH_LINES = 10075,
KW_SUPPRESS = 10076,
KW_FLUSH_TIMEOUT = 10077,
KW_LOG_MSG_SIZE = 10078,
KW_FILE_TEMPLATE = 10079,
KW_PROTO_TEMPLATE = 10080,
KW_MARK_MODE = 10081,
KW_ENCODING = 10082,
KW_TYPE = 10083,
KW_STATS_MAX_DYNAMIC = 10084,
KW_CHAIN_HOSTNAMES = 10090,
KW_NORMALIZE_HOSTNAMES = 10091,
KW_KEEP_HOSTNAME = 10092,
KW_CHECK_HOSTNAME = 10093,
KW_BAD_HOSTNAME = 10094,
KW_KEEP_TIMESTAMP = 10100,
KW_USE_DNS = 10110,
KW_USE_FQDN = 10111,
KW_CUSTOM_DOMAIN = 10112,
KW_DNS_CACHE = 10120,
KW_DNS_CACHE_SIZE = 10121,
KW_DNS_CACHE_EXPIRE = 10130,
KW_DNS_CACHE_EXPIRE_FAILED = 10131,
KW_DNS_CACHE_HOSTS = 10132,
KW_PERSIST_ONLY = 10140,
KW_USE_RCPTID = 10141,
KW_USE_UNIQID = 10142,
KW_TZ_CONVERT = 10150,
KW_TS_FORMAT = 10151,
KW_FRAC_DIGITS = 10152,
KW_LOG_FIFO_SIZE = 10160,
KW_LOG_FETCH_LIMIT = 10162,
KW_LOG_IW_SIZE = 10163,
KW_LOG_PREFIX = 10164,
KW_PROGRAM_OVERRIDE = 10165,
KW_HOST_OVERRIDE = 10166,
KW_THROTTLE = 10170,
KW_THREADED = 10171,
KW_PASS_UNIX_CREDENTIALS = 10231,
KW_PERSIST_NAME = 10302,
KW_JVM_OPTIONS = 10303,
KW_READ_OLD_RECORDS = 10304,
KW_FLAGS = 10190,
KW_PAD_SIZE = 10200,
KW_TIME_ZONE = 10201,
KW_RECV_TIME_ZONE = 10202,
KW_SEND_TIME_ZONE = 10203,
KW_LOCAL_TIME_ZONE = 10204,
KW_FORMAT = 10205,
KW_TIME_REOPEN = 10210,
KW_TIME_REAP = 10211,
KW_TIME_SLEEP = 10212,
KW_TMPL_ESCAPE = 10220,
KW_OPTIONAL = 10230,
KW_CREATE_DIRS = 10240,
KW_OWNER = 10250,
KW_GROUP = 10251,
KW_PERM = 10252,
KW_DIR_OWNER = 10260,
KW_DIR_GROUP = 10261,
KW_DIR_PERM = 10262,
KW_TEMPLATE = 10270,
KW_TEMPLATE_ESCAPE = 10271,
KW_TEMPLATE_FUNCTION = 10272,
KW_DEFAULT_FACILITY = 10300,
KW_DEFAULT_LEVEL = 10301,
KW_PORT = 10323,
KW_USE_TIME_RECVD = 10340,
KW_FACILITY = 10350,
KW_LEVEL = 10351,
KW_HOST = 10352,
KW_MATCH = 10353,
KW_MESSAGE = 10354,
KW_NETMASK = 10355,
KW_TAGS = 10356,
KW_NETMASK6 = 10357,
KW_REWRITE = 10370,
KW_YES = 10380,
KW_NO = 10381,
KW_IFDEF = 10410,
KW_ENDIF = 10411,
LL_DOTDOT = 10420,
LL_IDENTIFIER = 10421,
LL_NUMBER = 10422,
LL_FLOAT = 10423,
LL_STRING = 10424,
LL_TOKEN = 10425,
LL_BLOCK = 10426,
LL_PRAGMA = 10427,
LL_EOL = 10428,
LL_ERROR = 10429,
KW_VALUE_PAIRS = 10500,
KW_EXCLUDE = 10502,
KW_PAIR = 10503,
KW_KEY = 10504,
KW_SCOPE = 10505,
KW_SHIFT = 10506,
KW_REKEY = 10507,
KW_ADD_PREFIX = 10508,
KW_REPLACE_PREFIX = 10509,
KW_ON_ERROR = 10510,
KW_RETRIES = 10511
};
#endif
/* Tokens. */
#define LL_CONTEXT_ROOT 1
#define LL_CONTEXT_DESTINATION 2
#define LL_CONTEXT_SOURCE 3
#define LL_CONTEXT_PARSER 4
#define LL_CONTEXT_REWRITE 5
#define LL_CONTEXT_FILTER 6
#define LL_CONTEXT_LOG 7
#define LL_CONTEXT_BLOCK_DEF 8
#define LL_CONTEXT_BLOCK_REF 9
#define LL_CONTEXT_BLOCK_CONTENT 10
#define LL_CONTEXT_BLOCK_ARG 11
#define LL_CONTEXT_PRAGMA 12
#define LL_CONTEXT_FORMAT 13
#define LL_CONTEXT_TEMPLATE_FUNC 14
#define LL_CONTEXT_INNER_DEST 15
#define LL_CONTEXT_INNER_SRC 16
#define LL_CONTEXT_CLIENT_PROTO 17
#define LL_CONTEXT_SERVER_PROTO 18
#define LL_CONTEXT_SELECTOR 19
#define KW_SOURCE 10000
#define KW_FILTER 10001
#define KW_PARSER 10002
#define KW_DESTINATION 10003
#define KW_LOG 10004
#define KW_OPTIONS 10005
#define KW_INCLUDE 10006
#define KW_BLOCK 10007
#define KW_JUNCTION 10008
#define KW_CHANNEL 10009
#define KW_INTERNAL 10010
#define KW_FILE 10011
#define KW_SYSLOG 10060
#define KW_MARK_FREQ 10071
#define KW_STATS_FREQ 10072
#define KW_STATS_LEVEL 10073
#define KW_STATS_LIFETIME 10074
#define KW_FLUSH_LINES 10075
#define KW_SUPPRESS 10076
#define KW_FLUSH_TIMEOUT 10077
#define KW_LOG_MSG_SIZE 10078
#define KW_FILE_TEMPLATE 10079
#define KW_PROTO_TEMPLATE 10080
#define KW_MARK_MODE 10081
#define KW_ENCODING 10082
#define KW_TYPE 10083
#define KW_STATS_MAX_DYNAMIC 10084
#define KW_CHAIN_HOSTNAMES 10090
#define KW_NORMALIZE_HOSTNAMES 10091
#define KW_KEEP_HOSTNAME 10092
#define KW_CHECK_HOSTNAME 10093
#define KW_BAD_HOSTNAME 10094
#define KW_KEEP_TIMESTAMP 10100
#define KW_USE_DNS 10110
#define KW_USE_FQDN 10111
#define KW_CUSTOM_DOMAIN 10112
#define KW_DNS_CACHE 10120
#define KW_DNS_CACHE_SIZE 10121
#define KW_DNS_CACHE_EXPIRE 10130
#define KW_DNS_CACHE_EXPIRE_FAILED 10131
#define KW_DNS_CACHE_HOSTS 10132
#define KW_PERSIST_ONLY 10140
#define KW_USE_RCPTID 10141
#define KW_USE_UNIQID 10142
#define KW_TZ_CONVERT 10150
#define KW_TS_FORMAT 10151
#define KW_FRAC_DIGITS 10152
#define KW_LOG_FIFO_SIZE 10160
#define KW_LOG_FETCH_LIMIT 10162
#define KW_LOG_IW_SIZE 10163
#define KW_LOG_PREFIX 10164
#define KW_PROGRAM_OVERRIDE 10165
#define KW_HOST_OVERRIDE 10166
#define KW_THROTTLE 10170
#define KW_THREADED 10171
#define KW_PASS_UNIX_CREDENTIALS 10231
#define KW_PERSIST_NAME 10302
#define KW_JVM_OPTIONS 10303
#define KW_READ_OLD_RECORDS 10304
#define KW_FLAGS 10190
#define KW_PAD_SIZE 10200
#define KW_TIME_ZONE 10201
#define KW_RECV_TIME_ZONE 10202
#define KW_SEND_TIME_ZONE 10203
#define KW_LOCAL_TIME_ZONE 10204
#define KW_FORMAT 10205
#define KW_TIME_REOPEN 10210
#define KW_TIME_REAP 10211
#define KW_TIME_SLEEP 10212
#define KW_TMPL_ESCAPE 10220
#define KW_OPTIONAL 10230
#define KW_CREATE_DIRS 10240
#define KW_OWNER 10250
#define KW_GROUP 10251
#define KW_PERM 10252
#define KW_DIR_OWNER 10260
#define KW_DIR_GROUP 10261
#define KW_DIR_PERM 10262
#define KW_TEMPLATE 10270
#define KW_TEMPLATE_ESCAPE 10271
#define KW_TEMPLATE_FUNCTION 10272
#define KW_DEFAULT_FACILITY 10300
#define KW_DEFAULT_LEVEL 10301
#define KW_PORT 10323
#define KW_USE_TIME_RECVD 10340
#define KW_FACILITY 10350
#define KW_LEVEL 10351
#define KW_HOST 10352
#define KW_MATCH 10353
#define KW_MESSAGE 10354
#define KW_NETMASK 10355
#define KW_TAGS 10356
#define KW_NETMASK6 10357
#define KW_REWRITE 10370
#define KW_YES 10380
#define KW_NO 10381
#define KW_IFDEF 10410
#define KW_ENDIF 10411
#define LL_DOTDOT 10420
#define LL_IDENTIFIER 10421
#define LL_NUMBER 10422
#define LL_FLOAT 10423
#define LL_STRING 10424
#define LL_TOKEN 10425
#define LL_BLOCK 10426
#define LL_PRAGMA 10427
#define LL_EOL 10428
#define LL_ERROR 10429
#define KW_VALUE_PAIRS 10500
#define KW_EXCLUDE 10502
#define KW_PAIR 10503
#define KW_KEY 10504
#define KW_SCOPE 10505
#define KW_SHIFT 10506
#define KW_REKEY 10507
#define KW_ADD_PREFIX 10508
#define KW_REPLACE_PREFIX 10509
#define KW_ON_ERROR 10510
#define KW_RETRIES 10511
/* Value type. */
/* Location type. */
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
typedef struct YYLTYPE YYLTYPE;
struct YYLTYPE
{
int first_line;
int first_column;
int last_line;
int last_column;
};
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
int main_parse (CfgLexer *lexer, gpointer *dummy, gpointer arg);
#endif /* !YY_MAIN_LIB_CFG_GRAMMAR_H_INCLUDED */
|