class Tokenizer

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 34
__construct(array $patterns, $flags = '')

No description

Parameters

array $patterns
$flags

at line 46
array tokenize($input)

Tokenizes string.

Parameters

$input

Return Value

array

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

Returns position of token in input string.

Parameters

$text
$offset

Return Value

array

of [line, column]

Traits

Better OOP experience.