|Version 3 (modified by psychs, 9 years ago)|
CocoaOniguruma is an Objective-C binding of Oniguruma regular expression engine.
It's simple and tiny compared to the other bindings.
svn co http://svn.coderepos.org/share/lang/objective-c/CocoaOniguruma cocoaoniguruma
How to use
Follow the steps to use CocoaOniguruma in your project.
- Copy CocoaOniguruma directory into your project directory. (Assume your project name is "YourProject?" here.)
- Open your project by Xcode.
- Add all .h and .m files under "Classes".
- Add an external target under Targets.
- Right click on Targets and select [Add] -> [New Target...].
- In the Assistant dialog, select "External Target" under "Special Targets".
- Input "CocoaOniguruma" for "Target Name".
- Double click on the CocoaOniguruma target under "Targets".
- In the dialog, input "CocoaOniguruma/oniguruma" for "Directory" under "Custom Build Command".
- Add the external target to the build process.
- Build the project. (This takes for a while)
- Add libonig.a to "Linked Frameworks".
- Expand "Frameworks" item.
- Right click on "Linked Frameworks" and select [Add] -> [Existing Files...].
- Select "CocoaOniguruma/oniguruma/universal/libonig.a".
- Import the header file so you can use CocoaOniguruma! #import "CocoaOniguruma/OnigRegexp?.h"
- Satoshi Nakagawa <artension AT gmail DOT com>
- http://d.hatena.ne.jp/Psychs/ (in Japanese)
- #limechat on irc.freenode.net
The revised BSD license.
See also the Oniguruma's COPYING file.
Copyright (c) 2008 Satoshi Nakagawa <artension AT gmail DOT com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.