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
|
diff -wbBur libsieve-2.3.1/src/sv_parser/header.y libsieve-2.3.1.q/src/sv_parser/header.y
--- libsieve-2.3.1/src/sv_parser/header.y 2012-05-31 13:16:50.000000000 +0400
+++ libsieve-2.3.1.q/src/sv_parser/header.y 2013-09-02 20:21:26.000000000 +0400
@@ -70,7 +70,7 @@
}
| body WRAP {
TRACE_DEBUG( "body: body WRAP: %s %s", $1, $2 );
- $$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( $1, $2, NULL ), strlen($1)+strlen($2), FREEME);
+ $$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( $1 ? $1 : "", $2, NULL ), strlen($1 ? $1 : "")+strlen($2), FREEME);
};
%%
diff -wbBur libsieve-2.3.1/src/sv_parser/addr.y libsieve-2.3.1.q/src/sv_parser/addr.y
--- libsieve-2.3.1/src/sv_parser/addr.y 2012-05-31 13:16:50.000000000 +0400
+++ libsieve-2.3.1.q/src/sv_parser/addr.y 2013-09-02 21:42:15.267979609 +0400
@@ -38,6 +38,7 @@
/* sv_util */
#include "src/sv_util/util.h"
+#include "src/sv_interface/context2.h"
/* sv_parser */
#include "addr.h"
@@ -74,10 +74,10 @@
context->addr_addr->name = $1;
};
-address: mailbox_list { TRACE_DEBUG( "address: mailbox: %s", $1 ); }
- | group { TRACE_DEBUG( "address: group: %s", $1 ); };
+address: mailbox_list { $$ = $1; TRACE_DEBUG( "address: mailbox: %s", $1 ); }
+ | group { $$ = $1; TRACE_DEBUG( "address: group: %s", $1 ); };
-group: phrase ':' ';' { TRACE_DEBUG( "group: phrase: %s", $1 ); }
+group: phrase ':' ';' { $$ = $1; TRACE_DEBUG( "group: phrase: %s", $1 ); }
| phrase ':' mailbox_list ';' { TRACE_DEBUG( "group: phrase mailbox_list: %s %s", $1, $3 ); };
mailbox_list: mailbox {
@@ -94,8 +94,8 @@
};
mailbox:
- angle_addr { TRACE_DEBUG( "mailbox: angle_addr: %s", $1 ); }
- | addr_spec { TRACE_DEBUG( "mailbox: addr_spec: %s", $1 ); }
+ angle_addr { $$ = $1; TRACE_DEBUG( "mailbox: angle_addr: %s", $1 ); }
+ | addr_spec { $$ = $1; TRACE_DEBUG( "mailbox: addr_spec: %s", $1 ); }
| phrase angle_addr {
TRACE_DEBUG( "mailbox: phrase angle_addr: %s %s", $1, $2 );
// This is a "top terminal" state...
@@ -103,7 +103,7 @@
context->addr_addr->name = libsieve_strdup( $1 );
};
-angle_addr: '<' addr_spec '>' { TRACE_DEBUG( "angle_addr: addr_spec: %s", $2 ); }
+angle_addr: '<' addr_spec '>' { $$ = $2; TRACE_DEBUG( "angle_addr: addr_spec: %s", $2 ); }
| '<' route ':' addr_spec '>' {
TRACE_DEBUG( "angle_addr: route addr_spec: %s:%s", $2, $4 );
// This is a "top terminal" state...
@@ -133,13 +133,13 @@
$$ = libsieve_strbuf(context->strbuf, libsieve_strconcat( "@", $2, ",", $4, NULL ), strlen($2)+strlen($4)+2, FREEME);
};
-local_part: DOTATOM { TRACE_DEBUG( "local_part: DOTATOM: %s", $1 ); }
- | ATOM { TRACE_DEBUG( "local_part: ATOM : %s", $1); }
- | qstring { TRACE_DEBUG( "local_part: qstring: %s", $1); }
-
-domain: DOTATOM { TRACE_DEBUG( "domain: DOTATOM: %s", $1 ); }
- | ATOM { TRACE_DEBUG("domain: ATOM: %s", $1); }
- | domainlit { TRACE_DEBUG( "domain: domainlit: %s", $1); };
+local_part: DOTATOM { $$ = $1; TRACE_DEBUG( "local_part: DOTATOM: %s", $1 ); }
+ | ATOM { $$ = $1; TRACE_DEBUG( "local_part: ATOM : %s", $1); }
+ | qstring { $$ = $1; TRACE_DEBUG( "local_part: qstring: %s", $1); }
+
+domain: DOTATOM { $$ = $1; TRACE_DEBUG( "domain: DOTATOM: %s", $1 ); }
+ | ATOM { $$ = $1; TRACE_DEBUG("domain: ATOM: %s", $1); }
+ | domainlit { $$ = $1; TRACE_DEBUG( "domain: domainlit: %s", $1); };
domainlit: '[' DTEXT ']' {
TRACE_DEBUG( "domainlit: DTEXT: %s", $2 );
|