|
1 <?php |
|
2 /************************************************************************************* |
|
3 * objc.php |
|
4 * -------- |
|
5 * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net) |
|
6 * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/) |
|
7 * Release Version: 1.0.7.20 |
|
8 * Date Started: 2004/06/04 |
|
9 * |
|
10 * Objective C language file for GeSHi. |
|
11 * |
|
12 * CHANGES |
|
13 * ------- |
|
14 * 2004/11/27 (1.0.0) |
|
15 * - First Release |
|
16 * |
|
17 * TODO (updated 2004/11/27) |
|
18 * ------------------------- |
|
19 * |
|
20 ************************************************************************************* |
|
21 * |
|
22 * This file is part of GeSHi. |
|
23 * |
|
24 * GeSHi is free software; you can redistribute it and/or modify |
|
25 * it under the terms of the GNU General Public License as published by |
|
26 * the Free Software Foundation; either version 2 of the License, or |
|
27 * (at your option) any later version. |
|
28 * |
|
29 * GeSHi is distributed in the hope that it will be useful, |
|
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
32 * GNU General Public License for more details. |
|
33 * |
|
34 * You should have received a copy of the GNU General Public License |
|
35 * along with GeSHi; if not, write to the Free Software |
|
36 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
37 * |
|
38 ************************************************************************************/ |
|
39 |
|
40 $language_data = array ( |
|
41 'LANG_NAME' => 'Objective C', |
|
42 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), |
|
43 'COMMENT_MULTI' => array('/*' => '*/'), |
|
44 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, |
|
45 'QUOTEMARKS' => array("'", '"'), |
|
46 'ESCAPE_CHAR' => '\\', |
|
47 'KEYWORDS' => array( |
|
48 1 => array( |
|
49 'if', 'return', 'while', 'case', 'continue', 'default', |
|
50 'do', 'else', 'for', 'switch', 'goto' |
|
51 ), |
|
52 2 => array( |
|
53 'NULL', 'false', 'break', 'true', 'enum', 'nil', 'Nil', 'errno', 'EDOM', |
|
54 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', |
|
55 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', |
|
56 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', |
|
57 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', |
|
58 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', |
|
59 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', |
|
60 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', |
|
61 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', |
|
62 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', |
|
63 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', |
|
64 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC' |
|
65 ), |
|
66 3 => array( |
|
67 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', |
|
68 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', |
|
69 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', |
|
70 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', |
|
71 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', |
|
72 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', |
|
73 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', |
|
74 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', |
|
75 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', |
|
76 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', |
|
77 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', |
|
78 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', |
|
79 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', |
|
80 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', |
|
81 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', |
|
82 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', |
|
83 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', |
|
84 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', |
|
85 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' |
|
86 ), |
|
87 4 => array( // Data types: |
|
88 'auto', 'char', 'const', 'double', 'float', 'int', 'long', |
|
89 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', |
|
90 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', |
|
91 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', |
|
92 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', |
|
93 // OpenStep/GNUstep/Cocoa: |
|
94 'SEL', 'id', 'NSRect', 'NSRange', 'NSPoint', 'NSZone', 'Class', 'IMP', 'BOOL', |
|
95 // OpenStep/GNUstep/Cocoa @identifiers |
|
96 '@selector', '@class', '@protocol', '@interface', '@implementation', '@end', |
|
97 '@private', '@protected', '@public', '@try', '@throw', '@catch', '@finally', |
|
98 '@encode', '@defs', '@synchronized' |
|
99 ), |
|
100 5 => array( // OpenStep/GNUstep/Cocoa Foundation |
|
101 'NSAppleEventDescriptor', 'NSNetService', 'NSAppleEventManager', |
|
102 'NSNetServiceBrowser', 'NSAppleScript', 'NSNotification', 'NSArchiver', |
|
103 'NSNotificationCenter', 'NSArray', 'NSNotificationQueue', 'NSAssertionHandler', |
|
104 'NSNull', 'NSAttributedString', 'NSNumber', 'NSAutoreleasePool', |
|
105 'NSNumberFormatter', 'NSBundle', 'NSObject', 'NSCachedURLResponse', |
|
106 'NSOutputStream', 'NSCalendarDate', 'NSPipe', 'NSCharacterSet', 'NSPort', |
|
107 'NSClassDescription', 'NSPortCoder', 'NSCloneCommand', 'NSPortMessage', |
|
108 'NSCloseCommand', 'NSPortNameServer', 'NSCoder', 'NSPositionalSpecifier', |
|
109 'NSConditionLock', 'NSProcessInfo', 'NSConnection', 'NSPropertyListSerialization', |
|
110 'NSCountCommand', 'NSPropertySpecifier', 'NSCountedSet', 'NSProtocolChecker', |
|
111 'NSCreateCommand', 'NSProxy', 'NSData', 'NSQuitCommand', 'NSDate', |
|
112 'NSRandomSpecifier', 'NSDateFormatter', 'NSRangeSpecifier', 'NSDecimalNumber', |
|
113 'NSRecursiveLock', 'NSDecimalNumberHandler', 'NSRelativeSpecifier', |
|
114 'NSDeleteCommand', 'NSRunLoop', 'NSDeserializer', 'NSScanner', 'NSDictionary', |
|
115 'NSScriptClassDescription', 'NSDirectoryEnumerator', 'NSScriptCoercionHandler', |
|
116 'NSDistantObject', 'NSScriptCommand', 'NSDistantObjectRequest', |
|
117 'NSScriptCommandDescription', 'NSDistributedLock', 'NSScriptExecutionContext', |
|
118 'NSDistributedNotificationCenter', 'NSScriptObjectSpecifier', 'NSEnumerator', |
|
119 'NSScriptSuiteRegistry', 'NSError', 'NSScriptWhoseTest', 'NSException', |
|
120 'NSSerializer', 'NSExistsCommand', 'NSSet', 'NSFileHandle', 'NSSetCommand', |
|
121 'NSFileManager', 'NSSocketPort', 'NSFormatter', 'NSSocketPortNameServer', |
|
122 'NSGetCommand', 'NSSortDescriptor', 'NSHost', 'NSSpecifierTest', 'NSHTTPCookie', |
|
123 'NSSpellServer', 'NSHTTPCookieStorage', 'NSStream', 'NSHTTPURLResponse', |
|
124 'NSString', 'NSIndexSet', 'NSTask', 'NSIndexSpecifier', 'NSThread', |
|
125 'NSInputStream', 'NSTimer', 'NSInvocation', 'NSTimeZone', 'NSKeyedArchiver', |
|
126 'NSUnarchiver', 'NSKeyedUnarchiver', 'NSUndoManager', 'NSLock', |
|
127 'NSUniqueIDSpecifier', 'NSLogicalTest', 'NSURL', 'NSMachBootstrapServer', |
|
128 'NSURLAuthenticationChallenge', 'NSMachPort', 'NSURLCache', 'NSMessagePort', |
|
129 'NSURLConnection', 'NSMessagePortNameServer', 'NSURLCredential', |
|
130 'NSMethodSignature', 'NSURLCredentialStorage', 'NSMiddleSpecifier', |
|
131 'NSURLDownload', 'NSMoveCommand', 'NSURLHandle', 'NSMutableArray', |
|
132 'NSURLProtectionSpace', 'NSMutableAttributedString', 'NSURLProtocol', |
|
133 'NSMutableCharacterSet', 'NSURLRequest', 'NSMutableData', 'NSURLResponse', |
|
134 'NSMutableDictionary', 'NSUserDefaults', 'NSMutableIndexSet', 'NSValue', |
|
135 'NSMutableSet', 'NSValueTransformer', 'NSMutableString', 'NSWhoseSpecifier', |
|
136 'NSMutableURLRequest', 'NSXMLParser', 'NSNameSpecifier' |
|
137 ), |
|
138 6 => array( // OpenStep/GNUstep/Cocoa AppKit |
|
139 'NSActionCell', 'NSOpenGLPixelFormat', 'NSAffineTransform', 'NSOpenGLView', |
|
140 'NSAlert', 'NSOpenPanel', 'NSAppleScript Additions', 'NSOutlineView', |
|
141 'NSApplication', 'NSPageLayout', 'NSArrayController', 'NSPanel', |
|
142 'NSATSTypesetter', 'NSParagraphStyle', 'NSPasteboard', 'NSBezierPath', |
|
143 'NSPDFImageRep', 'NSBitmapImageRep', 'NSPICTImageRep', 'NSBox', 'NSPopUpButton', |
|
144 'NSBrowser', 'NSPopUpButtonCell', 'NSBrowserCell', 'NSPrinter', 'NSPrintInfo', |
|
145 'NSButton', 'NSPrintOperation', 'NSButtonCell', 'NSPrintPanel', 'NSCachedImageRep', |
|
146 'NSProgressIndicator', 'NSCell', 'NSQuickDrawView', 'NSClipView', 'NSResponder', |
|
147 'NSRulerMarker', 'NSColor', 'NSRulerView', 'NSColorList', 'NSSavePanel', |
|
148 'NSColorPanel', 'NSScreen', 'NSColorPicker', 'NSScroller', 'NSColorWell', |
|
149 'NSScrollView', 'NSComboBox', 'NSSearchField', 'NSComboBoxCell', |
|
150 'NSSearchFieldCell', 'NSControl', 'NSSecureTextField', 'NSController', |
|
151 'NSSecureTextFieldCell', 'NSCursor', 'NSSegmentedCell', 'NSCustomImageRep', |
|
152 'NSSegmentedControl', 'NSDocument', 'NSShadow', 'NSDocumentController', |
|
153 'NSSimpleHorizontalTypesetter', 'NSDrawer', 'NSSlider', 'NSEPSImageRep', |
|
154 'NSSliderCell', 'NSEvent', 'NSSound', 'NSFileWrapper', 'NSSpeechRecognizer', |
|
155 'NSFont', 'NSSpeechSynthesizer', 'NSFontDescriptor', 'NSSpellChecker', |
|
156 'NSFontManager', 'NSSplitView', 'NSFontPanel', 'NSStatusBar', 'NSForm', |
|
157 'NSStatusItem', 'NSFormCell', 'NSStepper', 'NSGlyphGenerator', 'NSStepperCell', |
|
158 'NSGlyphInfo', 'NSGraphicsContext', 'NSTableColumn', 'NSHelpManager', |
|
159 'NSTableHeaderCell', 'NSImage', 'NSTableHeaderView', 'NSImageCell', 'NSTableView', |
|
160 'NSImageRep', 'NSTabView', 'NSImageView', 'NSTabViewItem', 'NSInputManager', |
|
161 'NSText', 'NSInputServer', 'NSTextAttachment', 'NSLayoutManager', |
|
162 'NSTextAttachmentCell', 'NSMatrix', 'NSTextContainer', 'NSMenu', 'NSTextField', |
|
163 'NSMenuItem', 'NSTextFieldCell', 'NSMenuItemCell', 'NSTextStorage', 'NSMenuView', |
|
164 'NSTextTab', 'NSMovie', 'NSTextView', 'NSMovieView', 'NSToolbar', 'NSToolbarItem', |
|
165 'NSMutableParagraphStyle', 'NSTypesetter', 'NSNib', 'NSNibConnector', |
|
166 'NSUserDefaultsController', 'NSNibControlConnector', 'NSView', |
|
167 'NSNibOutletConnector', 'NSWindow', 'NSObjectController', 'NSWindowController', |
|
168 'NSOpenGLContext', 'NSWorkspace', 'NSOpenGLPixelBuffer' |
|
169 ) |
|
170 ), |
|
171 'SYMBOLS' => array( |
|
172 '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' |
|
173 ), |
|
174 'CASE_SENSITIVE' => array( |
|
175 GESHI_COMMENTS => true, |
|
176 1 => false, |
|
177 2 => false, |
|
178 3 => false, |
|
179 4 => false, |
|
180 5 => false, |
|
181 6 => false, |
|
182 ), |
|
183 'STYLES' => array( |
|
184 'KEYWORDS' => array( |
|
185 1 => 'color: #0000ff;', |
|
186 2 => 'color: #0000ff;', |
|
187 3 => 'color: #0000dd;', |
|
188 4 => 'color: #0000ff;', |
|
189 5 => 'color: #0000ff;', |
|
190 6 => 'color: #0000ff;' |
|
191 ), |
|
192 'COMMENTS' => array( |
|
193 1 => 'color: #ff0000;', |
|
194 2 => 'color: #339900;', |
|
195 'MULTI' => 'color: #ff0000; font-style: italic;' |
|
196 ), |
|
197 'ESCAPE_CHAR' => array( |
|
198 0 => 'color: #666666; font-weight: bold;' |
|
199 ), |
|
200 'BRACKETS' => array( |
|
201 0 => 'color: #002200;' |
|
202 ), |
|
203 'STRINGS' => array( |
|
204 0 => 'color: #666666;' |
|
205 ), |
|
206 'NUMBERS' => array( |
|
207 0 => 'color: #0000dd;' |
|
208 ), |
|
209 'METHODS' => array( |
|
210 ), |
|
211 'SYMBOLS' => array( |
|
212 0 => 'color: #002200;' |
|
213 ), |
|
214 'REGEXPS' => array( |
|
215 ), |
|
216 'SCRIPT' => array( |
|
217 ) |
|
218 ), |
|
219 'URLS' => array( |
|
220 1 => '', |
|
221 2 => '', |
|
222 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', |
|
223 4 => '', |
|
224 5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/{FNAME}.html', |
|
225 6 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/{FNAME}.html' |
|
226 ), |
|
227 'OOLANG' => false, |
|
228 'OBJECT_SPLITTERS' => array( |
|
229 ), |
|
230 'REGEXPS' => array( |
|
231 ), |
|
232 'STRICT_MODE_APPLIES' => GESHI_NEVER, |
|
233 'SCRIPT_DELIMITERS' => array( |
|
234 ), |
|
235 'HIGHLIGHT_STRICT_BLOCK' => array( |
|
236 ) |
|
237 ); |
|
238 |
|
239 ?> |