class Tokenizer extends Object

internal  
 

Simple lexical analyser.

Constants

VALUE

OFFSET

TYPE

Methods

__construct(array $patterns, $flags = '')

No description

array
tokenize($input)

Tokenizes string.

static array
getCoordinates($text, $offset)

Returns position of token in input string.

Details

at line 32
__construct(array $patterns, $flags = '')

No description

Parameters

array $patterns
$flags

at line 44
array tokenize($input)

Tokenizes string.

Parameters

$input

Return Value

array

at line 80
static array getCoordinates($text, $offset)

Returns position of token in input string.

Parameters

$text
$offset

Return Value

array

of [line, column]