Where's NSExpression format string syntax documented?
Where's NSExpression format string syntax documented?
- Subject: Where's NSExpression format string syntax documented?
- From: Jens Alfke <email@hidden>
- Date: Fri, 12 Dec 2014 11:03:11 -0800
I'm looking for a description of the expression syntax that +[NSExpression expressionWithFormat:] parses, but I can't find anything. There's a whole page on the _predicate_ format string syntax*, but that only covers the syntax specific to predicates and ignores expressions. (For example, it describes relational operators like == and >, but not arithmetic operators like +.)
As for expressions, the only thing I can find is the full BNF grammar** which does the job but is rather a difficult way to learn the syntax. And there's the class API docs for NSExpression which describe the functionality but only how to build expressions programmatically, not from strings.
(I'm asking this because I'm writing documentation for an API that uses NSExpression format strings, and I want to point the reader to the Apple documentation of the syntax. In other words, I already know the syntax, I'm just looking for a good explanation to help other people to learn it.)
—Jens
* https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html
** https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Predicates/Articles/pBNF.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden