( Domain >Reported_Domain_Start %Reported_Domain_End FWS "(" TCP_info ")" ) | # Here domain is something specified by remote side
( address_literal >Real_Domain_Start %Real_Domain_End FWS "(" TCP_info ")" );
+ ccontent = ctext | FWS | '(' @{ fcall balanced_ccontent; };
+ balanced_ccontent := ccontent* ')' @{ fret; };
+ comment = "(" (FWS? ccontent)* FWS? ")";
+ CFWS = ((FWS? comment)+ FWS?) | FWS;
+
From_domain = "FROM"i FWS Extended_Domain >From_Start %From_End;
By_domain = CFWS "BY"i FWS Extended_Domain >By_Start %By_End;
Opt_info = Via? With? ID? For? Additional_Registered_Clauses?;
Received = From_domain By_domain Opt_info CFWS? ";" FWS date_time >Date_Start %Date_End CFWS?;
+ prepush {
+ if (top >= st_storage.size) {
+ st_storage.data = realloc (st_storage.data, (top + 1) * 2);
+ g_assert (st_storage.data != NULL);
+ stack = st_storage.data;
+ }
+ }
}%%
*reported_ip_start, *reported_ip_end,
*ip_start, *ip_end, *date_start;
const char *p = data, *pe = data + len, *eof;
- int cs, in_v6 = 0;
-
+ int cs, in_v6 = 0, *stack = NULL;
+ gsize top = 0;
+ struct _ragel_st_storage {
+ int *data;
+ gsize size;
+ } st_storage;
+
+ memset (&st_storage, 0, sizeof (st_storage));
memset (rh, 0, sizeof (*rh));
real_domain_start = NULL;
real_domain_end = NULL;
%% write init;
%% write exec;
+ if (st_storage.data) {
+ free (st_storage.data);
+ }
+
return cs;
}
dot_atom_text = atext+ ("." atext+)*;
#FWS = ((WSP* CRLF)? WSP+);
FWS = WSP+; # We work with unfolded headers, so we can simplify machine
-
- comment = "(" (FWS? ctext)* FWS? ")";
- CFWS = ((FWS? comment)+ FWS?) | FWS;
}%%
\ No newline at end of file