GeSHi


Globals


Global Summary
final int

GESHI_ACTIVE

Links in the source in the :active state

final int

GESHI_AFTER

The key of the regex array defining what bracket group in a matched search to put after the replacement

final int

GESHI_ALWAYS

Strict mode always applies

final int

GESHI_BEFORE

The key of the regex array defining what bracket group in a matched search to put before the replacement

final int

GESHI_CAPS_LOWER

Leave keywords found as the case that they are

final int

GESHI_CAPS_NO_CHANGE

Lowercase keywords found

final int

GESHI_CAPS_UPPER

Uppercase keywords found

final int

GESHI_CLASS

The key of the regex array defining a custom keyword to use for this regexp's html tag class

final int

GESHI_COMMENTS

Used in language files to mark comments

final str

GESHI_END_IMPORTANT

The ender for important parts of the source

final int

GESHI_ERROR_FILE_NOT_READABLE

GeSHi could not open a file for reading (generally a language file)

final int

GESHI_ERROR_INVALID_HEADER_TYPE

The header type passed to {@link GeSHi->set_header_type()} was invalid

final int

GESHI_ERROR_INVALID_LINE_NUMBER_TYPE

The line number type passed to {@link GeSHi->enable_line_numbers()} was invalid

final int

GESHI_ERROR_NO_INPUT

No sourcecode to highlight was specified

final int

GESHI_ERROR_NO_SUCH_LANG

The language specified does not exist

final int

GESHI_FANCY_LINE_NUMBERS

Use fancy line numbers when building the result

final int

GESHI_HEADER_DIV

Use a "div" to surround the source

final int

GESHI_HEADER_NONE

Use nothing to surround the source

final int

GESHI_HEADER_PRE

Use a "pre" to surround the source

final int

GESHI_HEADER_PRE_TABLE

Use a "table" to surround the source: $header $linenumbers$code> $footer this is essentially only a workaround for Firefox, see sf#1651996 or take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=365805

final int

GESHI_HEADER_PRE_VALID

Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.

final int

GESHI_HOVER

Links in the source in the :hover state

final mixed

GESHI_LANG_ROOT

The language file directory for GeSHi @access private

final int

GESHI_LINK

Links in the source in the :link state

final int

GESHI_MAX_PCRE_LENGTH

it's also important not to generate too long regular expressions be generous here...

final int

GESHI_MAX_PCRE_SUBPATTERNS

some old PHP / PCRE subpatterns only support up to xxx subpatterns in regular expressions.

final int

GESHI_MAYBE

Strict mode *might* apply, and can be enabled or disabled by {@link GeSHi->enable_strict_mode()}

final int

GESHI_MODIFIERS

The key of the regex array defining any modifiers to the regular expression

final int

GESHI_NORMAL_LINE_NUMBERS

Use normal line numbers when building the result

final int

GESHI_NO_LINE_NUMBERS

Use no line numbers when building the result

final int

GESHI_NUMBER_BIN_PREFIX_0B

Number format to highlight binary numbers with a prefix 0b (C)

final int

GESHI_NUMBER_BIN_PREFIX_PERCENT

Number format to highlight binary numbers with a prefix %

final int

GESHI_NUMBER_BIN_SUFFIX

Number format to highlight binary numbers with a suffix "b"

final int

GESHI_NUMBER_FLT_NONSCI

Number format to highlight floating-point numbers without support for scientific notation

final int

GESHI_NUMBER_FLT_NONSCI_F

Number format to highlight floating-point numbers without support for scientific notation

final int

GESHI_NUMBER_FLT_SCI_SHORT

Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero

final int

GESHI_NUMBER_FLT_SCI_ZERO

Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit

final int

GESHI_NUMBER_HEX_PREFIX

Number format to highlight hex numbers with a prefix 0x

final int

GESHI_NUMBER_HEX_SUFFIX

Number format to highlight hex numbers with a suffix of h

final int

GESHI_NUMBER_INT_BASIC

Basic number format for integers

final int

GESHI_NUMBER_INT_CSTYLE

Enhanced number format for integers like seen in C

final int

GESHI_NUMBER_OCT_PREFIX

Number format to highlight octal numbers with a leading zero

final int

GESHI_NUMBER_OCT_SUFFIX

Number format to highlight octal numbers with a suffix of o

final mixed

GESHI_PHP_PRE_433

Used to work around missing PHP features

final int

GESHI_REPLACE

The key of the regex array defining what bracket group in a matched search to use as a replacement

final mixed

GESHI_ROOT

