Commit fcfd5f69 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Fix grammar for "From"

Refused uri with "@" but no username
parent 7a750d63
......@@ -2,7 +2,7 @@
* This C source file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sdp.g
* - On : 2018-07-25 17:10:06
* - On : 2018-08-07 09:33:26
* - for the lexer : belle_sdpLexerLexer
*
* Editing it, at least manually, is not wise.
......
......@@ -2,7 +2,7 @@
* This C header file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sdp.g
* - On : 2018-07-25 17:10:06
* - On : 2018-08-07 09:33:26
* - for the lexer : belle_sdpLexerLexer
*
* Editing it, at least manually, is not wise.
......
......@@ -2,7 +2,7 @@
* This C source file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sdp.g
* - On : 2018-07-25 17:10:05
* - On : 2018-08-07 09:33:25
* - for the parser : belle_sdpParserParser
*
* Editing it, at least manually, is not wise.
......
......@@ -2,7 +2,7 @@
* This C header file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sdp.g
* - On : 2018-07-25 17:10:05
* - On : 2018-08-07 09:33:25
* - for the parser : belle_sdpParserParser
*
* Editing it, at least manually, is not wise.
......
......@@ -977,7 +977,14 @@ header_from returns [belle_sip_header_from_t* ret]
scope { belle_sip_header_from_t* current; }
@init { $header_from::current = belle_sip_header_from_new();$ret = $header_from::current; }
: from_token/* ( 'From' | 'f' )*/ sp_tab_colon from_spec ;
: from_token/* ( 'From' | 'f' )*/ sp_tab_colon from_spec
{
if (!belle_sip_header_address_get_uri((belle_sip_header_address_t*)($header_from::current))
&& !belle_sip_header_address_get_absolute_uri((belle_sip_header_address_t*)($header_from::current))) {
belle_sip_object_unref($header_from::current);
$ret=NULL;
}
};
catch [ANTLR3_RECOGNITION_EXCEPTION]
{
belle_sip_message("[\%s] reason [\%s]",(const char*)EXCEPTION->name,(const char*)EXCEPTION->message);
......@@ -987,7 +994,7 @@ catch [ANTLR3_RECOGNITION_EXCEPTION]
from_spec
: ( name_addr_with_generic_uri[BELLE_SIP_HEADER_ADDRESS($header_from::current)] | paramless_addr_spec_with_generic_uri[BELLE_SIP_HEADER_ADDRESS($header_from::current)] )
( SEMI lws? from_param lws?)*;
( SEMI lws? from_param lws?)* ;
from_param
: /*tag_param |*/ generic_param [BELLE_SIP_PARAMETERS($header_from::current)];
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* This C header file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sip_message.g
* - On : 2018-07-25 17:10:14
* - On : 2018-08-07 09:33:40
* - for the lexer : belle_sip_messageLexerLexer
*
* Editing it, at least manually, is not wise.
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* This C header file was generated by $ANTLR version 3.4
*
* - From the grammar source file : ../grammars/belle_sip_message.g
* - On : 2018-07-25 17:10:13
* - On : 2018-08-07 09:33:37
* - for the parser : belle_sip_messageParserParser
*
* Editing it, at least manually, is not wise.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment