4a733d0ce6f0c5e91327cfbd10c111df08f4458e
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3editor / res / jslib / parse_typoscript / tokenizetyposcript.js
1 /* Tokenizer for TypoScript code
2 *
3 * based on tokenizejavascript.js by Marijn Haverbeke
4 */
5
6 // List of "reserved" word in typoscript and a css-class
7 var typoscriptWords = {
8 '_CSS_DEFAULT_STYLE': 'keyword',
9 '_DEFAULT_PI_VARS': 'keyword',
10 '_GIFBUILDER': 'keyword',
11 '_LOCAL_LANG': 'keyword',
12 'CARRAY': 'keyword',
13 'CASE': 'keyword',
14 'CLEARGIF': 'keyword',
15 'COA': 'keyword',
16 'COA_INT': 'keyword',
17 'COBJ_ARRAY': 'keyword',
18 'COLUMNS': 'keyword',
19 'CONFIG': 'keyword',
20 'CONSTANTS': 'keyword',
21 'CONTENT': 'keyword',
22 'CTABLE': 'keyword',
23 'CType': 'keyword',
24 'DB': 'keyword',
25 'DOCUMENT_BODY': 'keyword',
26 'EDITPANEL': 'keyword',
27 'EFFECT': 'keyword',
28 'FE_DATA': 'keyword',
29 'FE_TABLE': 'keyword',
30 'FEData': 'keyword',
31 'FILE': 'keyword',
32 'FORM': 'keyword',
33 'FRAME': 'keyword',
34 'FRAMESET': 'keyword',
35 'GIFBUILDER': 'keyword',
36 'global': 'keyword',
37 'globalString': 'keyword',
38 'globalVar': 'keyword',
39 'GMENU': 'keyword',
40 'GMENU_FOLDOUT': 'keyword',
41 'GMENU_LAYERS': 'keyword',
42 'GP': 'keyword',
43 'HMENU': 'keyword',
44 'HRULER': 'keyword',
45 'HTML': 'keyword',
46 'IENV': 'keyword',
47 'IMAGE': 'keyword',
48 'IMG_RESOURCE': 'keyword',
49 'IMGMENU': 'keyword',
50 'IMGMENUITEM': 'keyword',
51 'IMGTEXT': 'keyword',
52 'INCLUDE_TYPOSCRIPT': 'keyword',
53 'includeLibs': 'keyword',
54 'JSMENU': 'keyword',
55 'JSMENUITEM': 'keyword',
56 'LIT': 'keyword',
57 'LOAD_REGISTER': 'keyword',
58 'META': 'keyword',
59 'MULTIMEDIA': 'keyword',
60 'OTABLE': 'keyword',
61 'PAGE': 'keyword',
62 'PAGE_TARGET': 'keyword',
63 'PAGE_TSCONFIG_ID': 'keyword',
64 'PAGE_TSCONFIG_IDLIST': 'keyword',
65 'PAGE_TSCONFIG_STR': 'keyword',
66 'PHP_SCRIPT': 'keyword',
67 'PHP_SCRIPT_EXT': 'keyword',
68 'PHP_SCRIPT_INT': 'keyword',
69 'RECORDS': 'keyword',
70 'REMOTE_ADDR': 'keyword',
71 'RESTORE_REGISTER': 'keyword',
72 'RTE': 'keyword',
73 'SEARCHRESULT': 'keyword',
74 'SHARED': 'keyword',
75 'TCAdefaults': 'keyword',
76 'TCEFORM': 'keyword',
77 'TCEMAIN': 'keyword',
78 'TEMPLATE': 'keyword',
79 'TEXT': 'keyword',
80 'TMENU': 'keyword',
81 'TMENU_LAYERS': 'keyword',
82 'TMENUITEM': 'keyword',
83 'TSFE': 'keyword',
84 'USER': 'keyword',
85 'USER_INT': 'keyword',
86
87 'userFunc': 'keyword',
88
89 '_offset': 'reserved',
90 'absRefPrefix': 'reserved',
91 'accessibility': 'reserved',
92 'accessKey': 'reserved',
93 'addAttributes': 'reserved',
94 'addExtUrlsAndShortCuts': 'reserved',
95 'addItems': 'reserved',
96 'additionalHeaders': 'reserved',
97 'additionalParams': 'reserved',
98 'addParams': 'reserved',
99 'addQueryString': 'reserved',
100 'adjustItemsH': 'reserved',
101 'adjustSubItemsH': 'reserved',
102 'adminPanelStyles': 'reserved',
103 'after': 'reserved',
104 'afterImg': 'reserved',
105 'afterImgLink': 'reserved',
106 'afterImgTagParams': 'reserved',
107 'afterROImg': 'reserved',
108 'afterWrap': 'reserved',
109 'age': 'reserved',
110 'alertPopups': 'reserved',
111 'align': 'reserved',
112 'allow': 'reserved',
113 'allowCaching': 'reserved',
114 'allowedAttribs': 'reserved',
115 'allowedClasses': 'reserved',
116 'allowedCols': 'reserved',
117 'allowEdit': 'reserved',
118 'allowedNewTables': 'reserved',
119 'allowNew': 'reserved',
120 'allowTags': 'reserved',
121 'allowTVlisting': 'reserved',
122 'allSaveFunctions': 'reserved',
123 'allStdWrap': 'reserved',
124 'allWrap': 'reserved',
125 'alternateBgColors': 'reserved',
126 'alternativeSortingField': 'reserved',
127 'alternativeTempPath': 'reserved',
128 'altImgResource': 'reserved',
129 'altLabels': 'reserved',
130 'altTarget': 'reserved',
131 'altText': 'reserved',
132 'altUrl': 'reserved',
133 'altUrl_noDefaultParams': 'reserved',
134 'altWrap': 'reserved',
135 'always': 'reserved',
136 'alwaysActivePIDlist': 'reserved',
137 'alwaysLink': 'reserved',
138 'alwaysShowClickMenuInTopFrame': 'reserved',
139 'andWhere': 'reserved',
140 'angle': 'reserved',
141 'antiAlias': 'reserved',
142 'append': 'reserved',
143 'applyTotalH': 'reserved',
144 'applyTotalW': 'reserved',
145 'archive': 'reserved',
146 'archiveTypoLink': 'reserved',
147 'arrayReturnMode': 'reserved',
148 'arrowACT': 'reserved',
149 'arrowImgParams': 'reserved',
150 'arrowNO': 'reserved',
151 'ATagAfterWrap': 'reserved',
152 'ATagBeforeWrap': 'reserved',
153 'ATagParams': 'reserved',
154 'ATagTitle': 'reserved',
155 'attribute': 'reserved',
156 'autoInsertPID': 'reserved',
157 'autoLevels': 'reserved',
158 'autonumber': 'reserved',
159 'backColor': 'reserved',
160 'background': 'reserved',
161 'badMess': 'reserved',
162 'baseURL': 'reserved',
163 'before': 'reserved',
164 'beforeImg': 'reserved',
165 'beforeImgLink': 'reserved',
166 'beforeImgTagParams': 'reserved',
167 'beforeROImg': 'reserved',
168 'beforeWrap': 'reserved',
169 'begin': 'reserved',
170 'beLoginLinkIPList': 'reserved',
171 'beLoginLinkIPList_login': 'reserved',
172 'beLoginLinkIPList_logout': 'reserved',
173 'bgCol': 'reserved',
174 'bgImg': 'reserved',
175 'blankStrEqFalse': 'reserved',
176 'blur': 'reserved',
177 'bm': 'reserved',
178 'bodyTag': 'reserved',
179 'bodyTagAdd': 'reserved',
180 'bodyTagCObject': 'reserved',
181 'bodyTagMargins': 'reserved',
182 'bodytext': 'reserved',
183 'border': 'reserved',
184 'borderCol': 'reserved',
185 'bordersWithin': 'reserved',
186 'borderThick': 'reserved',
187 'bottomBackColor': 'reserved',
188 'bottomContent': 'reserved',
189 'bottomHeight': 'reserved',
190 'bottomImg': 'reserved',
191 'bottomImg_mask': 'reserved',
192 'br': 'reserved',
193 'brTag': 'reserved',
194 'bullet': 'reserved',
195 'bulletlist': 'reserved',
196 'bytes': 'reserved',
197 'cache_clearAtMidnight': 'reserved',
198 'cache_period': 'reserved',
199 'caption': 'reserved',
200 'caption_stdWrap': 'reserved',
201 'captionAlign': 'reserved',
202 'captionHeader': 'reserved',
203 'captionSplit': 'reserved',
204 'case': 'reserved',
205 'casesensitiveComp': 'reserved',
206 'cellpadding': 'reserved',
207 'cellspacing': 'reserved',
208 'centerImgACT': 'reserved',
209 'centerImgCUR': 'reserved',
210 'centerImgNO': 'reserved',
211 'centerLeftImgACT': 'reserved',
212 'centerLeftImgCUR': 'reserved',
213 'centerLeftImgNO': 'reserved',
214 'centerRightImgACT': 'reserved',
215 'centerRightImgCUR': 'reserved',
216 'centerRightImgNO': 'reserved',
217 'char': 'reserved',
218 'charcoal': 'reserved',
219 'charMapConfig': 'reserved',
220 'check': 'reserved',
221 'class': 'reserved',
222 'classesAnchor': 'reserved',
223 'classesCharacter': 'reserved',
224 'classesImage': 'reserved',
225 'classesParagraph': 'reserved',
226 'classicPageEditMode': 'reserved',
227 'clear': 'reserved',
228 'clearCache': 'reserved',
229 'clearCache_disable': 'reserved',
230 'clearCache_pageGrandParent': 'reserved',
231 'clearCache_pageSiblingChildren': 'reserved',
232 'clearCacheCmd': 'reserved',
233 'clearCacheLevels': 'reserved',
234 'clearCacheOfPages': 'reserved',
235 'clickMenuTimeOut': 'reserved',
236 'clickTitleMode': 'reserved',
237 'clipboardNumberPads': 'reserved',
238 'cMargins': 'reserved',
239 'cObjNum': 'reserved',
240 'collapse': 'reserved',
241 'color': 'reserved',
242 'color1': 'reserved',
243 'color2': 'reserved',
244 'color3': 'reserved',
245 'color4': 'reserved',
246 'colors': 'reserved',
247 'colour': 'reserved',
248 'colPos_list': 'reserved',
249 'colRelations': 'reserved',
250 'cols': 'reserved',
251 'colSpace': 'reserved',
252 'comment_auto': 'reserved',
253 'commentWrap': 'reserved',
254 'compensateFieldWidth': 'reserved',
255 'compX': 'reserved',
256 'compY': 'reserved',
257 'condensedMode': 'reserved',
258 'conf': 'reserved',
259 'constants': 'reserved',
260 'content_from_pid_allowOutsideDomain': 'reserved',
261 'contextMenu': 'reserved',
262 'copyLevels': 'reserved',
263 'count_HMENU_MENUOBJ': 'reserved',
264 'count_menuItems': 'reserved',
265 'count_MENUOBJ': 'reserved',
266 'create': 'reserved',
267 'createFoldersInEB': 'reserved',
268 'crop': 'reserved',
269 'csConv': 'reserved',
270 'CSS_inlineStyle': 'reserved',
271 'current': 'reserved',
272 'curUid': 'reserved',
273 'cWidth': 'reserved',
274 'data': 'reserved',
275 'dataWrap': 'reserved',
276 'date': 'reserved',
277 'date_stdWrap': 'reserved',
278 'datePrefix': 'reserved',
279 'debug': 'reserved',
280 'debugData': 'reserved',
281 'debugFunc': 'reserved',
282 'debugItemConf': 'reserved',
283 'debugRenumberedObject': 'reserved',
284 'default': 'reserved',
285 'defaultAlign': 'reserved',
286 'defaultCmd': 'reserved',
287 'defaultFileUploads': 'reserved',
288 'defaultHeaderType': 'reserved',
289 'defaultOutput': 'reserved',
290 'defaults': 'reserved',
291 'defaultType': 'reserved',
292 'delete': 'reserved',
293 'denyTags': 'reserved',
294 'depth': 'reserved',
295 'DESC': 'reserved',
296 'dimensions': 'reserved',
297 'directionLeft': 'reserved',
298 'directionUp': 'reserved',
299 'disableAdvanced': 'reserved',
300 'disableAllHeaderCode': 'reserved',
301 'disableAltText': 'reserved',
302 'disableBigButtons': 'reserved',
303 'disableCacheSelector': 'reserved',
304 'disableCharsetHeader': 'reserved',
305 'disabled': 'reserved',
306 'disableDelete': 'reserved',
307 'disableDocModuleInAB': 'reserved',
308 'disableDocSelector': 'reserved',
309 'disableHideAtCopy': 'reserved',
310 'disableIconLinkToContextmenu': 'reserved',
311 'disableItems': 'reserved',
312 'disableNewContentElementWizard': 'reserved',
313 'disableNoMatchingValueElement': 'reserved',
314 'disablePageExternalUrl': 'reserved',
315 'disablePrefixComment': 'reserved',
316 'disablePrependAtCopy': 'reserved',
317 'disableSearchBox': 'reserved',
318 'disablePageInformation': 'reserved',
319 'disableSingleTableView': 'reserved',
320 'disableTabInTextarea': 'reserved',
321 'displayActiveOnLoad': 'reserved',
322 'displayContent': 'reserved',
323 'displayFieldIcons': 'reserved',
324 'displayIcons': 'reserved',
325 'displayMessages': 'reserved',
326 'displayQueries': 'reserved',
327 'displayRecord': 'reserved',
328 'displayTimes': 'reserved',
329 'distributeX': 'reserved',
330 'distributeY': 'reserved',
331 'DIV': 'reserved',
332 'doctype': 'reserved',
333 'doctypeSwitch': 'reserved',
334 'doktype': 'reserved',
335 'doNotLinkIt': 'reserved',
336 'doNotShowLink': 'reserved',
337 'doNotStripHTML': 'reserved',
338 'dontCheckPid': 'reserved',
339 'dontFollowMouse': 'reserved',
340 'dontHideOnMouseUp': 'reserved',
341 'dontLinkIfSubmenu': 'reserved',
342 'dontShowPalettesOnFocusInAB': 'reserved',
343 'dontWrapInTable': 'reserved',
344 'doubleBrTag': 'reserved',
345 'doublePostCheck': 'reserved',
346 'dWorkArea': 'reserved',
347 'edge': 'reserved',
348 'edit_docModuleUplaod': 'reserved',
349 'edit_docModuleUpload': 'reserved',
350 'edit_RTE': 'reserved',
351 'edit_showFieldHelp': 'reserved',
352 'edit_wideDocument': 'reserved',
353 'editFieldsAtATime': 'reserved',
354 'editFormsOnPage': 'reserved',
355 'editIcons': 'reserved',
356 'editNoPopup': 'reserved',
357 'editPanel': 'reserved',
358 'elements': 'reserved',
359 'emailMeAtLogin': 'reserved',
360 'emailMess': 'reserved',
361 'emboss': 'reserved',
362 'enable': 'reserved',
363 'encapsLines': 'reserved',
364 'encapsLinesStdWrap': 'reserved',
365 'encapsTagList': 'reserved',
366 'entryLevel': 'reserved',
367 'equalH': 'reserved',
368 'everybody': 'reserved',
369 'excludeDoktypes': 'reserved',
370 'excludeUidList': 'reserved',
371 'expAll': 'reserved',
372 'expand': 'reserved',
373 'explode': 'reserved',
374 'ext': 'reserved',
375 'externalBlocks': 'reserved',
376 'extTarget': 'reserved',
377 'face': 'reserved',
378 'fe_adminLib': 'reserved',
379 'field': 'reserved',
380 'fieldOrder': 'reserved',
381 'fieldRequired': 'reserved',
382 'fields': 'reserved',
383 'fieldWrap': 'reserved',
384 'file': 'reserved',
385 'file1': 'reserved',
386 'file2': 'reserved',
387 'file3': 'reserved',
388 'file4': 'reserved',
389 'file5': 'reserved',
390 'filelink': 'reserved',
391 'filelist': 'reserved',
392 'firstLabel': 'reserved',
393 'firstLabelGeneral': 'reserved',
394 'fixAttrib': 'reserved',
395 'flip': 'reserved',
396 'flop': 'reserved',
397 'foldSpeed': 'reserved',
398 'foldTimer': 'reserved',
399 'fontColor': 'reserved',
400 'fontFile': 'reserved',
401 'fontOffset': 'reserved',
402 'fontSize': 'reserved',
403 'fontSizeMultiplicator': 'reserved',
404 'fontTag': 'reserved',
405 'forceDisplayFieldIcons': 'reserved',
406 'forceDisplayIcons': 'reserved',
407 'forceNoPopup': 'reserved',
408 'forceTemplateParsing': 'reserved',
409 'forceTypeValue': 'reserved',
410 'format': 'reserved',
411 'frame': 'reserved',
412 'frameReloadIfNotInFrameset': 'reserved',
413 'frameSet': 'reserved',
414 'freezeMouseover': 'reserved',
415 'ftu': 'reserved',
416 'function': 'reserved',
417 'gamma': 'reserved',
418 'gapBgCol': 'reserved',
419 'gapLineCol': 'reserved',
420 'gapLineThickness': 'reserved',
421 'gapWidth': 'reserved',
422 'get': 'reserved',
423 'getBorder': 'reserved',
424 'getLeft': 'reserved',
425 'getRight': 'reserved',
426 'globalNesting': 'reserved',
427 'goodMess': 'reserved',
428 'gray': 'reserved',
429 'group': 'reserved',
430 'groupBy': 'reserved',
431 'groupid': 'reserved',
432 'header': 'reserved',
433 'header_layout': 'reserved',
434 'headerComment': 'reserved',
435 'headerData': 'reserved',
436 'headerSpace': 'reserved',
437 'headTag': 'reserved',
438 'height': 'reserved',
439 'helpText': 'reserved',
440 'hidden': 'reserved',
441 'hiddenFields': 'reserved',
442 'hide': 'reserved',
443 'hideButCreateMap': 'reserved',
444 'hideMenuTimer': 'reserved',
445 'hideMenuWhenNotOver': 'reserved',
446 'hidePStyleItems': 'reserved',
447 'hideRecords': 'reserved',
448 'hideSubmoduleIcons': 'reserved',
449 'highColor': 'reserved',
450 'history': 'reserved',
451 'hover': 'reserved',
452 'hoverStyle': 'reserved',
453 'HTMLparser': 'reserved',
454 'HTMLparser_tags': 'reserved',
455 'htmlSpecialChars': 'reserved',
456 'htmlTag_dir': 'reserved',
457 'htmlTag_langKey': 'reserved',
458 'htmlTag_setParams': 'reserved',
459 'http': 'reserved',
460 'icon': 'reserved',
461 'icon_image_ext_list': 'reserved',
462 'icon_link': 'reserved',
463 'iconCObject': 'reserved',
464 'ifEmpty': 'reserved',
465 'image': 'reserved',
466 'image_compression': 'reserved',
467 'image_effects': 'reserved',
468 'image_frames': 'reserved',
469 'imageLinkWrap': 'reserved',
470 'imagePath': 'reserved',
471 'images': 'reserved',
472 'imageWrapIfAny': 'reserved',
473 'imgList': 'reserved',
474 'imgMap': 'reserved',
475 'imgMapExtras': 'reserved',
476 'imgMax': 'reserved',
477 'imgNameNotRandom': 'reserved',
478 'imgNamePrefix': 'reserved',
479 'imgObjNum': 'reserved',
480 'imgParams': 'reserved',
481 'imgPath': 'reserved',
482 'imgStart': 'reserved',
483 'import': 'reserved',
484 'inc': 'reserved',
485 'includeCSS': 'reserved',
486 'includeLibrary': 'reserved',
487 'includeNotInMenu': 'reserved',
488 'incT3Lib_htmlmail': 'reserved',
489 'index': 'reserved',
490 'index_descrLgd': 'reserved',
491 'index_enable': 'reserved',
492 'index_externals': 'reserved',
493 'inlineStyle2TempFile': 'reserved',
494 'innerStdWrap': 'reserved',
495 'innerStdWrap_all': 'reserved',
496 'innerWrap': 'reserved',
497 'innerWrap2': 'reserved',
498 'input': 'reserved',
499 'inputLevels': 'reserved',
500 'insertClassesFromRTE': 'reserved',
501 'insertData': 'reserved',
502 'insertDmailerBoundaries': 'reserved',
503 'intensity': 'reserved',
504 'intTarget': 'reserved',
505 'intval': 'reserved',
506 'invert': 'reserved',
507 'IProcFunc': 'reserved',
508 'itemArrayProcFunc': 'reserved',
509 'itemH': 'reserved',
510 'items': 'reserved',
511 'itemsProcFunc': 'reserved',
512 'iterations': 'reserved',
513 'join': 'reserved',
514 'JSWindow': 'reserved',
515 'JSwindow_params': 'reserved',
516 'jumpurl': 'reserved',
517 'jumpUrl': 'reserved',
518 'jumpurl_enable': 'reserved',
519 'jumpurl_mailto_disable': 'reserved',
520 'jumpUrl_transferSession': 'reserved',
521 'keep': 'reserved',
522 'keepEntries': 'reserved',
523 'keepNonMatchedTags': 'reserved',
524 'key': 'reserved',
525 'label': 'reserved',
526 'labelStdWrap': 'reserved',
527 'labelWrap': 'reserved',
528 'lang': 'reserved',
529 'language': 'reserved',
530 'language_alt': 'reserved',
531 'languageField': 'reserved',
532 'layer_menu_id': 'reserved',
533 'layerStyle': 'reserved',
534 'left': 'reserved',
535 'leftIcons': 'reserved',
536 'leftImgACT': 'reserved',
537 'leftImgCUR': 'reserved',
538 'leftImgNO': 'reserved',
539 'leftjoin': 'reserved',
540 'leftOffset': 'reserved',
541 'levels': 'reserved',
542 'leveluid': 'reserved',
543 'limit': 'reserved',
544 'line': 'reserved',
545 'lineColor': 'reserved',
546 'lineThickness': 'reserved',
547 'linkPrefix': 'reserved',
548 'linkTitleToSelf': 'reserved',
549 'linkVars': 'reserved',
550 'linkWrap': 'reserved',
551 'listNum': 'reserved',
552 'listOnlyInSingleTableView': 'reserved',
553 'lm': 'reserved',
554 'locale_all': 'reserved',
555 'localNesting': 'reserved',
556 'locationData': 'reserved',
557 'lockFilePath': 'reserved',
558 'lockPosition': 'reserved',
559 'lockPosition_addSelf': 'reserved',
560 'lockPosition_adjust': 'reserved',
561 'lockToIP': 'reserved',
562 'longdescURL': 'reserved',
563 'lowColor': 'reserved',
564 'lower': 'reserved',
565 'LR': 'reserved',
566 'mailto': 'reserved',
567 'main': 'reserved',
568 'mainScript': 'reserved',
569 'makelinks': 'reserved',
570 'markerWrap': 'reserved',
571 'mask': 'reserved',
572 'max': 'reserved',
573 'maxAge': 'reserved',
574 'maxAgeDays': 'reserved',
575 'maxChars': 'reserved',
576 'maxH': 'reserved',
577 'maxHeight': 'reserved',
578 'maxItems': 'reserved',
579 'maxW': 'reserved',
580 'maxWidth': 'reserved',
581 'maxWInText': 'reserved',
582 'mayNotCreateEditShortcuts': 'reserved',
583 'menu_type': 'reserved',
584 'menuBackColor': 'reserved',
585 'menuHeight': 'reserved',
586 'menuName': 'reserved',
587 'menuOffset': 'reserved',
588 'menuWidth': 'reserved',
589 'message_page_is_being_generated': 'reserved',
590 'message_preview': 'reserved',
591 'meta': 'reserved',
592 'metaCharset': 'reserved',
593 'method': 'reserved',
594 'min': 'reserved',
595 'minH': 'reserved',
596 'minItems': 'reserved',
597 'minW': 'reserved',
598 'mode': 'reserved',
599 'moduleMenuCollapsable': 'reserved',
600 'MP_defaults': 'reserved',
601 'MP_disableTypolinkClosestMPvalue': 'reserved',
602 'MP_mapRootPoints': 'reserved',
603 'name': 'reserved',
604 'navFrameResizable': 'reserved',
605 'navFrameWidth': 'reserved',
606 'nesting': 'reserved',
607 'netprintApplicationLink': 'reserved',
608 'neverHideAtCopy': 'reserved',
609 'newPageWiz': 'reserved',
610 'newRecordFromTable': 'reserved',
611 'newWindow': 'reserved',
612 'newWizards': 'reserved',
613 'next': 'reserved',
614 'niceText': 'reserved',
615 'nicetext': 'reserved',
616 'no_cache': 'reserved',
617 'no_search': 'reserved',
618 'noAttrib': 'reserved',
619 'noBlur': 'reserved',
620 'noCache': 'reserved',
621 'noCols': 'reserved',
622 'noCreateRecordsLink': 'reserved',
623 'noLink': 'reserved',
624 'noLinkUnderline': 'reserved',
625 'noMatchingValue_label': 'reserved',
626 'noMenuMode': 'reserved',
627 'nonCachedSubst': 'reserved',
628 'nonTypoTagStdWrap': 'reserved',
629 'nonTypoTagUserFunc': 'reserved',
630 'nonWrappedTag': 'reserved',
631 'noOrderBy': 'reserved',
632 'noPageTitle': 'reserved',
633 'noRows': 'reserved',
634 'noScaleUp': 'reserved',
635 'noStretchAndMarginCells': 'reserved',
636 'noThumbsInEB': 'reserved',
637 'noThumbsInRTEimageSelect': 'reserved',
638 'notification_email_charset': 'reserved',
639 'notification_email_encoding': 'reserved',
640 'notification_email_urlmode': 'reserved',
641 'noTrimWrap': 'reserved',
642 'noValueInsert': 'reserved',
643 'obj': 'reserved',
644 'offset': 'reserved',
645 'offsetWrap': 'reserved',
646 'onlineWorkspaceInfo': 'reserved',
647 'onlyCurrentPid': 'reserved',
648 'opacity': 'reserved',
649 'orderBy': 'reserved',
650 'outerWrap': 'reserved',
651 'outline': 'reserved',
652 'outputLevels': 'reserved',
653 'override': 'reserved',
654 'overrideAttribs': 'reserved',
655 'overrideEdit': 'reserved',
656 'overrideId': 'reserved',
657 'overridePageModule': 'reserved',
658 'overrideWithExtension': 'reserved',
659 'pageFrameObj': 'reserved',
660 'pageGenScript': 'reserved',
661 'pageTitleFirst': 'reserved',
662 'parameter': 'reserved',
663 'params': 'reserved',
664 'parseFunc': 'reserved',
665 'parser': 'reserved',
666 'password': 'reserved',
667 'path': 'reserved',
668 'permissions': 'reserved',
669 'pid_list': 'reserved',
670 'pidInList': 'reserved',
671 'pixelSpaceFontSizeRef': 'reserved',
672 'plaintextLib': 'reserved',
673 'plainTextStdWrap': 'reserved',
674 'postCObject': 'reserved',
675 'postLineBlanks': 'reserved',
676 'postLineChar': 'reserved',
677 'postLineLen': 'reserved',
678 'postUserFunc': 'reserved',
679 'postUserFuncInt': 'reserved',
680 'preBlanks': 'reserved',
681 'preCObject': 'reserved',
682 'prefix': 'reserved',
683 'prefixComment': 'reserved',
684 'prefixLocalAnchors': 'reserved',
685 'prefixRelPathWith': 'reserved',
686 'preIfEmptyListNum': 'reserved',
687 'preLineBlanks': 'reserved',
688 'preLineChar': 'reserved',
689 'preLineLen': 'reserved',
690 'prepend': 'reserved',
691 'preserveEntities': 'reserved',
692 'preUserFunc': 'reserved',
693 'prev': 'reserved',
694 'previewBorder': 'reserved',
695 'prevnextToSection': 'reserved',
696 'printheader': 'reserved',
697 'prioriCalc': 'reserved',
698 'proc': 'reserved',
699 'processScript': 'reserved',
700 'properties': 'reserved',
701 'protect': 'reserved',
702 'protectLvar': 'reserved',
703 'publish_levels': 'reserved',
704 'QEisDefault': 'reserved',
705 'quality': 'reserved',
706 'radio': 'reserved',
707 'radioWrap': 'reserved',
708 'range': 'reserved',
709 'rawUrlEncode': 'reserved',
710 'recipient': 'reserved',
711 'recursive': 'reserved',
712 'recursiveDelete': 'reserved',
713 'redirect': 'reserved',
714 'redirectToURL': 'reserved',
715 'reduceColors': 'reserved',
716 'register': 'reserved',
717 'relativeToParentLayer': 'reserved',
718 'relativeToTriggerItem': 'reserved',
719 'relPathPrefix': 'reserved',
720 'remap': 'reserved',
721 'remapTag': 'reserved',
722 'removeBadHTML': 'reserved',
723 'removeDefaultJS': 'reserved',
724 'removeIfEquals': 'reserved',
725 'removeIfFalse': 'reserved',
726 'removeItems': 'reserved',
727 'removeObjectsOfDummy': 'reserved',
728 'removePrependedNumbers': 'reserved',
729 'removeTags': 'reserved',
730 'removeWrapping': 'reserved',
731 'renderCharset': 'reserved',
732 'renderWrap': 'reserved',
733 'reset': 'reserved',
734 'resources': 'reserved',
735 'resultObj': 'reserved',
736 'returnLast': 'reserved',
737 'returnUrl': 'reserved',
738 'rightImgACT': 'reserved',
739 'rightImgCUR': 'reserved',
740 'rightImgNO': 'reserved',
741 'rightjoin': 'reserved',
742 'rm': 'reserved',
743 'rmTagIfNoAttrib': 'reserved',
744 'RO_chBgColor': 'reserved',
745 'rotate': 'reserved',
746 'rows': 'reserved',
747 'rowSpace': 'reserved',
748 'RTEfullScreenWidth': 'reserved',
749 'rules': 'reserved',
750 'sample': 'reserved',
751 'saveClipboard': 'reserved',
752 'saveDocNew': 'reserved',
753 'secondRow': 'reserved',
754 'section': 'reserved',
755 'sectionIndex': 'reserved',
756 'select': 'reserved',
757 'select_key': 'reserved',
758 'selectFields': 'reserved',
759 'separator': 'reserved',
760 'set': 'reserved',
761 'setContentToCurrent': 'reserved',
762 'setCurrent': 'reserved',
763 'setfixed': 'reserved',
764 'setFixedHeight': 'reserved',
765 'setFixedWidth': 'reserved',
766 'setJS_mouseOver': 'reserved',
767 'setJS_openPic': 'reserved',
768 'setOnly': 'reserved',
769 'shadow': 'reserved',
770 'sharpen': 'reserved',
771 'shear': 'reserved',
772 'short': 'reserved',
773 'shortcut': 'reserved',
774 'shortcut_onEditId_dontSetPageTree': 'reserved',
775 'shortcut_onEditId_keepExistingExpanded': 'reserved',
776 'shortcutFrame': 'reserved',
777 'shortcutGroups': 'reserved',
778 'shortcutIcon': 'reserved',
779 'show': 'reserved',
780 'showAccessRestrictedPages': 'reserved',
781 'showActive': 'reserved',
782 'showClipControlPanelsDespiteOfCMlayers': 'reserved',
783 'showFirst': 'reserved',
784 'showHiddenPages': 'reserved',
785 'showHiddenRecords': 'reserved',
786 'showHistory': 'reserved',
787 'showPageIdWithTitle': 'reserved',
788 'showTagFreeClasses': 'reserved',
789 'simulateDate': 'reserved',
790 'simulateUserGroup': 'reserved',
791 'singlePid': 'reserved',
792 'site_author': 'reserved',
793 'site_reserved': 'reserved',
794 'sitetitle': 'reserved',
795 'siteUrl': 'reserved',
796 'size': 'reserved',
797 'smallFormFields': 'reserved',
798 'solarize': 'reserved',
799 'sorting': 'reserved',
800 'source': 'reserved',
801 'space': 'reserved',
802 'spaceAfter': 'reserved',
803 'spaceBefore': 'reserved',
804 'spaceBelowAbove': 'reserved',
805 'spaceLeft': 'reserved',
806 'spaceRight': 'reserved',
807 'spacing': 'reserved',
808 'spamProtectEmailAddresses': 'reserved',
809 'spamProtectEmailAddresses_atSubst': 'reserved',
810 'spamProtectEmailAddresses_lastDotSubst': 'reserved',
811 'special': 'reserved',
812 'splitChar': 'reserved',
813 'splitRendering': 'reserved',
814 'src': 'reserved',
815 'startInTaskCenter': 'reserved',
816 'stayFolded': 'reserved',
817 'stdheader': 'reserved',
818 'stdWrap': 'reserved',
819 'stdWrap2': 'reserved',
820 'strftime': 'reserved',
821 'stripHtml': 'reserved',
822 'styles': 'reserved',
823 'stylesheet': 'reserved',
824 'submenuObjSuffixes': 'reserved',
825 'subMenuOffset': 'reserved',
826 'submit': 'reserved',
827 'subst_elementUid': 'reserved',
828 'substMarksSeparately': 'reserved',
829 'substring': 'reserved',
830 'swirl': 'reserved',
831 'sword': 'reserved',
832 'sword_noMixedCase': 'reserved',
833 'SWORD_PARAMS': 'reserved',
834 'sword_standAlone': 'reserved',
835 'sys_language_mode': 'reserved',
836 'sys_language_overlay': 'reserved',
837 'sys_language_softMergeIfNotBlank': 'reserved',
838 'sys_language_uid': 'reserved',
839 'table': 'reserved',
840 'tableCellColor': 'reserved',
841 'tableParams': 'reserved',
842 'tables': 'reserved',
843 'tableStdWrap': 'reserved',
844 'tableStyle': 'reserved',
845 'tableWidth': 'reserved',
846 'tags': 'reserved',
847 'target': 'reserved',
848 'TDparams': 'reserved',
849 'templateContent': 'reserved',
850 'templateFile': 'reserved',
851 'text': 'reserved',
852 'textarea': 'reserved',
853 'textMargin': 'reserved',
854 'textMargin_outOfText': 'reserved',
855 'textMaxLength': 'reserved',
856 'textObjNum': 'reserved',
857 'textPos': 'reserved',
858 'textStyle': 'reserved',
859 'thickness': 'reserved',
860 'thumbnailsByDefault': 'reserved',
861 'tile': 'reserved',
862 'time_stdWrap': 'reserved',
863 'tipafriendLib': 'reserved',
864 'title': 'reserved',
865 'titleLen': 'reserved',
866 'titleTagFunction': 'reserved',
867 'titleText': 'reserved',
868 'tm': 'reserved',
869 'token': 'reserved',
870 'topOffset': 'reserved',
871 'totalWidth': 'reserved',
872 'transparentBackground': 'reserved',
873 'transparentColor': 'reserved',
874 'trim': 'reserved',
875 'tsdebug_tree': 'reserved',
876 'type': 'reserved',
877 'typeNum': 'reserved',
878 'types': 'reserved',
879 'typolinkCheckRootline': 'reserved',
880 'uidInList': 'reserved',
881 'unset': 'reserved',
882 'uploadFieldsInTopOfEB': 'reserved',
883 'uploads': 'reserved',
884 'upper': 'reserved',
885 'useCacheHash': 'reserved',
886 'useLargestItemX': 'reserved',
887 'useLargestItemY': 'reserved',
888 'user': 'reserved',
889 'userdefined': 'reserved',
890 'userfunction': 'reserved',
891 'userid': 'reserved',
892 'userIdColumn': 'reserved',
893 'USERNAME_substToken': 'reserved',
894 'userProc': 'reserved',
895 'value': 'reserved',
896 'valueArray': 'reserved',
897 'wave': 'reserved',
898 'where': 'reserved',
899 'width': 'reserved',
900 'wiz': 'reserved',
901 'wordSpacing': 'reserved',
902 'workArea': 'reserved',
903 'wrap': 'reserved',
904 'wrap1': 'reserved',
905 'wrap2': 'reserved',
906 'wrap3': 'reserved',
907 'wrapAfterTags': 'reserved',
908 'wrapAlign': 'reserved',
909 'wrapFieldName': 'reserved',
910 'wrapItemAndSub': 'reserved',
911 'wrapNonWrappedLines': 'reserved',
912 'wraps': 'reserved',
913 'xhtml_cleaning': 'reserved',
914 'xmlprologue': 'reserved',
915 'xPosOffset': 'reserved',
916 'yPosOffset': 'reserved',
917
918 'admPanel': 'keyword2',
919 'alt_print': 'keyword2',
920 'auth': 'keyword2',
921 'browser': 'keyword2',
922 'cache': 'keyword2',
923 'CHECK': 'keyword2',
924 'cObj': 'keyword2',
925 'cObject': 'keyword2',
926 'COMMENT': 'keyword2',
927 'config': 'keyword2',
928 'content': 'keyword2',
929 'copy': 'keyword2',
930 'CSS_inlineStyle': 'keyword2',
931 'cut': 'keyword2',
932 'dataArray': 'keyword2',
933 'dayofmonth': 'keyword2',
934 'dayofweek': 'keyword2',
935 'db_list': 'keyword2',
936 'device': 'keyword2',
937 'dynCSS': 'keyword2',
938 'edit': 'keyword2',
939 'edit_access': 'keyword2',
940 'edit_pageheader': 'keyword2',
941 'folder': 'keyword2',
942 'folderTree': 'keyword2',
943 'foldoutMenu': 'keyword2',
944 'Functions': 'keyword2',
945 'gmenu_foldout': 'keyword2',
946 'gmenu_layers': 'keyword2',
947 'hostname': 'keyword2',
948 'hour': 'keyword2',
949 'imgList': 'keyword2',
950 'imgResource': 'keyword2',
951 'imgText': 'keyword2',
952 'info': 'keyword2',
953 'IP': 'keyword2',
954 'jsmenu': 'keyword2',
955 'JSwindow': 'keyword2',
956 'LABEL': 'keyword2',
957 'layout': 'keyword2',
958 'lib': 'keyword2',
959 'loginUser': 'keyword2',
960 'marks': 'keyword2',
961 'minute': 'keyword2',
962 'mod': 'keyword2',
963 'module': 'keyword2',
964 'month': 'keyword2',
965 'move_wizard': 'keyword2',
966 'new': 'keyword2',
967 'new_wizard': 'keyword2',
968 'noResultObj': 'keyword2',
969 'numRows': 'keyword2',
970 'options': 'keyword2',
971 'page': 'keyword2',
972 'pageTree': 'keyword2',
973 'paste': 'keyword2',
974 'perms': 'keyword2',
975 'PIDinRootline': 'keyword2',
976 'PIDupinRootline': 'keyword2',
977 'plugin': 'keyword2',
978 'postform': 'keyword2',
979 'postform_newThread': 'keyword2',
980 'preview': 'keyword2',
981 'publish': 'keyword2',
982 'RADIO': 'keyword2',
983 'renderObj': 'keyword2',
984 'REQ': 'keyword2',
985 'RTE': 'keyword2',
986 'RTE_compliant': 'keyword2',
987 'select': 'keyword2',
988 'setup': 'keyword2',
989 'split': 'keyword2',
990 'stat': 'keyword2',
991 'stat_apache': 'keyword2',
992 'stat_apache_logfile': 'keyword2',
993 'stat_apache_noHost': 'keyword2',
994 'stat_apache_notExtended': 'keyword2',
995 'stat_apache_pagenames': 'keyword2',
996 'stat_excludeBEuserHits': 'keyword2',
997 'stat_excludeIPList': 'keyword2',
998 'stat_mysql': 'keyword2',
999 'stat_titleLen': 'keyword2',
1000 'stat_typeNumList': 'keyword2',
1001 'stdWrap': 'keyword2',
1002 'subparts': 'keyword2',
1003 'system': 'keyword2',
1004 'temp': 'keyword2',
1005 'template': 'keyword2',
1006 'treeLevel': 'keyword2',
1007 'tsdebug': 'keyword2',
1008 'typolink': 'keyword2',
1009 'url': 'keyword2',
1010 'useragent': 'keyword2',
1011 'userFunc': 'keyword2',
1012 'version': 'keyword2',
1013 'view': 'keyword2',
1014 'workOnSubpart': 'keyword2',
1015
1016 'ACT': 'keyword3',
1017 'ACTIFSUB': 'keyword3',
1018 'ACTIFSUBRO': 'keyword',
1019 'ACTRO': 'keyword3',
1020 'all': 'keyword3',
1021 'arrowACT': 'keyword3',
1022 'arrowNO': 'keyword3',
1023 'ascii': 'keyword3',
1024 'atLeast': 'keyword3',
1025 'atMost': 'keyword3',
1026 'BE': 'keyword3',
1027 'be_groups': 'keyword3',
1028 'be_users': 'keyword3',
1029 'BOX': 'keyword3',
1030 'browse': 'keyword3',
1031 'bullets': 'keyword3',
1032 'CUR': 'keyword3',
1033 'CURIFSUB': 'keyword3',
1034 'CURIFSUBRO': 'keyword3',
1035 'CURRO': 'keyword3',
1036 'default': 'keyword3',
1037 'description': 'keyword3',
1038 'directory': 'keyword3',
1039 'directReturn': 'keyword3',
1040 'div': 'keyword3',
1041 'else': 'keyword3',
1042 'email': 'keyword3',
1043 'end': 'keyword3',
1044 'equals': 'keyword3',
1045 'external': 'keyword3',
1046 'false': 'keyword3',
1047 'FE': 'keyword3',
1048 'fe_groups': 'keyword3',
1049 'fe_users': 'keyword3',
1050 'feadmin': 'keyword3',
1051 'header': 'keyword3',
1052 'html': 'keyword3',
1053 'id': 'keyword3',
1054 'if': 'keyword3',
1055 'ifEmpty': 'keyword3',
1056 'IFSUB': 'keyword3',
1057 'IFSUBRO': 'keyword3',
1058 'image': 'keyword3',
1059 'inBranch': 'keyword3',
1060 'isFalse': 'keyword3',
1061 'isGreaterThan': 'keyword3',
1062 'isInList': 'keyword3',
1063 'isLessThan': 'keyword3',
1064 'isPositive': 'keyword3',
1065 'isTrue': 'keyword3',
1066 'keyword3': 'keyword3',
1067 'language': 'keyword3',
1068 'leveltitle': 'keyword3',
1069 'list': 'keyword3',
1070 'login': 'keyword3',
1071 'mailform': 'keyword3',
1072 'media': 'keyword3',
1073 'menu': 'keyword3',
1074 'mod': 'keyword3',
1075 'multimedia': 'keyword3',
1076 'negate': 'keyword3',
1077 'NEW': 'keyword3',
1078 'NO': 'keyword3',
1079 'none': 'keyword3',
1080 'pages': 'keyword3',
1081 'pages_language_overlay': 'keyword3',
1082 'parseFunc_RTE': 'keyword3',
1083 'pid': 'keyword3',
1084 'required': 'keyword3',
1085 'RO': 'keyword3',
1086 'rootline': 'keyword3',
1087 'script': 'keyword3',
1088 'search': 'keyword3',
1089 'shortcut': 'keyword3',
1090 'sitemap': 'keyword3',
1091 'SPC': 'keyword3',
1092 'splash': 'keyword3',
1093 'sys_dmail': 'keyword3',
1094 'sys_domain': 'keyword3',
1095 'sys_filemounts': 'keyword3',
1096 'sys_note': 'keyword3',
1097 'sys_template': 'keyword3',
1098 'tabel': 'keyword3',
1099 'text': 'keyword3',
1100 'textpic': 'keyword3',
1101 'this': 'keyword3',
1102 'top': 'keyword3',
1103 'true': 'keyword3',
1104 'twice': 'keyword3',
1105 'uid': 'keyword3',
1106 'uniqueGlobal': 'keyword3',
1107 'uniqueLocal': 'keyword3',
1108 'unsetEmpty': 'keyword3',
1109 'updated': 'keyword3',
1110 'uploads': 'keyword3',
1111 'us': 'keyword3',
1112 'user_task': 'keyword3',
1113 'USERDEF1': 'keyword3',
1114 'USERDEF1RO': 'keyword3',
1115 'USERDEF2': 'keyword3',
1116 'USERDEF2RO': 'keyword3',
1117 'usergroup': 'keyword3',
1118 'USR': 'keyword3',
1119 'USRRO': 'keyword3',
1120 'web_func': 'keyword3',
1121 'web_info': 'keyword3',
1122 'web_layout': 'keyword3',
1123 'web_list': 'keyword3',
1124 'web_ts': 'keyword',
1125 'xhtml_strict': 'keyword3',
1126 'xhtml_trans': 'keyword3',
1127 'XY': 'keyword3',
1128 'ypMenu': 'keyword3'
1129 }
1130
1131 var tokenizeTypoScript = function() {
1132
1133 // Some helper regexp matchers.
1134 var isOperatorChar = matcher(/[\+\-\*\&\%\/=<>!\?]/);
1135 var isDigit = matcher(/[0-9]/);
1136 var isHexDigit = matcher(/[0-9A-Fa-f]/);
1137 var isWordChar = matcher(/[\w\$_]/);
1138
1139 function isWhiteSpace(ch) {
1140 // Unfortunately, IE's regexp matcher thinks non-breaking spaces
1141 // aren't whitespace. Also, in our scheme newlines are no
1142 // whitespace (they are another special case).
1143 return ch != "\n" && (ch == nbsp || /\s/.test(ch));
1144 }
1145
1146 // This function produces a MochiKit-style iterator that tokenizes
1147 // the output of the given stringstream (see stringstream.js).
1148 // Tokens are objects with a type, style, and value property. The
1149 // value contains the textual content of the token. Because this may
1150 // include trailing whitespace (for efficiency reasons), some
1151 // tokens, such a variable names, also have a name property
1152 // containing their actual textual value.
1153 return function(source) {
1154 // Produce a value to return. Automatically skips and includes any
1155 // whitespace. The base argument is prepended to the value
1156 // property and assigned to the name property -- this is used when
1157 // the caller has already extracted the text from the stream
1158 // himself.
1159 function result(type, style, base) {
1160 // nextWhile(isWhiteSpace); - comment thats line because needed for autocomplete
1161 var value = {
1162 type: type,
1163 style: style,
1164 value: (base ? base + source.get() : source.get())
1165 };
1166 if (base) {
1167 value.name = base;
1168 }
1169 return value;
1170 }
1171
1172 // Advance the text stream over characters for which test returns
1173 // true. (The characters that are 'consumed' like this can later
1174 // be retrieved by calling source.get()).
1175 function nextWhile(test) {
1176 var next;
1177 while ((next = source.peek()) && test(next)) {
1178 source.next();
1179 }
1180 }
1181
1182 // Advance the stream until the given character (not preceded by a
1183 // backslash) is encountered (or a newline is found).
1184 function nextUntilUnescaped(end) {
1185 var escaped = false;
1186 var next;
1187 while ((next = source.peek()) && next != "\n") {
1188 source.next();
1189 if (next == end && !escaped) {
1190 break;
1191 }
1192 escaped = next == "\\";
1193 }
1194 }
1195
1196 function readHexNumber() {
1197 source.next();
1198 // skip the 'x'
1199 nextWhile(isHexDigit);
1200 return result("number", "atom");
1201 }
1202
1203 function readNumber() {
1204 nextWhile(isDigit);
1205 return result("number", "atom");
1206 }
1207
1208 // Read a word, look it up in keywords. If not found, it is a
1209 // variable, otherwise it is a keyword of the type found.
1210 function readWord() {
1211 nextWhile(isWordChar);
1212 var word = source.get();
1213 var known = typoscriptWords.hasOwnProperty(word) && {
1214 type: 'keyword',
1215 style: typoscriptWords[word]
1216 };
1217 return known ?
1218 result(known.type, known.style, word) :
1219 result("variable", "other", word);
1220 }
1221
1222 function readRegexp() {
1223 nextUntilUnescaped("/");
1224 nextWhile(matcher(/[gi]/));
1225 return result("regexp", "string");
1226 }
1227
1228 // Mutli-line comments are tricky. We want to return the newlines
1229 // embedded in them as regular newline tokens, and then continue
1230 // returning a comment token for every line of the comment. So
1231 // some state has to be saved (inComment) to indicate whether we
1232 // are inside a /* */ sequence.
1233 function readMultilineComment(start) {
1234 this.inComment = true;
1235 var maybeEnd = (start == "*");
1236 while (true) {
1237 var next = source.peek();
1238 if (next == "\n") {
1239 break;
1240 }
1241 source.next();
1242 if (next == "/" && maybeEnd) {
1243 this.inComment = false;
1244 break;
1245 }
1246 maybeEnd = (next == "*");
1247 }
1248
1249 return result("comment", "ts-comment");
1250 }
1251
1252 // Fetch the next token. Dispatches on first character in the
1253 // stream, or first two characters when the first is a slash. The
1254 // || things are a silly trick to keep simple cases on a single
1255 // line.
1256 function next() {
1257 var token = null;
1258 var ch = source.next();
1259 if (ch == "\n") {
1260 token = {
1261 type: "newline",
1262 style: "whitespace",
1263 value: source.get()
1264 };
1265 this.inValue = false;
1266
1267 } else if (!this.inValue && this.inComment) {
1268 token = readMultilineComment.call(this, ch);
1269
1270 /*
1271 } else if (this.inValue) {
1272 token = nextUntilUnescaped(null) || {
1273 type: "value",
1274 style: "ts-value",
1275 value: source.get()
1276 };
1277 this.inValue = false;
1278 */
1279
1280 } else if (isWhiteSpace(ch)) {
1281 token = nextWhile(isWhiteSpace) || result("whitespace", "whitespace");
1282
1283 } else if (!this.inValue && (ch == "\"" || ch == "'")) {
1284 token = nextUntilUnescaped(ch) || result("string", "string");
1285
1286 } else if (
1287 ( ch == "<" ||
1288 ch == ">" ||
1289 ( ch == "="
1290 && source.peek() != "<"
1291 )
1292 )
1293 && source.peek() != "\n" ) { // there must be some value behind the operator!
1294 this.inValue = true;
1295 token = result(ch, "ts-operator");
1296
1297 } else if (!this.inValue && ch == "[") {
1298 token = nextUntilUnescaped("]") || result("condition", "ts-condition");
1299
1300 // with punctuation, the type of the token is the symbol itself
1301 } else if (!this.inValue && /[\[\]\(\),;\:\.\<\>\=]/.test(ch)) {
1302 token = result(ch, "ts-operator");
1303
1304 } else if (!this.inValue && (ch == "{" || ch == "}")) {
1305 token = result(ch, "ts-operator curly-bracket");
1306
1307 } else if (!this.inValue && ch == "0" && (source.peek() == "x" || source.peek() == "X")) {
1308 token = readHexNumber();
1309
1310 } else if (!this.inValue && isDigit(ch)) {
1311 token = readNumber();
1312
1313 } else if (!this.inValue && ch == "/") {
1314 next = source.peek();
1315
1316 if (next == "*") {
1317 token = readMultilineComment.call(this, ch);
1318
1319 } else if (next == "/") {
1320 token = nextUntilUnescaped(null) || result("comment", "ts-comment");
1321
1322 } else if (this.regexp) {
1323 token = readRegexp();
1324
1325 } else {
1326 token = nextWhile(isOperatorChar) || result("operator", "ts-operator");
1327 }
1328
1329 } else if (!this.inValue && ch == "#") {
1330 token = nextUntilUnescaped(null) || result("comment", "ts-comment");
1331
1332 } else if (!this.inValue && isOperatorChar(ch)) {
1333 token = nextWhile(isOperatorChar) || result("operator", "ts-operator");
1334
1335 } else {
1336 token = readWord();
1337 if (this.inValue) {
1338 token.style += ' ts-value';
1339 }
1340 }
1341
1342 // JavaScript's syntax rules for when a slash might be the start
1343 // of a regexp and when it is just a division operator are kind
1344 // of non-obvious. This decides, based on the current token,
1345 // whether the next token could be a regular expression.
1346 if (token.style != "whitespace" && token != "comment") {
1347 this.regexp = token.type == "operator" || token.type == "keyword c" || token.type.match(/[\[{}\(,;:]/);
1348 }
1349 return token;
1350 }
1351
1352 // Wrap it in an iterator. The state (regexp and inComment) is
1353 // exposed because a parser will need to save it when making a
1354 // copy of its state.
1355 return {
1356 next: next,
1357 regexp: true,
1358 inComment: false,
1359 inValue: false
1360 };
1361 }
1362 } ();
1363 /* Tokenizer for TypoScript code
1364 *
1365 * based on tokenizejavascript.js by Marijn Haverbeke
1366 */
1367
1368 // List of "reserved" word in typoscript and a css-class
1369 var typoscriptWords = {
1370 '_CSS_DEFAULT_STYLE': 'keyword',
1371 '_DEFAULT_PI_VARS': 'keyword',
1372 '_GIFBUILDER': 'keyword',
1373 '_LOCAL_LANG': 'keyword',
1374 'CARRAY': 'keyword',
1375 'CASE': 'keyword',
1376 'CLEARGIF': 'keyword',
1377 'COA': 'keyword',
1378 'COA_INT': 'keyword',
1379 'COBJ_ARRAY': 'keyword',
1380 'COLUMNS': 'keyword',
1381 'CONFIG': 'keyword',
1382 'CONSTANTS': 'keyword',
1383 'CONTENT': 'keyword',
1384 'CTABLE': 'keyword',
1385 'CType': 'keyword',
1386 'DB': 'keyword',
1387 'DOCUMENT_BODY': 'keyword',
1388 'EDITPANEL': 'keyword',
1389 'EFFECT': 'keyword',
1390 'FE_DATA': 'keyword',
1391 'FE_TABLE': 'keyword',
1392 'FEData': 'keyword',
1393 'FILE': 'keyword',
1394 'FORM': 'keyword',
1395 'FRAME': 'keyword',
1396 'FRAMESET': 'keyword',
1397 'GIFBUILDER': 'keyword',
1398 'global': 'keyword',
1399 'globalString': 'keyword',
1400 'globalVar': 'keyword',
1401 'GMENU': 'keyword',
1402 'GMENU_FOLDOUT': 'keyword',
1403 'GMENU_LAYERS': 'keyword',
1404 'GP': 'keyword',
1405 'HMENU': 'keyword',
1406 'HRULER': 'keyword',
1407 'HTML': 'keyword',
1408 'IENV': 'keyword',
1409 'IMAGE': 'keyword',
1410 'IMG_RESOURCE': 'keyword',
1411 'IMGMENU': 'keyword',
1412 'IMGMENUITEM': 'keyword',
1413 'IMGTEXT': 'keyword',
1414 'INCLUDE_TYPOSCRIPT': 'keyword',
1415 'includeLibs': 'keyword',
1416 'JSMENU': 'keyword',
1417 'JSMENUITEM': 'keyword',
1418 'LIT': 'keyword',
1419 'LOAD_REGISTER': 'keyword',
1420 'META': 'keyword',
1421 'MULTIMEDIA': 'keyword',
1422 'OTABLE': 'keyword',
1423 'PAGE': 'keyword',
1424 'PAGE_TARGET': 'keyword',
1425 'PAGE_TSCONFIG_ID': 'keyword',
1426 'PAGE_TSCONFIG_IDLIST': 'keyword',
1427 'PAGE_TSCONFIG_STR': 'keyword',
1428 'PHP_SCRIPT': 'keyword',
1429 'PHP_SCRIPT_EXT': 'keyword',
1430 'PHP_SCRIPT_INT': 'keyword',
1431 'RECORDS': 'keyword',
1432 'REMOTE_ADDR': 'keyword',
1433 'RESTORE_REGISTER': 'keyword',
1434 'RTE': 'keyword',
1435 'SEARCHRESULT': 'keyword',
1436 'SHARED': 'keyword',
1437 'TCAdefaults': 'keyword',
1438 'TCEFORM': 'keyword',
1439 'TCEMAIN': 'keyword',
1440 'TEMPLATE': 'keyword',
1441 'TEXT': 'keyword',
1442 'TMENU': 'keyword',
1443 'TMENU_LAYERS': 'keyword',
1444 'TMENUITEM': 'keyword',
1445 'TSFE': 'keyword',
1446 'USER': 'keyword',
1447 'USER_INT': 'keyword',
1448
1449 'userFunc': 'keyword',
1450
1451 '_offset': 'reserved',
1452 'absRefPrefix': 'reserved',
1453 'accessibility': 'reserved',
1454 'accessKey': 'reserved',
1455 'addAttributes': 'reserved',
1456 'addExtUrlsAndShortCuts': 'reserved',
1457 'addItems': 'reserved',
1458 'additionalHeaders': 'reserved',
1459 'additionalParams': 'reserved',
1460 'addParams': 'reserved',
1461 'addQueryString': 'reserved',
1462 'adjustItemsH': 'reserved',
1463 'adjustSubItemsH': 'reserved',
1464 'adminPanelStyles': 'reserved',
1465 'after': 'reserved',
1466 'afterImg': 'reserved',
1467 'afterImgLink': 'reserved',
1468 'afterImgTagParams': 'reserved',
1469 'afterROImg': 'reserved',
1470 'afterWrap': 'reserved',
1471 'age': 'reserved',
1472 'alertPopups': 'reserved',
1473 'align': 'reserved',
1474 'allow': 'reserved',
1475 'allowCaching': 'reserved',
1476 'allowedAttribs': 'reserved',
1477 'allowedClasses': 'reserved',
1478 'allowedCols': 'reserved',
1479 'allowEdit': 'reserved',
1480 'allowedNewTables': 'reserved',
1481 'allowNew': 'reserved',
1482 'allowTags': 'reserved',
1483 'allowTVlisting': 'reserved',
1484 'allSaveFunctions': 'reserved',
1485 'allStdWrap': 'reserved',
1486 'allWrap': 'reserved',
1487 'alternateBgColors': 'reserved',
1488 'alternativeSortingField': 'reserved',
1489 'alternativeTempPath': 'reserved',
1490 'altImgResource': 'reserved',
1491 'altLabels': 'reserved',
1492 'altTarget': 'reserved',
1493 'altText': 'reserved',
1494 'altUrl': 'reserved',
1495 'altUrl_noDefaultParams': 'reserved',
1496 'altWrap': 'reserved',
1497 'always': 'reserved',
1498 'alwaysActivePIDlist': 'reserved',
1499 'alwaysLink': 'reserved',
1500 'alwaysShowClickMenuInTopFrame': 'reserved',
1501 'andWhere': 'reserved',
1502 'angle': 'reserved',
1503 'antiAlias': 'reserved',
1504 'append': 'reserved',
1505 'applyTotalH': 'reserved',
1506 'applyTotalW': 'reserved',
1507 'archive': 'reserved',
1508 'archiveTypoLink': 'reserved',
1509 'arrayReturnMode': 'reserved',
1510 'arrowACT': 'reserved',
1511 'arrowImgParams': 'reserved',
1512 'arrowNO': 'reserved',
1513 'ATagAfterWrap': 'reserved',
1514 'ATagBeforeWrap': 'reserved',
1515 'ATagParams': 'reserved',
1516 'ATagTitle': 'reserved',
1517 'attribute': 'reserved',
1518 'autoInsertPID': 'reserved',
1519 'autoLevels': 'reserved',
1520 'autonumber': 'reserved',
1521 'backColor': 'reserved',
1522 'background': 'reserved',
1523 'badMess': 'reserved',
1524 'baseURL': 'reserved',
1525 'before': 'reserved',
1526 'beforeImg': 'reserved',
1527 'beforeImgLink': 'reserved',
1528 'beforeImgTagParams': 'reserved',
1529 'beforeROImg': 'reserved',
1530 'beforeWrap': 'reserved',
1531 'begin': 'reserved',
1532 'beLoginLinkIPList': 'reserved',
1533 'beLoginLinkIPList_login': 'reserved',
1534 'beLoginLinkIPList_logout': 'reserved',
1535 'bgCol': 'reserved',
1536 'bgImg': 'reserved',
1537 'blankStrEqFalse': 'reserved',
1538 'blur': 'reserved',
1539 'bm': 'reserved',
1540 'bodyTag': 'reserved',
1541 'bodyTagAdd': 'reserved',
1542 'bodyTagCObject': 'reserved',
1543 'bodyTagMargins': 'reserved',
1544 'bodytext': 'reserved',
1545 'border': 'reserved',
1546 'borderCol': 'reserved',
1547 'bordersWithin': 'reserved',
1548 'borderThick': 'reserved',
1549 'bottomBackColor': 'reserved',
1550 'bottomContent': 'reserved',
1551 'bottomHeight': 'reserved',
1552 'bottomImg': 'reserved',
1553 'bottomImg_mask': 'reserved',
1554 'br': 'reserved',
1555 'brTag': 'reserved',
1556 'bullet': 'reserved',
1557 'bulletlist': 'reserved',
1558 'bytes': 'reserved',
1559 'cache_clearAtMidnight': 'reserved',
1560 'cache_period': 'reserved',
1561 'caption': 'reserved',
1562 'caption_stdWrap': 'reserved',
1563 'captionAlign': 'reserved',
1564 'captionHeader': 'reserved',
1565 'captionSplit': 'reserved',
1566 'case': 'reserved',
1567 'casesensitiveComp': 'reserved',
1568 'cellpadding': 'reserved',
1569 'cellspacing': 'reserved',
1570 'centerImgACT': 'reserved',
1571 'centerImgCUR': 'reserved',
1572 'centerImgNO': 'reserved',
1573 'centerLeftImgACT': 'reserved',
1574 'centerLeftImgCUR': 'reserved',
1575 'centerLeftImgNO': 'reserved',
1576 'centerRightImgACT': 'reserved',
1577 'centerRightImgCUR': 'reserved',
1578 'centerRightImgNO': 'reserved',
1579 'char': 'reserved',
1580 'charcoal': 'reserved',
1581 'charMapConfig': 'reserved',
1582 'check': 'reserved',
1583 'class': 'reserved',
1584 'classesAnchor': 'reserved',
1585 'classesCharacter': 'reserved',
1586 'classesImage': 'reserved',
1587 'classesParagraph': 'reserved',
1588 'classicPageEditMode': 'reserved',
1589 'clear': 'reserved',
1590 'clearCache': 'reserved',
1591 'clearCache_disable': 'reserved',
1592 'clearCache_pageGrandParent': 'reserved',
1593 'clearCache_pageSiblingChildren': 'reserved',
1594 'clearCacheCmd': 'reserved',
1595 'clearCacheLevels': 'reserved',
1596 'clearCacheOfPages': 'reserved',
1597 'clickMenuTimeOut': 'reserved',
1598 'clickTitleMode': 'reserved',
1599 'clipboardNumberPads': 'reserved',
1600 'cMargins': 'reserved',
1601 'cObjNum': 'reserved',
1602 'collapse': 'reserved',
1603 'color': 'reserved',
1604 'color1': 'reserved',
1605 'color2': 'reserved',
1606 'color3': 'reserved',
1607 'color4': 'reserved',
1608 'colors': 'reserved',
1609 'colour': 'reserved',
1610 'colPos_list': 'reserved',
1611 'colRelations': 'reserved',
1612 'cols': 'reserved',
1613 'colSpace': 'reserved',
1614 'comment_auto': 'reserved',
1615 'commentWrap': 'reserved',
1616 'compensateFieldWidth': 'reserved',
1617 'compX': 'reserved',
1618 'compY': 'reserved',
1619 'condensedMode': 'reserved',
1620 'conf': 'reserved',
1621 'constants': 'reserved',
1622 'content_from_pid_allowOutsideDomain': 'reserved',
1623 'contextMenu': 'reserved',
1624 'copyLevels': 'reserved',
1625 'count_HMENU_MENUOBJ': 'reserved',
1626 'count_menuItems': 'reserved',
1627 'count_MENUOBJ': 'reserved',
1628 'create': 'reserved',
1629 'createFoldersInEB': 'reserved',
1630 'crop': 'reserved',
1631 'csConv': 'reserved',
1632 'CSS_inlineStyle': 'reserved',
1633 'current': 'reserved',
1634 'curUid': 'reserved',
1635 'cWidth': 'reserved',
1636 'data': 'reserved',
1637 'dataWrap': 'reserved',
1638 'date': 'reserved',
1639 'date_stdWrap': 'reserved',
1640 'datePrefix': 'reserved',
1641 'debug': 'reserved',
1642 'debugData': 'reserved',
1643 'debugFunc': 'reserved',
1644 'debugItemConf': 'reserved',
1645 'debugRenumberedObject': 'reserved',
1646 'default': 'reserved',
1647 'defaultAlign': 'reserved',
1648 'defaultCmd': 'reserved',
1649 'defaultFileUploads': 'reserved',
1650 'defaultHeaderType': 'reserved',
1651 'defaultOutput': 'reserved',
1652 'defaults': 'reserved',
1653 'defaultType': 'reserved',
1654 'delete': 'reserved',
1655 'denyTags': 'reserved',
1656 'depth': 'reserved',
1657 'DESC': 'reserved',
1658 'dimensions': 'reserved',
1659 'directionLeft': 'reserved',
1660 'directionUp': 'reserved',
1661 'disableAdvanced': 'reserved',
1662 'disableAllHeaderCode': 'reserved',
1663 'disableAltText': 'reserved',
1664 'disableBigButtons': 'reserved',
1665 'disableCacheSelector': 'reserved',
1666 'disableCharsetHeader': 'reserved',
1667 'disabled': 'reserved',
1668 'disableDelete': 'reserved',
1669 'disableDocModuleInAB': 'reserved',
1670 'disableDocSelector': 'reserved',
1671 'disableHideAtCopy': 'reserved',
1672 'disableIconLinkToContextmenu': 'reserved',
1673 'disableItems': 'reserved',
1674 'disableNewContentElementWizard': 'reserved',
1675 'disableNoMatchingValueElement': 'reserved',
1676 'disablePageExternalUrl': 'reserved',
1677 'disablePrefixComment': 'reserved',
1678 'disablePrependAtCopy': 'reserved',
1679 'disableSearchBox': 'reserved',
1680 'disablePageInformation': 'reserved',
1681 'disableSingleTableView': 'reserved',
1682 'disableTabInTextarea': 'reserved',
1683 'displayActiveOnLoad': 'reserved',
1684 'displayContent': 'reserved',
1685 'displayFieldIcons': 'reserved',
1686 'displayIcons': 'reserved',
1687 'displayMessages': 'reserved',
1688 'displayQueries': 'reserved',
1689 'displayRecord': 'reserved',
1690 'displayTimes': 'reserved',
1691 'distributeX': 'reserved',
1692 'distributeY': 'reserved',
1693 'DIV': 'reserved',
1694 'doctype': 'reserved',
1695 'doctypeSwitch': 'reserved',
1696 'doktype': 'reserved',
1697 'doNotLinkIt': 'reserved',
1698 'doNotShowLink': 'reserved',
1699 'doNotStripHTML': 'reserved',
1700 'dontCheckPid': 'reserved',
1701 'dontFollowMouse': 'reserved',
1702 'dontHideOnMouseUp': 'reserved',
1703 'dontLinkIfSubmenu': 'reserved',
1704 'dontShowPalettesOnFocusInAB': 'reserved',
1705 'dontWrapInTable': 'reserved',
1706 'doubleBrTag': 'reserved',
1707 'doublePostCheck': 'reserved',
1708 'dWorkArea': 'reserved',
1709 'edge': 'reserved',
1710 'edit_docModuleUplaod': 'reserved',
1711 'edit_docModuleUpload': 'reserved',
1712 'edit_RTE': 'reserved',
1713 'edit_showFieldHelp': 'reserved',
1714 'edit_wideDocument': 'reserved',
1715 'editFieldsAtATime': 'reserved',
1716 'editFormsOnPage': 'reserved',
1717 'editIcons': 'reserved',
1718 'editNoPopup': 'reserved',
1719 'editPanel': 'reserved',
1720 'elements': 'reserved',
1721 'emailMeAtLogin': 'reserved',
1722 'emailMess': 'reserved',
1723 'emboss': 'reserved',
1724 'enable': 'reserved',
1725 'encapsLines': 'reserved',
1726 'encapsLinesStdWrap': 'reserved',
1727 'encapsTagList': 'reserved',
1728 'entryLevel': 'reserved',
1729 'equalH': 'reserved',
1730 'everybody': 'reserved',
1731 'excludeDoktypes': 'reserved',
1732 'excludeUidList': 'reserved',
1733 'expAll': 'reserved',
1734 'expand': 'reserved',
1735 'explode': 'reserved',
1736 'ext': 'reserved',
1737 'externalBlocks': 'reserved',
1738 'extTarget': 'reserved',
1739 'face': 'reserved',
1740 'fe_adminLib': 'reserved',
1741 'field': 'reserved',
1742 'fieldOrder': 'reserved',
1743 'fieldRequired': 'reserved',
1744 'fields': 'reserved',
1745 'fieldWrap': 'reserved',
1746 'file': 'reserved',
1747 'file1': 'reserved',
1748 'file2': 'reserved',
1749 'file3': 'reserved',
1750 'file4': 'reserved',
1751 'file5': 'reserved',
1752 'filelink': 'reserved',
1753 'filelist': 'reserved',
1754 'firstLabel': 'reserved',
1755 'firstLabelGeneral': 'reserved',
1756 'fixAttrib': 'reserved',
1757 'flip': 'reserved',
1758 'flop': 'reserved',
1759 'foldSpeed': 'reserved',
1760 'foldTimer': 'reserved',
1761 'fontColor': 'reserved',
1762 'fontFile': 'reserved',
1763 'fontOffset': 'reserved',
1764 'fontSize': 'reserved',
1765 'fontSizeMultiplicator': 'reserved',
1766 'fontTag': 'reserved',
1767 'forceDisplayFieldIcons': 'reserved',
1768 'forceDisplayIcons': 'reserved',
1769 'forceNoPopup': 'reserved',
1770 'forceTemplateParsing': 'reserved',
1771 'forceTypeValue': 'reserved',
1772 'format': 'reserved',
1773 'frame': 'reserved',
1774 'frameReloadIfNotInFrameset': 'reserved',
1775 'frameSet': 'reserved',
1776 'freezeMouseover': 'reserved',
1777 'ftu': 'reserved',
1778 'function': 'reserved',
1779 'gamma': 'reserved',
1780 'gapBgCol': 'reserved',
1781 'gapLineCol': 'reserved',
1782 'gapLineThickness': 'reserved',
1783 'gapWidth': 'reserved',
1784 'get': 'reserved',
1785 'getBorder': 'reserved',
1786 'getLeft': 'reserved',
1787 'getRight': 'reserved',
1788 'globalNesting': 'reserved',
1789 'goodMess': 'reserved',
1790 'gray': 'reserved',
1791 'group': 'reserved',
1792 'groupBy': 'reserved',
1793 'groupid': 'reserved',
1794 'header': 'reserved',
1795 'header_layout': 'reserved',
1796 'headerComment': 'reserved',
1797 'headerData': 'reserved',
1798 'headerSpace': 'reserved',
1799 'headTag': 'reserved',
1800 'height': 'reserved',
1801 'helpText': 'reserved',
1802 'hidden': 'reserved',
1803 'hiddenFields': 'reserved',
1804 'hide': 'reserved',
1805 'hideButCreateMap': 'reserved',
1806 'hideMenuTimer': 'reserved',
1807 'hideMenuWhenNotOver': 'reserved',
1808 'hidePStyleItems': 'reserved',
1809 'hideRecords': 'reserved',
1810 'hideSubmoduleIcons': 'reserved',
1811 'highColor': 'reserved',
1812 'history': 'reserved',
1813 'hover': 'reserved',
1814 'hoverStyle': 'reserved',
1815 'HTMLparser': 'reserved',
1816 'HTMLparser_tags': 'reserved',
1817 'htmlSpecialChars': 'reserved',
1818 'htmlTag_dir': 'reserved',
1819 'htmlTag_langKey': 'reserved',
1820 'htmlTag_setParams': 'reserved',
1821 'http': 'reserved',
1822 'icon': 'reserved',
1823 'icon_image_ext_list': 'reserved',
1824 'icon_link': 'reserved',
1825 'iconCObject': 'reserved',
1826 'ifEmpty': 'reserved',
1827 'image': 'reserved',
1828 'image_compression': 'reserved',
1829 'image_effects': 'reserved',
1830 'image_frames': 'reserved',
1831 'imageLinkWrap': 'reserved',
1832 'imagePath': 'reserved',
1833 'images': 'reserved',
1834 'imageWrapIfAny': 'reserved',
1835 'imgList': 'reserved',
1836 'imgMap': 'reserved',
1837 'imgMapExtras': 'reserved',
1838 'imgMax': 'reserved',
1839 'imgNameNotRandom': 'reserved',
1840 'imgNamePrefix': 'reserved',
1841 'imgObjNum': 'reserved',
1842 'imgParams': 'reserved',
1843 'imgPath': 'reserved',
1844 'imgStart': 'reserved',
1845 'import': 'reserved',
1846 'inc': 'reserved',
1847 'includeCSS': 'reserved',
1848 'includeLibrary': 'reserved',
1849 'includeNotInMenu': 'reserved',
1850 'incT3Lib_htmlmail': 'reserved',
1851 'index': 'reserved',
1852 'index_descrLgd': 'reserved',
1853 'index_enable': 'reserved',
1854 'index_externals': 'reserved',
1855 'inlineStyle2TempFile': 'reserved',
1856 'innerStdWrap': 'reserved',
1857 'innerStdWrap_all': 'reserved',
1858 'innerWrap': 'reserved',
1859 'innerWrap2': 'reserved',
1860 'input': 'reserved',
1861 'inputLevels': 'reserved',
1862 'insertClassesFromRTE': 'reserved',
1863 'insertData': 'reserved',
1864 'insertDmailerBoundaries': 'reserved',
1865 'intensity': 'reserved',
1866 'intTarget': 'reserved',
1867 'intval': 'reserved',
1868 'invert': 'reserved',
1869 'IProcFunc': 'reserved',
1870 'itemArrayProcFunc': 'reserved',
1871 'itemH': 'reserved',
1872 'items': 'reserved',
1873 'itemsProcFunc': 'reserved',
1874 'iterations': 'reserved',
1875 'join': 'reserved',
1876 'JSWindow': 'reserved',
1877 'JSwindow_params': 'reserved',
1878 'jumpurl': 'reserved',
1879 'jumpUrl': 'reserved',
1880 'jumpurl_enable': 'reserved',
1881 'jumpurl_mailto_disable': 'reserved',
1882 'jumpUrl_transferSession': 'reserved',
1883 'keep': 'reserved',
1884 'keepEntries': 'reserved',
1885 'keepNonMatchedTags': 'reserved',
1886 'key': 'reserved',
1887 'label': 'reserved',
1888 'labelStdWrap': 'reserved',
1889 'labelWrap': 'reserved',
1890 'lang': 'reserved',
1891 'language': 'reserved',
1892 'language_alt': 'reserved',
1893 'languageField': 'reserved',
1894 'layer_menu_id': 'reserved',
1895 'layerStyle': 'reserved',
1896 'left': 'reserved',
1897 'leftIcons': 'reserved',
1898 'leftImgACT': 'reserved',
1899 'leftImgCUR': 'reserved',
1900 'leftImgNO': 'reserved',
1901 'leftjoin': 'reserved',
1902 'leftOffset': 'reserved',
1903 'levels': 'reserved',
1904 'leveluid': 'reserved',
1905 'limit': 'reserved',
1906 'line': 'reserved',
1907 'lineColor': 'reserved',
1908 'lineThickness': 'reserved',
1909 'linkPrefix': 'reserved',
1910 'linkTitleToSelf': 'reserved',
1911 'linkVars': 'reserved',
1912 'linkWrap': 'reserved',
1913 'listNum': 'reserved',
1914 'listOnlyInSingleTableView': 'reserved',
1915 'lm': 'reserved',
1916 'locale_all': 'reserved',
1917 'localNesting': 'reserved',
1918 'locationData': 'reserved',
1919 'lockFilePath': 'reserved',
1920 'lockPosition': 'reserved',
1921 'lockPosition_addSelf': 'reserved',
1922 'lockPosition_adjust': 'reserved',
1923 'lockToIP': 'reserved',
1924 'longdescURL': 'reserved',
1925 'lowColor': 'reserved',
1926 'lower': 'reserved',
1927 'LR': 'reserved',
1928 'mailto': 'reserved',
1929 'main': 'reserved',
1930 'mainScript': 'reserved',
1931 'makelinks': 'reserved',
1932 'markerWrap': 'reserved',
1933 'mask': 'reserved',
1934 'max': 'reserved',
1935 'maxAge': 'reserved',
1936 'maxAgeDays': 'reserved',
1937 'maxChars': 'reserved',
1938 'maxH': 'reserved',
1939 'maxHeight': 'reserved',
1940 'maxItems': 'reserved',
1941 'maxW': 'reserved',
1942 'maxWidth': 'reserved',
1943 'maxWInText': 'reserved',
1944 'mayNotCreateEditShortcuts': 'reserved',
1945 'menu_type': 'reserved',
1946 'menuBackColor': 'reserved',
1947 'menuHeight': 'reserved',
1948 'menuName': 'reserved',
1949 'menuOffset': 'reserved',
1950 'menuWidth': 'reserved',
1951 'message_page_is_being_generated': 'reserved',
1952 'message_preview': 'reserved',
1953 'meta': 'reserved',
1954 'metaCharset': 'reserved',
1955 'method': 'reserved',
1956 'min': 'reserved',
1957 'minH': 'reserved',
1958 'minItems': 'reserved',
1959 'minW': 'reserved',
1960 'mode': 'reserved',
1961 'moduleMenuCollapsable': 'reserved',
1962 'MP_defaults': 'reserved',
1963 'MP_disableTypolinkClosestMPvalue': 'reserved',
1964 'MP_mapRootPoints': 'reserved',
1965 'name': 'reserved',
1966 'navFrameResizable': 'reserved',
1967 'navFrameWidth': 'reserved',
1968 'nesting': 'reserved',
1969 'netprintApplicationLink': 'reserved',
1970 'neverHideAtCopy': 'reserved',
1971 'newPageWiz': 'reserved',
1972 'newRecordFromTable': 'reserved',
1973 'newWindow': 'reserved',
1974 'newWizards': 'reserved',
1975 'next': 'reserved',
1976 'niceText': 'reserved',
1977 'nicetext': 'reserved',
1978 'no_cache': 'reserved',
1979 'no_search': 'reserved',
1980 'noAttrib': 'reserved',
1981 'noBlur': 'reserved',
1982 'noCache': 'reserved',
1983 'noCols': 'reserved',
1984 'noCreateRecordsLink': 'reserved',
1985 'noLink': 'reserved',
1986 'noLinkUnderline': 'reserved',
1987 'noMatchingValue_label': 'reserved',
1988 'noMenuMode': 'reserved',
1989 'nonCachedSubst': 'reserved',
1990 'nonTypoTagStdWrap': 'reserved',
1991 'nonTypoTagUserFunc': 'reserved',
1992 'nonWrappedTag': 'reserved',
1993 'noOrderBy': 'reserved',
1994 'noPageTitle': 'reserved',
1995 'noRows': 'reserved',
1996 'noScaleUp': 'reserved',
1997 'noStretchAndMarginCells': 'reserved',
1998 'noThumbsInEB': 'reserved',
1999 'noThumbsInRTEimageSelect': 'reserved',
2000 'notification_email_charset': 'reserved',
2001 'notification_email_encoding': 'reserved',
2002 'notification_email_urlmode': 'reserved',
2003 'noTrimWrap': 'reserved',
2004 'noValueInsert': 'reserved',
2005 'obj': 'reserved',
2006 'offset': 'reserved',
2007 'offsetWrap': 'reserved',
2008 'onlineWorkspaceInfo': 'reserved',
2009 'onlyCurrentPid': 'reserved',
2010 'opacity': 'reserved',
2011 'orderBy': 'reserved',
2012 'outerWrap': 'reserved',
2013 'outline': 'reserved',
2014 'outputLevels': 'reserved',
2015 'override': 'reserved',
2016 'overrideAttribs': 'reserved',
2017 'overrideEdit': 'reserved',
2018 'overrideId': 'reserved',
2019 'overridePageModule': 'reserved',
2020 'overrideWithExtension': 'reserved',
2021 'pageFrameObj': 'reserved',
2022 'pageGenScript': 'reserved',
2023 'pageTitleFirst': 'reserved',
2024 'parameter': 'reserved',
2025 'params': 'reserved',
2026 'parseFunc': 'reserved',
2027 'parser': 'reserved',
2028 'password': 'reserved',
2029 'path': 'reserved',
2030 'permissions': 'reserved',
2031 'pid_list': 'reserved',
2032 'pidInList': 'reserved',
2033 'pixelSpaceFontSizeRef': 'reserved',
2034 'plaintextLib': 'reserved',
2035 'plainTextStdWrap': 'reserved',
2036 'postCObject': 'reserved',
2037 'postLineBlanks': 'reserved',
2038 'postLineChar': 'reserved',
2039 'postLineLen': 'reserved',
2040 'postUserFunc': 'reserved',
2041 'postUserFuncInt': 'reserved',
2042 'preBlanks': 'reserved',
2043 'preCObject': 'reserved',
2044 'prefix': 'reserved',
2045 'prefixComment': 'reserved',
2046 'prefixLocalAnchors': 'reserved',
2047 'prefixRelPathWith': 'reserved',
2048 'preIfEmptyListNum': 'reserved',
2049 'preLineBlanks': 'reserved',
2050 'preLineChar': 'reserved',
2051 'preLineLen': 'reserved',
2052 'prepend': 'reserved',
2053 'preserveEntities': 'reserved',
2054 'preUserFunc': 'reserved',
2055 'prev': 'reserved',
2056 'previewBorder': 'reserved',
2057 'prevnextToSection': 'reserved',
2058 'printheader': 'reserved',
2059 'prioriCalc': 'reserved',
2060 'proc': 'reserved',
2061 'processScript': 'reserved',
2062 'properties': 'reserved',
2063 'protect': 'reserved',
2064 'protectLvar': 'reserved',
2065 'publish_levels': 'reserved',
2066 'QEisDefault': 'reserved',
2067 'quality': 'reserved',
2068 'radio': 'reserved',
2069 'radioWrap': 'reserved',
2070 'range': 'reserved',
2071 'rawUrlEncode': 'reserved',
2072 'recipient': 'reserved',
2073 'recursive': 'reserved',
2074 'recursiveDelete': 'reserved',
2075 'redirect': 'reserved',
2076 'redirectToURL': 'reserved',
2077 'reduceColors': 'reserved',
2078 'register': 'reserved',
2079 'relativeToParentLayer': 'reserved',
2080 'relativeToTriggerItem': 'reserved',
2081 'relPathPrefix': 'reserved',
2082 'remap': 'reserved',
2083 'remapTag': 'reserved',
2084 'removeBadHTML': 'reserved',
2085 'removeDefaultJS': 'reserved',
2086 'removeIfEquals': 'reserved',
2087 'removeIfFalse': 'reserved',
2088 'removeItems': 'reserved',
2089 'removeObjectsOfDummy': 'reserved',
2090 'removePrependedNumbers': 'reserved',
2091 'removeTags': 'reserved',
2092 'removeWrapping': 'reserved',
2093 'renderCharset': 'reserved',
2094 'renderWrap': 'reserved',
2095 'reset': 'reserved',
2096 'resources': 'reserved',
2097 'resultObj': 'reserved',
2098 'returnLast': 'reserved',
2099 'returnUrl': 'reserved',
2100 'rightImgACT': 'reserved',
2101 'rightImgCUR': 'reserved',
2102 'rightImgNO': 'reserved',
2103 'rightjoin': 'reserved',
2104 'rm': 'reserved',
2105 'rmTagIfNoAttrib': 'reserved',
2106 'RO_chBgColor': 'reserved',
2107 'rotate': 'reserved',
2108 'rows': 'reserved',
2109 'rowSpace': 'reserved',
2110 'RTEfullScreenWidth': 'reserved',
2111 'rules': 'reserved',
2112 'sample': 'reserved',
2113 'saveClipboard': 'reserved',
2114 'saveDocNew': 'reserved',
2115 'secondRow': 'reserved',
2116 'section': 'reserved',
2117 'sectionIndex': 'reserved',
2118 'select': 'reserved',
2119 'select_key': 'reserved',
2120 'selectFields': 'reserved',
2121 'separator': 'reserved',
2122 'set': 'reserved',
2123 'setContentToCurrent': 'reserved',
2124 'setCurrent': 'reserved',
2125 'setfixed': 'reserved',
2126 'setFixedHeight': 'reserved',
2127 'setFixedWidth': 'reserved',
2128 'setJS_mouseOver': 'reserved',
2129 'setJS_openPic': 'reserved',
2130 'setOnly': 'reserved',
2131 'shadow': 'reserved',
2132 'sharpen': 'reserved',
2133 'shear': 'reserved',
2134 'short': 'reserved',
2135 'shortcut': 'reserved',
2136 'shortcut_onEditId_dontSetPageTree': 'reserved',
2137 'shortcut_onEditId_keepExistingExpanded': 'reserved',
2138 'shortcutFrame': 'reserved',
2139 'shortcutGroups': 'reserved',
2140 'shortcutIcon': 'reserved',
2141 'show': 'reserved',
2142 'showAccessRestrictedPages': 'reserved',
2143 'showActive': 'reserved',
2144 'showClipControlPanelsDespiteOfCMlayers': 'reserved',
2145 'showFirst': 'reserved',
2146 'showHiddenPages': 'reserved',
2147 'showHiddenRecords': 'reserved',
2148 'showHistory': 'reserved',
2149 'showPageIdWithTitle': 'reserved',
2150 'showTagFreeClasses': 'reserved',
2151 'simulateDate': 'reserved',
2152 'simulateUserGroup': 'reserved',
2153 'singlePid': 'reserved',
2154 'site_author': 'reserved',
2155 'site_reserved': 'reserved',
2156 'sitetitle': 'reserved',
2157 'siteUrl': 'reserved',
2158 'size': 'reserved',
2159 'smallFormFields': 'reserved',
2160 'solarize': 'reserved',
2161 'sorting': 'reserved',
2162 'source': 'reserved',
2163 'space': 'reserved',
2164 'spaceAfter': 'reserved',
2165 'spaceBefore': 'reserved',
2166 'spaceBelowAbove': 'reserved',
2167 'spaceLeft': 'reserved',
2168 'spaceRight': 'reserved',
2169 'spacing': 'reserved',
2170 'spamProtectEmailAddresses': 'reserved',
2171 'spamProtectEmailAddresses_atSubst': 'reserved',
2172 'spamProtectEmailAddresses_lastDotSubst': 'reserved',
2173 'special': 'reserved',
2174 'splitChar': 'reserved',
2175 'splitRendering': 'reserved',
2176 'src': 'reserved',
2177 'startInTaskCenter': 'reserved',
2178 'stayFolded': 'reserved',
2179 'stdheader': 'reserved',
2180 'stdWrap': 'reserved',
2181 'stdWrap2': 'reserved',
2182 'strftime': 'reserved',
2183 'stripHtml': 'reserved',
2184 'styles': 'reserved',
2185 'stylesheet': 'reserved',
2186 'submenuObjSuffixes': 'reserved',
2187 'subMenuOffset': 'reserved',
2188 'submit': 'reserved',
2189 'subst_elementUid': 'reserved',
2190 'substMarksSeparately': 'reserved',
2191 'substring': 'reserved',
2192 'swirl': 'reserved',
2193 'sword': 'reserved',
2194 'sword_noMixedCase': 'reserved',
2195 'SWORD_PARAMS': 'reserved',
2196 'sword_standAlone': 'reserved',
2197 'sys_language_mode': 'reserved',
2198 'sys_language_overlay': 'reserved',
2199 'sys_language_softMergeIfNotBlank': 'reserved',
2200 'sys_language_uid': 'reserved',
2201 'table': 'reserved',
2202 'tableCellColor': 'reserved',
2203 'tableParams': 'reserved',
2204 'tables': 'reserved',
2205 'tableStdWrap': 'reserved',
2206 'tableStyle': 'reserved',
2207 'tableWidth': 'reserved',
2208 'tags': 'reserved',
2209 'target': 'reserved',
2210 'TDparams': 'reserved',
2211 'templateContent': 'reserved',
2212 'templateFile': 'reserved',
2213 'text': 'reserved',
2214 'textarea': 'reserved',
2215 'textMargin': 'reserved',
2216 'textMargin_outOfText': 'reserved',
2217 'textMaxLength': 'reserved',
2218 'textObjNum': 'reserved',
2219 'textPos': 'reserved',
2220 'textStyle': 'reserved',
2221 'thickness': 'reserved',
2222 'thumbnailsByDefault': 'reserved',
2223 'tile': 'reserved',
2224 'time_stdWrap': 'reserved',
2225 'tipafriendLib': 'reserved',
2226 'title': 'reserved',
2227 'titleLen': 'reserved',
2228 'titleTagFunction': 'reserved',
2229 'titleText': 'reserved',
2230 'tm': 'reserved',
2231 'token': 'reserved',
2232 'topOffset': 'reserved',
2233 'totalWidth': 'reserved',
2234 'transparentBackground': 'reserved',
2235 'transparentColor': 'reserved',
2236 'trim': 'reserved',
2237 'tsdebug_tree': 'reserved',
2238 'type': 'reserved',
2239 'typeNum': 'reserved',
2240 'types': 'reserved',
2241 'typolinkCheckRootline': 'reserved',
2242 'uidInList': 'reserved',
2243 'unset': 'reserved',
2244 'uploadFieldsInTopOfEB': 'reserved',
2245 'uploads': 'reserved',
2246 'upper': 'reserved',
2247 'useCacheHash': 'reserved',
2248 'useLargestItemX': 'reserved',
2249 'useLargestItemY': 'reserved',
2250 'user': 'reserved',
2251 'userdefined': 'reserved',
2252 'userfunction': 'reserved',
2253 'userid': 'reserved',
2254 'userIdColumn': 'reserved',
2255 'USERNAME_substToken': 'reserved',
2256 'userProc': 'reserved',
2257 'value': 'reserved',
2258 'valueArray': 'reserved',
2259 'wave': 'reserved',
2260 'where': 'reserved',
2261 'width': 'reserved',
2262 'wiz': 'reserved',
2263 'wordSpacing': 'reserved',
2264 'workArea': 'reserved',
2265 'wrap': 'reserved',
2266 'wrap1': 'reserved',
2267 'wrap2': 'reserved',
2268 'wrap3': 'reserved',
2269 'wrapAfterTags': 'reserved',
2270 'wrapAlign': 'reserved',
2271 'wrapFieldName': 'reserved',
2272 'wrapItemAndSub': 'reserved',
2273 'wrapNonWrappedLines': 'reserved',
2274 'wraps': 'reserved',
2275 'xhtml_cleaning': 'reserved',
2276 'xmlprologue': 'reserved',
2277 'xPosOffset': 'reserved',
2278 'yPosOffset': 'reserved',
2279
2280 'admPanel': 'keyword2',
2281 'alt_print': 'keyword2',
2282 'auth': 'keyword2',
2283 'browser': 'keyword2',
2284 'cache': 'keyword2',
2285 'CHECK': 'keyword2',
2286 'cObj': 'keyword2',
2287 'cObject': 'keyword2',
2288 'COMMENT': 'keyword2',
2289 'config': 'keyword2',
2290 'content': 'keyword2',
2291 'copy': 'keyword2',
2292 'CSS_inlineStyle': 'keyword2',
2293 'cut': 'keyword2',
2294 'dataArray': 'keyword2',
2295 'dayofmonth': 'keyword2',
2296 'dayofweek': 'keyword2',
2297 'db_list': 'keyword2',
2298 'device': 'keyword2',
2299 'dynCSS': 'keyword2',
2300 'edit': 'keyword2',
2301 'edit_access': 'keyword2',
2302 'edit_pageheader': 'keyword2',
2303 'folder': 'keyword2',
2304 'folderTree': 'keyword2',
2305 'foldoutMenu': 'keyword2',
2306 'Functions': 'keyword2',
2307 'gmenu_foldout': 'keyword2',
2308 'gmenu_layers': 'keyword2',
2309 'hostname': 'keyword2',
2310 'hour': 'keyword2',
2311 'imgList': 'keyword2',
2312 'imgResource': 'keyword2',
2313 'imgText': 'keyword2',
2314 'info': 'keyword2',
2315 'IP': 'keyword2',
2316 'jsmenu': 'keyword2',
2317 'JSwindow': 'keyword2',
2318 'LABEL': 'keyword2',
2319 'layout': 'keyword2',
2320 'lib': 'keyword2',
2321 'loginUser': 'keyword2',
2322 'marks': 'keyword2',
2323 'minute': 'keyword2',
2324 'mod': 'keyword2',
2325 'module': 'keyword2',
2326 'month': 'keyword2',
2327 'move_wizard': 'keyword2',
2328 'new': 'keyword2',
2329 'new_wizard': 'keyword2',
2330 'noResultObj': 'keyword2',
2331 'numRows': 'keyword2',
2332 'options': 'keyword2',
2333 'page': 'keyword2',
2334 'pageTree': 'keyword2',
2335 'paste': 'keyword2',
2336 'perms': 'keyword2',
2337 'PIDinRootline': 'keyword2',
2338 'PIDupinRootline': 'keyword2',
2339 'plugin': 'keyword2',
2340 'postform': 'keyword2',
2341 'postform_newThread': 'keyword2',
2342 'preview': 'keyword2',
2343 'publish': 'keyword2',
2344 'RADIO': 'keyword2',
2345 'renderObj': 'keyword2',
2346 'REQ': 'keyword2',
2347 'RTE': 'keyword2',
2348 'RTE_compliant': 'keyword2',
2349 'select': 'keyword2',
2350 'setup': 'keyword2',
2351 'split': 'keyword2',
2352 'stat': 'keyword2',
2353 'stat_apache': 'keyword2',
2354 'stat_apache_logfile': 'keyword2',
2355 'stat_apache_noHost': 'keyword2',
2356 'stat_apache_notExtended': 'keyword2',
2357 'stat_apache_pagenames': 'keyword2',
2358 'stat_excludeBEuserHits': 'keyword2',
2359 'stat_excludeIPList': 'keyword2',
2360 'stat_mysql': 'keyword2',
2361 'stat_titleLen': 'keyword2',
2362 'stat_typeNumList': 'keyword2',
2363 'stdWrap': 'keyword2',
2364 'subparts': 'keyword2',
2365 'system': 'keyword2',
2366 'temp': 'keyword2',
2367 'template': 'keyword2',
2368 'treeLevel': 'keyword2',
2369 'tsdebug': 'keyword2',
2370 'typolink': 'keyword2',
2371 'url': 'keyword2',
2372 'useragent': 'keyword2',
2373 'userFunc': 'keyword2',
2374 'version': 'keyword2',
2375 'view': 'keyword2',
2376 'workOnSubpart': 'keyword2',
2377
2378 'ACT': 'keyword3',
2379 'ACTIFSUB': 'keyword3',
2380 'ACTIFSUBRO': 'keyword',
2381 'ACTRO': 'keyword3',
2382 'all': 'keyword3',
2383 'arrowACT': 'keyword3',
2384 'arrowNO': 'keyword3',
2385 'ascii': 'keyword3',
2386 'atLeast': 'keyword3',
2387 'atMost': 'keyword3',
2388 'BE': 'keyword3',
2389 'be_groups': 'keyword3',
2390 'be_users': 'keyword3',
2391 'BOX': 'keyword3',
2392 'browse': 'keyword3',
2393 'bullets': 'keyword3',
2394 'CUR': 'keyword3',
2395 'CURIFSUB': 'keyword3',
2396 'CURIFSUBRO': 'keyword3',
2397 'CURRO': 'keyword3',
2398 'default': 'keyword3',
2399 'description': 'keyword3',
2400 'directory': 'keyword3',
2401 'directReturn': 'keyword3',
2402 'div': 'keyword3',
2403 'else': 'keyword3',
2404 'email': 'keyword3',
2405 'end': 'keyword3',
2406 'equals': 'keyword3',
2407 'external': 'keyword3',
2408 'false': 'keyword3',
2409 'FE': 'keyword3',
2410 'fe_groups': 'keyword3',
2411 'fe_users': 'keyword3',
2412 'feadmin': 'keyword3',
2413 'header': 'keyword3',
2414 'html': 'keyword3',
2415 'id': 'keyword3',
2416 'if': 'keyword3',
2417 'ifEmpty': 'keyword3',
2418 'IFSUB': 'keyword3',
2419 'IFSUBRO': 'keyword3',
2420 'image': 'keyword3',
2421 'inBranch': 'keyword3',
2422 'isFalse': 'keyword3',
2423 'isGreaterThan': 'keyword3',
2424 'isInList': 'keyword3',
2425 'isLessThan': 'keyword3',
2426 'isPositive': 'keyword3',
2427 'isTrue': 'keyword3',
2428 'keyword3': 'keyword3',
2429 'language': 'keyword3',
2430 'leveltitle': 'keyword3',
2431 'list': 'keyword3',
2432 'login': 'keyword3',
2433 'mailform': 'keyword3',
2434 'media': 'keyword3',
2435 'menu': 'keyword3',
2436 'mod': 'keyword3',
2437 'multimedia': 'keyword3',
2438 'negate': 'keyword3',
2439 'NEW': 'keyword3',
2440 'NO': 'keyword3',
2441 'none': 'keyword3',
2442 'pages': 'keyword3',
2443 'pages_language_overlay': 'keyword3',
2444 'parseFunc_RTE': 'keyword3',
2445 'pid': 'keyword3',
2446 'required': 'keyword3',
2447 'RO': 'keyword3',
2448 'rootline': 'keyword3',
2449 'script': 'keyword3',
2450 'search': 'keyword3',
2451 'shortcut': 'keyword3',
2452 'sitemap': 'keyword3',
2453 'SPC': 'keyword3',
2454 'splash': 'keyword3',
2455 'sys_dmail': 'keyword3',
2456 'sys_domain': 'keyword3',
2457 'sys_filemounts': 'keyword3',
2458 'sys_note': 'keyword3',
2459 'sys_template': 'keyword3',
2460 'tabel': 'keyword3',
2461 'text': 'keyword3',
2462 'textpic': 'keyword3',
2463 'this': 'keyword3',
2464 'top': 'keyword3',
2465 'true': 'keyword3',
2466 'twice': 'keyword3',
2467 'uid': 'keyword3',
2468 'uniqueGlobal': 'keyword3',
2469 'uniqueLocal': 'keyword3',
2470 'unsetEmpty': 'keyword3',
2471 'updated': 'keyword3',
2472 'uploads': 'keyword3',
2473 'us': 'keyword3',
2474 'user_task': 'keyword3',
2475 'USERDEF1': 'keyword3',
2476 'USERDEF1RO': 'keyword3',
2477 'USERDEF2': 'keyword3',
2478 'USERDEF2RO': 'keyword3',
2479 'usergroup': 'keyword3',
2480 'USR': 'keyword3',
2481 'USRRO': 'keyword3',
2482 'web_func': 'keyword3',
2483 'web_info': 'keyword3',
2484 'web_layout': 'keyword3',
2485 'web_list': 'keyword3',
2486 'web_ts': 'keyword',
2487 'xhtml_strict': 'keyword3',
2488 'xhtml_trans': 'keyword3',
2489 'XY': 'keyword3',
2490 'ypMenu': 'keyword3'
2491 }
2492
2493 var tokenizeTypoScript = function() {
2494
2495 // Some helper regexp matchers.
2496 var isOperatorChar = matcher(/[\+\-\*\&\%\/=<>!\?]/);
2497 var isDigit = matcher(/[0-9]/);
2498 var isHexDigit = matcher(/[0-9A-Fa-f]/);
2499 var isWordChar = matcher(/[\w\$_]/);
2500
2501 function isWhiteSpace(ch) {
2502 // Unfortunately, IE's regexp matcher thinks non-breaking spaces
2503 // aren't whitespace. Also, in our scheme newlines are no
2504 // whitespace (they are another special case).
2505 return ch != "\n" && (ch == nbsp || /\s/.test(ch));
2506 }
2507
2508 // This function produces a MochiKit-style iterator that tokenizes
2509 // the output of the given stringstream (see stringstream.js).
2510 // Tokens are objects with a type, style, and value property. The
2511 // value contains the textual content of the token. Because this may
2512 // include trailing whitespace (for efficiency reasons), some
2513 // tokens, such a variable names, also have a name property
2514 // containing their actual textual value.
2515 return function(source) {
2516 // Produce a value to return. Automatically skips and includes any
2517 // whitespace. The base argument is prepended to the value
2518 // property and assigned to the name property -- this is used when
2519 // the caller has already extracted the text from the stream
2520 // himself.
2521 function result(type, style, base) {
2522 // nextWhile(isWhiteSpace); - comment thats line because needed for autocomplete
2523 var value = {
2524 type: type,
2525 style: style,
2526 value: (base ? base + source.get() : source.get())
2527 };
2528 if (base) {
2529 value.name = base;
2530 }
2531 return value;
2532 }
2533
2534 // Advance the text stream over characters for which test returns
2535 // true. (The characters that are 'consumed' like this can later
2536 // be retrieved by calling source.get()).
2537 function nextWhile(test) {
2538 var next;
2539 while ((next = source.peek()) && test(next)) {
2540 source.next();
2541 }
2542 }
2543
2544 // Advance the stream until the given character (not preceded by a
2545 // backslash) is encountered (or a newline is found).
2546 function nextUntilUnescaped(end) {
2547 var escaped = false;
2548 var next;
2549 while ((next = source.peek()) && next != "\n") {
2550 source.next();
2551 if (next == end && !escaped) {
2552 break;
2553 }
2554 escaped = next == "\\";
2555 }
2556 }
2557
2558 function readHexNumber() {
2559 source.next();
2560 // skip the 'x'
2561 nextWhile(isHexDigit);
2562 return result("number", "atom");
2563 }
2564
2565 function readNumber() {
2566 nextWhile(isDigit);
2567 return result("number", "atom");
2568 }
2569
2570 // Read a word, look it up in keywords. If not found, it is a
2571 // variable, otherwise it is a keyword of the type found.
2572 function readWord() {
2573 nextWhile(isWordChar);
2574 var word = source.get();
2575 var known = typoscriptWords.hasOwnProperty(word) && {
2576 type: 'keyword',
2577 style: typoscriptWords[word]
2578 };
2579 return known ?
2580 result(known.type, known.style, word) :
2581 result("variable", "other", word);
2582 }
2583
2584 function readRegexp() {
2585 nextUntilUnescaped("/");
2586 nextWhile(matcher(/[gi]/));
2587 return result("regexp", "string");
2588 }
2589
2590 // Mutli-line comments are tricky. We want to return the newlines
2591 // embedded in them as regular newline tokens, and then continue
2592 // returning a comment token for every line of the comment. So
2593 // some state has to be saved (inComment) to indicate whether we
2594 // are inside a /* */ sequence.
2595 function readMultilineComment(start) {
2596 this.inComment = true;
2597 var maybeEnd = (start == "*");
2598 while (true) {
2599 var next = source.peek();
2600 if (next == "\n") {
2601 break;
2602 }
2603 source.next();
2604 if (next == "/" && maybeEnd) {
2605 this.inComment = false;
2606 break;
2607 }
2608 maybeEnd = (next == "*");
2609 }
2610
2611 return result("comment", "ts-comment");
2612 }
2613
2614 // Fetch the next token. Dispatches on first character in the
2615 // stream, or first two characters when the first is a slash. The
2616 // || things are a silly trick to keep simple cases on a single
2617 // line.
2618 function next() {
2619 var token = null;
2620 var ch = source.next();
2621 if (ch == "\n") {
2622 token = {
2623 type: "newline",
2624 style: "whitespace",
2625 value: source.get()
2626 };
2627 this.inValue = false;
2628
2629 } else if (!this.inValue && this.inComment) {
2630 token = readMultilineComment.call(this, ch);
2631
2632 /*
2633 } else if (this.inValue) {
2634 token = nextUntilUnescaped(null) || {
2635 type: "value",
2636 style: "ts-value",
2637 value: source.get()
2638 };
2639 this.inValue = false;
2640 */
2641
2642 } else if (isWhiteSpace(ch)) {
2643 token = nextWhile(isWhiteSpace) || result("whitespace", "whitespace");
2644
2645 } else if (!this.inValue && (ch == "\"" || ch == "'")) {
2646 token = nextUntilUnescaped(ch) || result("string", "string");
2647
2648 } else if (
2649 ( ch == "<" ||
2650 ch == ">" ||
2651 ( ch == "="
2652 && source.peek() != "<"
2653 )
2654 )
2655 && source.peek() != "\n" ) { // there must be some value behind the operator!
2656 this.inValue = true;
2657 token = result(ch, "ts-operator");
2658
2659 } else if (!this.inValue && ch == "[") {
2660 token = nextUntilUnescaped("]") || result("condition", "ts-condition");
2661
2662 // with punctuation, the type of the token is the symbol itself
2663 } else if (!this.inValue && /[\[\]\(\),;\:\.\<\>\=]/.test(ch)) {
2664 token = result(ch, "ts-operator");
2665
2666 } else if (!this.inValue && (ch == "{" || ch == "}")) {
2667 token = result(ch, "ts-operator curly-bracket");
2668
2669 } else if (!this.inValue && ch == "0" && (source.peek() == "x" || source.peek() == "X")) {
2670 token = readHexNumber();
2671
2672 } else if (!this.inValue && isDigit(ch)) {
2673 token = readNumber();
2674
2675 } else if (!this.inValue && ch == "/") {
2676 next = source.peek();
2677
2678 if (next == "*") {
2679 token = readMultilineComment.call(this, ch);
2680
2681 } else if (next == "/") {
2682 token = nextUntilUnescaped(null) || result("comment", "ts-comment");
2683
2684 } else if (this.regexp) {
2685 token = readRegexp();
2686
2687 } else {
2688 token = nextWhile(isOperatorChar) || result("operator", "ts-operator");
2689 }
2690
2691 } else if (!this.inValue && ch == "#") {
2692 token = nextUntilUnescaped(null) || result("comment", "ts-comment");
2693
2694 } else if (!this.inValue && isOperatorChar(ch)) {
2695 token = nextWhile(isOperatorChar) || result("operator", "ts-operator");
2696
2697 } else {
2698 token = readWord();
2699 if (this.inValue) {
2700 token.style += ' ts-value';
2701 }
2702 }
2703
2704 // JavaScript's syntax rules for when a slash might be the start
2705 // of a regexp and when it is just a division operator are kind
2706 // of non-obvious. This decides, based on the current token,
2707 // whether the next token could be a regular expression.
2708 if (token.style != "whitespace" && token != "comment") {
2709 this.regexp = token.type == "operator" || token.type == "keyword c" || token.type.match(/[\[{}\(,;:]/);
2710 }
2711 return token;
2712 }
2713
2714 // Wrap it in an iterator. The state (regexp and inComment) is
2715 // exposed because a parser will need to save it when making a
2716 // copy of its state.
2717 return {
2718 next: next,
2719 regexp: true,
2720 inComment: false,
2721 inValue: false
2722 };
2723 }
2724 } ();