The root directory for GeSHi

final int

GESHI_SEARCH

The key of the regex array defining what to search for

final mixed

GESHI_SECURITY_PARANOID

Tells GeSHi to be paranoid about security settings

final str

GESHI_START_IMPORTANT

The starter for important parts of the source

final str

GESHI_VERSION

The version of this GeSHi file

final int

GESHI_VISITED

Links in the source in the :visited state

mixed

language_data

abap.php -------- Author: Andres Picazo (andres@andrespicazo.com) Contributors: - Sandra Rossi (sandra.rossi@gmail.com) - Jacob Laursen (jlu@kmd.dk) Copyright: (c) 2007 Andres Picazo Release Version: 1.0.8.3 Date Started: 2004/06/04ABAP language file for GeSHi.

Global Detail

geshi.php at line 107

GESHI_ACTIVE

public final int GESHI_ACTIVE = 2

Links in the source in the :active state


geshi.php at line 144

GESHI_AFTER

public final int GESHI_AFTER = 4

The key of the regex array defining what bracket group in a matched search to put after the replacement


geshi.php at line 129

GESHI_ALWAYS

public final int GESHI_ALWAYS = 2

Strict mode always applies


geshi.php at line 141

GESHI_BEFORE

public final int GESHI_BEFORE = 3

The key of the regex array defining what bracket group in a matched search to put before the replacement


geshi.php at line 99

GESHI_CAPS_LOWER

public final int GESHI_CAPS_LOWER = 2

Leave keywords found as the case that they are


geshi.php at line 95

GESHI_CAPS_NO_CHANGE

public final int GESHI_CAPS_NO_CHANGE

Lowercase keywords found


geshi.php at line 97

GESHI_CAPS_UPPER

public final int GESHI_CAPS_UPPER = 1

Uppercase keywords found


geshi.php at line 147

GESHI_CLASS

public final int GESHI_CLASS = 5

The key of the regex array defining a custom keyword to use for this regexp's html tag class


geshi.php at line 150

GESHI_COMMENTS

public final int GESHI_COMMENTS

Used in language files to mark comments


geshi.php at line 117

GESHI_END_IMPORTANT

public final str GESHI_END_IMPORTANT = ''

The ender for important parts of the source


geshi.php at line 234

GESHI_ERROR_FILE_NOT_READABLE

public final int GESHI_ERROR_FILE_NOT_READABLE = 3

GeSHi could not open a file for reading (generally a language file)


geshi.php at line 236

GESHI_ERROR_INVALID_HEADER_TYPE

public final int GESHI_ERROR_INVALID_HEADER_TYPE = 4

The header type passed to GeSHi->set_header_type() was invalid


geshi.php at line 238

GESHI_ERROR_INVALID_LINE_NUMBER_TYPE

public final int GESHI_ERROR_INVALID_LINE_NUMBER_TYPE = 5

The line number type passed to GeSHi->enable_line_numbers() was invalid


geshi.php at line 230

GESHI_ERROR_NO_INPUT

public final int GESHI_ERROR_NO_INPUT = 1

No sourcecode to highlight was specified

Deprecated.

geshi.php at line 232

GESHI_ERROR_NO_SUCH_LANG

public final int GESHI_ERROR_NO_SUCH_LANG = 2

The language specified does not exist


geshi.php at line 67

GESHI_FANCY_LINE_NUMBERS

public final int GESHI_FANCY_LINE_NUMBERS = 2

Use fancy line numbers when building the result


geshi.php at line 73

GESHI_HEADER_DIV

public final int GESHI_HEADER_DIV = 1

Use a "div" to surround the source


geshi.php at line 71

GESHI_HEADER_NONE

public final int GESHI_HEADER_NONE

Use nothing to surround the source


geshi.php at line 75

GESHI_HEADER_PRE

public final int GESHI_HEADER_PRE = 2

Use a "pre" to surround the source


geshi.php at line 91

GESHI_HEADER_PRE_TABLE

public final int GESHI_HEADER_PRE_TABLE = 4

Use a "table" to surround the source:

$header
$linenumbers
$code>
$footer

this is essentially only a workaround for Firefox, see sf#1651996 or take a look at https://bugzilla.mozilla.org/show_bug.cgi?id=365805

Note:
when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE

geshi.php at line 77

GESHI_HEADER_PRE_VALID

public final int GESHI_HEADER_PRE_VALID = 3

Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.


geshi.php at line 105

GESHI_HOVER

public final int GESHI_HOVER = 1

