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

misc: Use a combined PPPredicateObjectParser for a small gain

This gives 3ms on parsing 'b787f1fbc9a864af6975d9f59ac49ef1.1401736687'
This commit is contained in:
Holger Hans Peter Freyther 2014-09-05 12:30:47 +02:00
parent 3854696d53
commit 06caf1ef1a
1 changed files with 3 additions and 3 deletions

View File

@ -670,9 +670,9 @@ PP.PPCompositeParser subclass: SIPGrammar [
token [
<category: 'generic'>
^ (#letter asParser /
(PP.PPPredicateObjectParser chars: '0123456789-.!%*_+`''~' message: 'token'))
plus flatten
^ (PP.PPPredicateObjectParser on: (PP.PPCharSetPredicate on:
[:char | char isAlphaNumeric or: [
'-.!%*_+`''~' includes: char]]) message: 'token') plus flatten
]
header_name [