~ubuntu-branches/ubuntu/wily/syslog-ng/wily-proposed

« back to all changes in this revision

Viewing changes to modules/afamqp/afamqp-grammar.ym

  • Committer: Package Import Robot
  • Author(s): Gergely Nagy, Gergely Nagy
  • Date: 2013-11-04 15:27:37 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20131104152737-mqh6eqtna2xk97jq
Tags: 3.5.1-1
[ Gergely Nagy <algernon@madhouse-project.org> ]
* New upstream release.
  + Support auto-loading modules (Closes: #650814)
  + The SMTP module is available in syslog-ng-mod-smtp (Closes: #722746)
  + New modules: amqp, geoip, stomp, redis and smtp.
  + Multi-line input support (indented multiline and regexp-based)
  + Template type hinting for the MongoDB destination and $(format-json)
  + Support for unit suffixes in the configuration file
  + New filters, template functions and other miscellaneous changes
* New (team) maintainer, Laszlo Boszormenyi, Attila Szalay and myself
  added to Uploaders.
* Ship /var/lib/syslog-ng in the syslog-ng-core package, instead of
  creating it in the init script. Thanks Michael Biebl
  <biebl@debian.org> for the report & assistance. (Closes: #699942, #719910)
* Use dh-systemd for proper systemd-related maintainer scripts. Based on
  a patch by Michael Biebl <biebl@debian.org>. (Closes: #713982,
  #690067)
* Do not wait for syslog-ng to settle down during installation / update.
  This also fixes installing via debootstrap and a fake
  start-stop-daemon. (Closes: #714254)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2012 Nagy, Attila <bra@fsn.hu>
 
3
 * Copyright (c) 2012-2013 BalaBit IT Ltd, Budapest, Hungary
 
4
 * Copyright (c) 2012-2013 Gergely Nagy <algernon@balabit.hu>
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 2 as published
 
8
 * by the Free Software Foundation, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 *
 
19
 * As an additional exemption you are allowed to compile & link against the
 
20
 * OpenSSL libraries as published by the OpenSSL project. See the file
 
21
 * COPYING for details.
 
22
 *
 
23
 */
 
24
 
 
25
%code requires {
 
26
 
 
27
#include "afamqp-parser.h"
 
28
 
 
29
}
 
30
 
 
31
%code {
 
32
 
 
33
#include "cfg-parser.h"
 
34
#include "cfg-grammar.h"
 
35
#include "afamqp-grammar.h"
 
36
#include "plugin.h"
 
37
#include "vptransform.h"
 
38
 
 
39
}
 
40
 
 
41
%name-prefix "afamqp_"
 
42
%lex-param {CfgLexer *lexer}
 
43
%parse-param {CfgLexer *lexer}
 
44
%parse-param {LogDriver **instance}
 
45
%parse-param {gpointer arg}
 
46
 
 
47
 
 
48
/* INCLUDE_DECLS */
 
49
 
 
50
%token KW_AMQP
 
51
%token KW_EXCHANGE
 
52
%token KW_EXCHANGE_DECLARE
 
53
%token KW_EXCHANGE_TYPE
 
54
%token KW_PERSISTENT
 
55
%token KW_VHOST
 
56
%token KW_ROUTING_KEY
 
57
%token KW_BODY
 
58
 
 
59
%%
 
60
 
 
61
start
 
62
        : LL_CONTEXT_DESTINATION KW_AMQP
 
63
          {
 
64
            last_driver = *instance = afamqp_dd_new(configuration);
 
65
          }
 
66
          '(' afamqp_options ')'                { YYACCEPT; }
 
67
        ;
 
68
 
 
69
afamqp_options
 
70
        : afamqp_option afamqp_options
 
71
        |
 
72
        ;
 
73
 
 
74
afamqp_option
 
75
        : KW_HOST '(' string ')'                { afamqp_dd_set_host(last_driver, $3); free($3); }
 
76
        | KW_PORT '(' LL_NUMBER ')'             { afamqp_dd_set_port(last_driver, $3); }
 
77
        | KW_VHOST '(' string ')'               { afamqp_dd_set_vhost(last_driver, $3); free($3); }
 
78
        | KW_EXCHANGE '(' string ')'            { afamqp_dd_set_exchange(last_driver, $3); free($3); }
 
79
        | KW_EXCHANGE_DECLARE '(' yesno ')'     { afamqp_dd_set_exchange_declare(last_driver, $3); }
 
80
        | KW_EXCHANGE_TYPE '(' string ')'       { afamqp_dd_set_exchange_type(last_driver, $3); free($3); }
 
81
        | KW_ROUTING_KEY '(' string ')'         { afamqp_dd_set_routing_key(last_driver, $3); free($3); }
 
82
        | KW_BODY '(' string ')'                { afamqp_dd_set_body(last_driver, $3); free($3); }
 
83
        | KW_PERSISTENT '(' yesno ')'           { afamqp_dd_set_persistent(last_driver, $3); }
 
84
        | KW_USERNAME '(' string ')'            { afamqp_dd_set_user(last_driver, $3); free($3); }
 
85
        | KW_PASSWORD '(' string ')'            { afamqp_dd_set_password(last_driver, $3); free($3); }
 
86
        | value_pair_option                     { afamqp_dd_set_value_pairs(last_driver, $1); }
 
87
        | dest_driver_option
 
88
        | { last_template_options = afamqp_dd_get_template_options(last_driver); } template_option
 
89
        ;
 
90
 
 
91
/* INCLUDE_RULES */
 
92
 
 
93
%%