Links in the source in the :hover state


geshi.php at line 53

GESHI_LANG_ROOT

public final mixed GESHI_LANG_ROOT = GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR

The language file directory for GeSHi @access private


geshi.php at line 103 public final int GESHI_LINK

Links in the source in the :link state


geshi.php at line 195

GESHI_MAX_PCRE_LENGTH

public final int GESHI_MAX_PCRE_LENGTH = 12288

it's also important not to generate too long regular expressions be generous here... but keep in mind, that when reaching this limit we still have to close open patterns. 12k should do just fine on a 16k limit. @see GeSHi->optimize_regexp_list()


geshi.php at line 189

GESHI_MAX_PCRE_SUBPATTERNS

public final int GESHI_MAX_PCRE_SUBPATTERNS = 500

some old PHP / PCRE subpatterns only support up to xxx subpatterns in regular expressions. Set this to false if your PCRE lib is up to date @see GeSHi->optimize_regexp_list()


geshi.php at line 127

GESHI_MAYBE

public final int GESHI_MAYBE = 1

Strict mode *might* apply, and can be enabled or disabled by GeSHi->enable_strict_mode()


geshi.php at line 138

GESHI_MODIFIERS

public final int GESHI_MODIFIERS = 2

The key of the regex array defining any modifiers to the regular expression


geshi.php at line 65

GESHI_NORMAL_LINE_NUMBERS

public final int GESHI_NORMAL_LINE_NUMBERS = 1

Use normal line numbers when building the result


geshi.php at line 63

GESHI_NO_LINE_NUMBERS

public final int GESHI_NO_LINE_NUMBERS

Use no line numbers when building the result


geshi.php at line 207

GESHI_NUMBER_BIN_PREFIX_0B

public final int GESHI_NUMBER_BIN_PREFIX_0B = 64

Number format to highlight binary numbers with a prefix 0b (C)


geshi.php at line 205

GESHI_NUMBER_BIN_PREFIX_PERCENT

public final int GESHI_NUMBER_BIN_PREFIX_PERCENT = 32

Number format to highlight binary numbers with a prefix %


geshi.php at line 203

GESHI_NUMBER_BIN_SUFFIX

public final int GESHI_NUMBER_BIN_SUFFIX = 16

Number format to highlight binary numbers with a suffix "b"


geshi.php at line 217

GESHI_NUMBER_FLT_NONSCI

public final int GESHI_NUMBER_FLT_NONSCI = 65536

Number format to highlight floating-point numbers without support for scientific notation


geshi.php at line 219

GESHI_NUMBER_FLT_NONSCI_F

public final int GESHI_NUMBER_FLT_NONSCI_F = 131072

Number format to highlight floating-point numbers without support for scientific notation


geshi.php at line 221

GESHI_NUMBER_FLT_SCI_SHORT

public final int GESHI_NUMBER_FLT_SCI_SHORT = 262144

Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero


geshi.php at line 223

GESHI_NUMBER_FLT_SCI_ZERO

public final int GESHI_NUMBER_FLT_SCI_ZERO = 524288

Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit


geshi.php at line 213

GESHI_NUMBER_HEX_PREFIX

public final int GESHI_NUMBER_HEX_PREFIX = 4096

Number format to highlight hex numbers with a prefix 0x


geshi.php at line 215

GESHI_NUMBER_HEX_SUFFIX

public final int GESHI_NUMBER_HEX_SUFFIX = 8192

Number format to highlight hex numbers with a suffix of h


geshi.php at line 199

GESHI_NUMBER_INT_BASIC

public final int GESHI_NUMBER_INT_BASIC = 1

Basic number format for integers


geshi.php at line 201

GESHI_NUMBER_INT_CSTYLE

public final int GESHI_NUMBER_INT_CSTYLE = 2

Enhanced number format for integers like seen in C


geshi.php at line 209

GESHI_NUMBER_OCT_PREFIX

public final int GESHI_NUMBER_OCT_PREFIX = 256

Number format to highlight octal numbers with a leading zero


geshi.php at line 211

GESHI_NUMBER_OCT_SUFFIX

public final int GESHI_NUMBER_OCT_SUFFIX = 512

Number format to highlight octal numbers with a suffix of o


geshi.php at line 153

GESHI_PHP_PRE_433

