Luminous  git-master
 All Classes Files Functions Variables
Static Public Attributes | List of all members
LuminousTokenPresets Class Reference

A set of pre-defined patterns to match various common tokens. More...

Static Public Attributes

static $C_COMMENT_ML = '% / \* (?> [^\\*]+ | \\*(?!/) )* (?: \\*/ | $) %sx'
 Multiline C style comment.
static $C_COMMENT_SL = '% // .* %x'
 Single line c++ style comment.
static $CHAR = "(?: \\\\(?: x[A-F0-9]{1,2}| . ) | . ) (?: '|\$)/ixm"
 Single quoted c-style character.
static $DOUBLE_STR = '/" (?> [^"\\\\]+ | \\\\.)* (?:"|$)/xs'
 multi-line double quoted string using backslash escapes
static $DOUBLE_STR_SL = "/\"(?> [^\\\\\"\n]+ | \\\\.)*(?:\$|\")/xms"
 single line double quoted string using backslash escapes
static $NUM_HEX = '/0[Xx][a-fA-F0-9]+/'
 hexadecimal literal
static $NUM_REAL
 Real number, i.e. an integer or a float, optionally with an exponent.
static $PERL_COMMENT = '/#.*/'
 Perl/Python/Ruby style hash-comment (single line)
static $SINGLE_STR = "/' (?> [^'\\\\]+ | \\\\.)* (?:'|\$)/xs"
 multi-line single quote string using backslash escapes
static $SINGLE_STR_SL = "/'(?> [^\\\\'\n]+ | \\\\.)*(?:\$|')/xms"
 single line single quoted string using backslash escapes
static $SQL_SINGLE_STR = "/ ' (?> [^']+ | '' )* (?: '|\$)/x"
 SQL style single quoted string using '' to escape.
static $SQL_SINGLE_STR_BSLASH = "/ ' (?> [^'\\\\]+ | '' | \\\\. )* (?: '|\$)/x"
 SQL style single quoted string using '' or \' to escape.

Detailed Description

A set of pre-defined patterns to match various common tokens.

Member Data Documentation

LuminousTokenPresets::$NUM_REAL
static
Initial value:
'/
(?: \d+ (?: \.\d+ )? | \.?\d+) # int, fraction or significand
(?:e[+-]?\d+)? # exponent
/ix'

Real number, i.e. an integer or a float, optionally with an exponent.


The documentation for this class was generated from the following file: