Popularity
0.6
Stable
Activity
0.0
Stable
17
3
1

Code Quality Rank: L4
Programming language: Swift
License: MIT License
Tags: Utility    

SwiftExP alternatives and similar libraries

Based on the "Utility" category.
Alternatively, view SwiftExP alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of SwiftExP or a related project?

Add another 'Utility' Library

README

SwiftExP

License: MIT

This is an S-expression parser written in pure Swift 2.0, where pure means without making any necessary usage of Foundation APIs at its core. This means: neither NSScanner, nor NSRegularExpression, nor NSCharacterSet, not even NSString.

S-expressions is a notation format for nested list data on which Lisp languages are based.

Architectural / Paradigm Considerations

While S-expressions have a very simple base syntax and there are appealing approaches on using a functional-compositional style to implement a parser in general in Swift, this implementation goes a different way. It is imperative and makes intense usage of Swift specific features, in particular Optionals, the try/throw/do-catch error handling and mutating functions on value types.

The top-down Parser operates without prior Lexing directly on the String through Scanner, which is a minimalistic attempt to wrap access on a Character-oriented basis. The current state is given at any time through the call-stack, which also means that the implementation is heavily based on recursion.


*Note that all licence references and agreements mentioned in the SwiftExP README section above are relevant to that project's source code only.