smalltalk
/
osmo-st-sip
Archived
1
0
Fork 0

parser: Fix the grammar and update the example message

token requires the presence of at least one match. The usage of
star has been wrong and is corrected now. This was seen due not
being able to parse a From address that included a diplay name.
Remove the trailing ";" to fix the parsing bug.
This commit is contained in:
Holger Hans Peter Freyther 2014-05-27 13:46:13 +02:00
parent 100d6bcb10
commit 33f1e40cbe
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ PP.PPCompositeParserTest subclass: SIPParserTest [
testResponseData [
^ (WriteStream on: (String new))
nextPutAll: 'SIP/2.0 480 Temporarily Unavailable'; cr; nl;
nextPutAll: 'Via: SIP/2.0/UDP 172.16.254.34;rport;branch=z9hG4bKMzQ4NTQzNDgxNCwyNDE1Nw__;received=172.16.254.55;ttl=123;bla=foo;maddr=www.moo.de;'; cr; nl;
nextPutAll: 'Via: SIP/2.0/UDP 172.16.254.34;rport;branch=z9hG4bKMzQ4NTQzNDgxNCwyNDE1Nw__;received=172.16.254.55;ttl=123;bla=foo;maddr=www.moo.de'; cr; nl;
nextPutAll: 'From: <sip:1000@on-waves.com>;tag=MzQ4NTQ0MTg2NzIyNDEwNjkyNjY_'; cr; nl;
nextPutAll: 'To: <sip:9198@172.16.1.72>;tag=42eBv22Fj314N;abc=def;kbc;ajk'; cr; nl;
nextPutAll: 'Call-ID: MzY3NzE3ODgyNw__@xiaoyu'; cr; nl;

View File

@ -724,7 +724,7 @@ PP.PPCompositeParser subclass: SIPGrammar [
$! asParser / $% asParser /
$* asParser / $_ asParser /
$+ asParser / $` asParser /
$' asParser / $~ asParser) star flatten
$' asParser / $~ asParser) plus flatten
]
header_name [