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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to