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

misc: Create a combined parser for a small win

This commit is contained in:
Holger Hans Peter Freyther 2014-09-05 14:24:00 +02:00
parent f13639d443
commit 07e36f8333
1 changed files with 3 additions and 2 deletions

View File

@ -90,8 +90,9 @@ PP.PPCompositeParser subclass: SIPGrammar [
host [
<category: 'generic'>
"TODO: too simplieified"
^ (#letter asParser / (PP.PPPredicateObjectParser chars: '0123456789.-' message: 'host')) plus flatten
^ (PP.PPPredicateObjectParser on: (PP.PPCharSetPredicate on:
[:char | char isAlphaNumeric or: [
'.-' includes: char]]) message: 'host') plus flatten
]
port [