public final mixed GESHI_PHP_PRE_433 = !(version_compare(PHP_VERSION, '4.3.3'

Used to work around missing PHP features


geshi.php at line 136

GESHI_REPLACE

public final int GESHI_REPLACE = 1

The key of the regex array defining what bracket group in a matched search to use as a replacement


geshi.php at line 49

GESHI_ROOT

public final mixed GESHI_ROOT = dirname(__FILE__

The root directory for GeSHi


geshi.php at line 133 public final int GESHI_SEARCH

The key of the regex array defining what to search for


geshi.php at line 58

GESHI_SECURITY_PARANOID

public final mixed GESHI_SECURITY_PARANOID = false

Tells GeSHi to be paranoid about security settings


geshi.php at line 115

GESHI_START_IMPORTANT

public final str GESHI_START_IMPORTANT = ''

The starter for important parts of the source


geshi.php at line 44

GESHI_VERSION

public final str GESHI_VERSION = '1.0.8.3'

The version of this GeSHi file


geshi.php at line 109

GESHI_VISITED

public final int GESHI_VISITED = 3

Links in the source in the :visited state


geshi/abap.php at line 93

language_data

public mixed language_data = array( 'LANG_NAME' => 'ABAP'

abap.php -------- Author: Andres Picazo (andres@andrespicazo.com) Contributors: - Sandra Rossi (sandra.rossi@gmail.com) - Jacob Laursen (jlu@kmd.dk) Copyright: (c) 2007 Andres Picazo Release Version: 1.0.8.3 Date Started: 2004/06/04

ABAP language file for GeSHi.

Reference abap language documentation (abap 7.1) : http://help.sap.com/abapdocu/en/ABENABAP_INDEX.htm

ABAP syntax is highly complex, several problems could not be addressed, see TODO below if you dare ;-) Be aware that in ABAP language, keywords may be composed of several tokens, separated by one or more spaces or carriage returns (for example CONCATENATE 'hello' 'world' INTO string SEPARATED BY ' ') it's why we must decode them with REGEXPS. As there are many keywords with several tokens, I had to create a separate section in the code to simplify the reading. Be aware that some words may be highlighted several times like for "ref to data", which is first highlighted for "ref to data", then secondly for "ref to". It is very important to position "ref to" after "ref to data" otherwise "data" wouldn't be highlighted because of the previous highlight. Styles used : keywords are all displayed in upper case, and they are organized into 4 categories : 1) control statements (blue), 2) declarative statements (red-maroon), 3) other statements (blue-green), 4) keywords (violet). + GeSHi : literals (red) + symbols (green) + methods/attributes (mauve) + unchanged style for other words. Control, declarative and other statements are assigned URLs to sap documentation website: http://help.sap.com/abapdocu/en/ABAP.htm

CHANGES ------- 2009/02/25 (1.0.8.3) - Some more rework of the language file 2009/01/04 (1.0.8.2) - Major Release, more than 1000 statements and keywords added = whole abap 7.1 (Sandra Rossi) 2007/06/27 (1.0.0) - First Release

TODO ---- - in DATA data TYPE type, 2nd "data" and 2nd "type" are highlighted with data style, but should be ignored. Same problem for all words!!! This is quite impossible to solve it as we should define syntaxes of all statements (huge effort!) and use a lex or something like that instead of regexp I guess. - Some words are considered as being statement names (report, tables, etc.) though they are used as keyword in some statements. For example: FORM xxxx TABLES itab. It was arbitrary decided to define them as statement instead of keyword, because it may be useful to have the URL to SAP help for some of them. - if a comment is between 2 words of a keyword (for example SEPARATED "comment \n BY), it is not considered as a keyword, but it should! - for statements like "READ DATASET", GeSHi does not allow to set URLs because these statements are determined by REGEXPS. For "READ DATASET", the URL should be ABAPREAD_DATASET.htm. If a technical solution is found, be careful : URLs are sometimes not valid because the URL does not exist. For example, for "AT NEW" statement, the URL should be ABAPAT_ITAB.htm (not ABAPAT_NEW.htm). There are many other exceptions. Note: for adding this functionality within your php program, you can execute this code: function add_urls_to_multi_tokens( $matches ) { $url = preg_replace( "/[ \n]+/" , "_" , $matches[3] ); if( $url == $matches[3] ) return $matches[0] ; else return $matches[1]."".$matches[3]."".$matches[4]; } $html = $geshi->parse_code(); $html = preg_replace_callback( "£(zzz:(control|statement|data);\">)(.+?)()£s", "add_urls_to_multi_tokens", $html ); echo $html; - Numbers followed by a dot terminating the statement are not properly recognized

This file is part of GeSHi.

GeSHi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

GeSHi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GeSHi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


GeSHi