Lines Matching refs:language_data

200         unset($language_data);
247 if(!isset($language_data)) {
248 report_error(TYPE_ERROR, 'Language file does not contain a $language_data structure to check!');
249 } else if (!is_array($language_data)) {
250 report_error(TYPE_ERROR, 'Language file contains a $language_data structure which is not an array!');
255 if(!isset($language_data['LANG_NAME'])) {
256 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'LANG_NAME\'] specification!');
257 } else if (!is_string($language_data['LANG_NAME'])) {
258 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'LANG_NAME\'] specification which is not a string!');
261 if(!isset($language_data['COMMENT_SINGLE'])) {
262 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_SIGNLE\'] structure to check!');
263 } else if (!is_array($language_data['COMMENT_SINGLE'])) {
264 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_SINGLE\'] structure which is not an array!');
267 if(!isset($language_data['COMMENT_MULTI'])) {
268 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_MULTI\'] structure to check!');
269 } else if (!is_array($language_data['COMMENT_MULTI'])) {
270 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_MULTI\'] structure which is not an array!');
273 if(isset($language_data['COMMENT_REGEXP'])) {
274 if (!is_array($language_data['COMMENT_REGEXP'])) {
275 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_REGEXP\'] structure which is not an array!');
279 if(!isset($language_data['QUOTEMARKS'])) {
280 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'QUOTEMARKS\'] structure to check!');
281 } else if (!is_array($language_data['QUOTEMARKS'])) {
282 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'QUOTEMARKS\'] structure which is not an array!');
285 if(isset($language_data['HARDQUOTE'])) {
286 if (!is_array($language_data['HARDQUOTE'])) {
287 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HARDQUOTE\'] structure which is not an array!');
291 if(!isset($language_data['ESCAPE_CHAR'])) {
292 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'ESCAPE_CHAR\'] specification to check!');
293 } else if (!is_string($language_data['ESCAPE_CHAR'])) {
294 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification which is not a string!');
295 } else if (1 < strlen($language_data['ESCAPE_CHAR'])) {
296 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification is not empty or exactly one char!');
299 if(!isset($language_data['CASE_KEYWORDS'])) {
300 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_KEYWORDS\'] specification!');
301 } else if (!is_int($language_data['CASE_KEYWORDS'])) {
302 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is not an integer!');
303 } else if (GESHI_CAPS_NO_CHANGE != $language_data['CASE_KEYWORDS'] &&
304 GESHI_CAPS_LOWER != $language_data['CASE_KEYWORDS'] &&
305 GESHI_CAPS_UPPER != $language_data['CASE_KEYWORDS']) {
306 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is neither of GESHI_CAPS_NO_CHANGE, GESHI_CAPS_LOWER nor GESHI_CAPS_UPPER!');
309 if(!isset($language_data['KEYWORDS'])) {
310 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'KEYWORDS\'] structure to check!');
311 } else if (!is_array($language_data['KEYWORDS'])) {
312 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'KEYWORDS\'] structure which is not an array!');
314 foreach($language_data['KEYWORDS'] as $kw_key => $kw_value) {
316 report_error(TYPE_WARNING, "Language file contains an key '$kw_key' in \$language_data['KEYWORDS'] that is not integer!");
318 report_error(TYPE_ERROR, "Language file contains a \$language_data['CASE_SENSITIVE']['$kw_value'] structure which is not an array!");
323 if(!isset($language_data['SYMBOLS'])) {
324 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SYMBOLS\'] structure to check!');
325 } else if (!is_array($language_data['SYMBOLS'])) {
326 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SYMBOLS\'] structure which is not an array!');
329 if(!isset($language_data['CASE_SENSITIVE'])) {
330 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_SENSITIVE\'] structure to check!');
331 } else if (!is_array($language_data['CASE_SENSITIVE'])) {
332 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_SENSITIVE\'] structure which is not an array!');
334 foreach($language_data['CASE_SENSITIVE'] as $cs_key => $cs_value) {
336 report_error(TYPE_WARNING, "Language file contains an key '$cs_key' in \$language_data['CASE_SENSITIVE'] that is not integer!");
338 report_error(TYPE_ERROR, "Language file contains a Case Sensitivity specification for \$language_data['CASE_SENSITIVE']['$cs_value'] which is not a boolean!");
343 if(!isset($language_data['URLS'])) {
344 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'URLS\'] structure to check!');
345 } else if (!is_array($language_data['URLS'])) {
346 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'URLS\'] structure which is not an array!');
348 foreach($language_data['URLS'] as $url_key => $url_value) {
350 report_error(TYPE_WARNING, "Language file contains an key '$url_key' in \$language_data['URLS'] that is not integer!");
352 report_error(TYPE_ERROR, "Language file contains a Documentation URL specification for \$language_data['URLS']['$url_value'] which is not a string!");
354 report_error(TYPE_ERROR, "Language file contains unescaped ampersands (&amp;) in \$language_data['URLS']!");
359 if(!isset($language_data['OOLANG'])) {
360 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OOLANG\'] specification!');
361 } else if (!is_int($language_data['OOLANG']) && !is_bool($language_data['OOLANG'])) {
362 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither boolean nor integer!');
363 } else if (false !== $language_data['OOLANG'] &&
364 true !== $language_data['OOLANG'] &&
365 2 !== $language_data['OOLANG']) {
366 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither of false, true or 2!');
369 if(!isset($language_data['OBJECT_SPLITTERS'])) {
370 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OBJECT_SPLITTERS\'] structure to check!');
371 } else if (!is_array($language_data['OBJECT_SPLITTERS'])) {
372 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OBJECT_SPLITTERS\'] structure which is not an array!');
375 if(!isset($language_data['REGEXPS'])) {
376 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'REGEXPS\'] structure to check!');
377 } else if (!is_array($language_data['REGEXPS'])) {
378 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'REGEXPS\'] structure which is not an array!');
381 if(!isset($language_data['STRICT_MODE_APPLIES'])) {
382 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STRICT_MODE_APPLIES\'] specification!');
383 } else if (!is_int($language_data['STRICT_MODE_APPLIES'])) {
384 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is not an integer!');
385 } else if (GESHI_MAYBE != $language_data['STRICT_MODE_APPLIES'] &&
386 GESHI_ALWAYS != $language_data['STRICT_MODE_APPLIES'] &&
387 GESHI_NEVER != $language_data['STRICT_MODE_APPLIES']) {
388 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is neither of GESHI_MAYBE, GESHI_ALWAYS nor GESHI_NEVER!');
391 if(!isset($language_data['SCRIPT_DELIMITERS'])) {
392 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SCRIPT_DELIMITERS\'] structure to check!');
393 } else if (!is_array($language_data['SCRIPT_DELIMITERS'])) {
394 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SCRIPT_DELIMITERS\'] structure which is not an array!');
397 if(!isset($language_data['HIGHLIGHT_STRICT_BLOCK'])) {
398 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure to check!');
399 } else if (!is_array($language_data['HIGHLIGHT_STRICT_BLOCK'])) {
400 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure which is not an array!');
403 if(isset($language_data['TAB_WIDTH'])) {
404 if (!is_int($language_data['TAB_WIDTH'])) {
405 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is not an integer!');
406 } else if (1 > $language_data['TAB_WIDTH']) {
407 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is less than 1!');
411 if(isset($language_data['PARSER_CONTROL'])) {
412 if (!is_array($language_data['PARSER_CONTROL'])) {
413 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'PARSER_CONTROL\'] structure which is not an array!');
417 if(!isset($language_data['STYLES'])) {
418 report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STYLES\'] structure to check!');
419 } else if (!is_array($language_data['STYLES'])) {
420 report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STYLES\'] structure which is not an array!');
426 if(!isset($language_data['STYLES'][$style_kind])) {
427 report_error(TYPE_ERROR, "Language file contains no \$language_data['STYLES']['$style_kind'] structure to check!");
428 } else if (!is_array($language_data['STYLES'][$style_kind])) {
429 report_error(TYPE_ERROR, "Language file contains a \$language_data['STYLES\']['$style_kind'] structure which is not an array!");
431 foreach($language_data['STYLES'][$style_kind] as $sk_key => $sk_value) {
434 report_error(TYPE_WARNING, "Language file contains an key '$sk_key' in \$language_data['STYLES']['$style_kind'] that is not integer!");
436 report_error(TYPE_WARNING, "Language file contains a CSS specification for \$language_data['STYLES']['$style_kind'][$key] which is not a string!");
448 foreach($language_data['KEYWORDS'] as $key => $keywords) {
449 if(!isset($language_data['CASE_SENSITIVE'][$key])) {
450 report_error(TYPE_ERROR, "Language file contains no \$language_data['CASE_SENSITIVE'] specification for keyword group $key!");
452 if(!isset($language_data['URLS'][$key])) {
453 report_error(TYPE_ERROR, "Language file contains no \$language_data['URLS'] specification for keyword group $key!");
456 report_error(TYPE_WARNING, "Language file contains an empty keyword list in \$language_data['KEYWORDS'] for group $key!");
460 report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['KEYWORDS'][$key][$id]!");
462 report_error(TYPE_ERROR, "Language file contains an empty string entry at \$language_data['KEYWORDS'][$key][$id]!");
464 report_error(TYPE_NOTICE, "Language file contains an keyword ('$kw') at \$language_data['KEYWORDS'][$key][$id] which seems to be better suited for the symbols section!");
471 report_error(TYPE_WARNING, "Language file contains per-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key]!");
480 foreach($language_data['KEYWORDS'] as $key => $keywords) {
481 foreach($language_data['KEYWORDS'] as $key2 => $keywords2) {
487 if(isset($language_data['PARSER_CONTROL']['KEYWORDS'])) {
493 if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) {
494 $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'];
495 $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'];
497 if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) {
498 $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'];
499 $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'];
502 if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE'])) {
503 $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE'];
505 if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER'])) {
506 $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER'];
509 if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE'])) {
510 $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE'];
512 if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER'])) {
513 $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER'];
520 report_error(TYPE_WARNING, "Language file contains cross-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key] and \$language_data['KEYWORDS'][$key2]!");
524 foreach($language_data['CASE_SENSITIVE'] as $key => $keywords) {
525 if(!isset($language_data['KEYWORDS'][$key]) && $key != GESHI_COMMENTS) {
526 report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['CASE_SENSITIVE'] specification for non-existing keyword group $key!");
529 foreach($language_data['URLS'] as $key => $keywords) {
530 if(!isset($language_data['KEYWORDS'][$key])) {
531 report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['URLS'] specification for non-existing keyword group $key!");
534 foreach($language_data['STYLES']['KEYWORDS'] as $key => $keywords) {
535 if(!isset($language_data['KEYWORDS'][$key])) {
536 report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['STYLES']['KEYWORDS'] specification for non-existing keyword group $key!");
540 foreach($language_data['COMMENT_SINGLE'] as $ck => $cv) {
542 report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_SINGLE'] that is not integer!");
545 report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_SINGLE'][$ck]!");
547 if(!isset($language_data['STYLES']['COMMENTS'][$ck])) {
548 report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!");
551 if(isset($language_data['COMMENT_REGEXP'])) {
552 foreach($language_data['COMMENT_REGEXP'] as $ck => $cv) {
554 report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_REGEXP'] that is not integer!");
557 report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_REGEXP'][$ck]!");
559 if(!isset($language_data['STYLES']['COMMENTS'][$ck])) {
560 report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!");
564 foreach($language_data['STYLES']['COMMENTS'] as $ck => $cv) {
565 if($ck != 'MULTI' && !isset($language_data['COMMENT_SINGLE'][$ck]) &&
566 !isset($language_data['COMMENT_REGEXP'][$ck])) {
567 report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['COMMENTS'] specification for Single Line or Regular-Expression Comment key $ck!");
570 if (isset($language_data['STYLES']['STRINGS']['HARD'])) {
571 if (empty($language_data['HARDQUOTE'])) {
572 report_error(TYPE_NOTICE, "Language file contains superfluous \$language_data['STYLES']['STRINGS'] specification for key 'HARD', but no 'HARDQUOTE's are defined!");
574 unset($language_data['STYLES']['STRINGS']['HARD']);
576 foreach($language_data['STYLES']['STRINGS'] as $sk => $sv) {
577 if($sk && !isset($language_data['QUOTEMARKS'][$sk])) {
578 report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['STRINGS'] specification for non-existing quotemark key $sk!");
582 foreach($language_data['REGEXPS'] as $rk => $rv) {
584 report_error(TYPE_WARNING, "Language file contains an key '$rk' in \$language_data['REGEXPS'] that is not integer!");
589 report_error(TYPE_WARNING, "Language file contains an empty regular expression at \$language_data['REGEXPS'][$rk]!");
592 report_error(TYPE_WARNING, "Language file contains a regular expression with an unmasked / character at \$language_data['REGEXPS'][$rk]!");
594 report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '&lt;PIPE&gt;' instead at \$language_data['REGEXPS'][$rk]!");
599 report_error(TYPE_ERROR, "Language file contains no GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk]!");
601 report_error(TYPE_ERROR, "Language file contains a GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!");
604 report_error(TYPE_WARNING, "Language file contains a regular expression with an unmasked / character at \$language_data['REGEXPS'][$rk]!");
606 report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '&lt;PIPE&gt;' instead at \$language_data['REGEXPS'][$rk]!");
610 report_error(TYPE_WARNING, "Language file contains no GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!");
612 report_error(TYPE_ERROR, "Language file contains a GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!");
615 report_error(TYPE_WARNING, "Language file contains no GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk]!");
617 report_error(TYPE_ERROR, "Language file contains a GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!");
620 report_error(TYPE_WARNING, "Language file contains no GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!");
622 report_error(TYPE_ERROR, "Language file contains a GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!");
625 report_error(TYPE_WARNING, "Language file contains no GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk]!");
627 report_error(TYPE_ERROR, "Language file contains a GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!");
630 report_error(TYPE_WARNING, "Language file contains an non-string and non-array entry at \$language_data['REGEXPS'][$rk]!");
632 if(!isset($language_data['STYLES']['REGEXPS'][$rk])) {
633 report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['REGEXPS'] specification for regexp group $rk!");
636 foreach($language_data['STYLES']['REGEXPS'] as $rk => $rv) {
637 if(!isset($language_data['REGEXPS'][$rk])) {
638 report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['REGEXPS'] specification for regexp key $rk!");