Commit 27d0da95 authored by Simon Morlat's avatar Simon Morlat

relax abnf to allow lines to be terminated by crlf or lf.

parent 55ce0e2c
......@@ -64,6 +64,7 @@ private:
void bin_val();
void dec_val();
void hex_val();
void crlf_or_lf();
};
......
......@@ -150,6 +150,14 @@ ABNFGrammar::ABNFGrammar(): Grammar("ABNF"){
element();
group();
option();
crlf_or_lf();
}
void ABNFGrammar::crlf_or_lf(){
addRule("crlf-or-lf",
Foundation::selector()
->addRecognizer(getRule("crlf"))
->addRecognizer(getRule("lf")));
}
void ABNFGrammar::comment(){
......@@ -162,14 +170,16 @@ void ABNFGrammar::comment(){
->addRecognizer(getRule("vchar"))
)
)
->addRecognizer(getRule("crlf"))
//->addRecognizer(getRule("crlf"))
->addRecognizer(getRule("crlf-or-lf"))
);
}
void ABNFGrammar::c_nl(){
addRule("c-nl", Foundation::selector()
->addRecognizer(getRule("comment"))
->addRecognizer(getRule("crlf")));
//->addRecognizer(getRule("crlf")));
->addRecognizer(getRule("crlf-or-lf")));
}
void ABNFGrammar::c_wsp(){
......
REGISTER sip:siptest.linphone.org SIP/2.0
Via: SIP/2.0/TLS 192.168.0.25:41076;alias;branch=z9hG4bK.m-SPAXXd3;rport
From: "Charlie" <sip:smorlat2@78.220.48.77>;tag=HW3X1aviU
From: "François" <sip:smorlat2@78.220.48.77>;tag=HW3X1aviU
To: marie <sip:smorlat2@siptest.linphone.org>
CSeq: 21 REGISTER
Call-ID: s69J2OQ4h4
......
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