Documentation

Tokenizer
in package

A tokenizer class.

Table of Contents

Properties

$stack  : array<string|int, string>
A token stack.
$streamReader  : StreamReader

Methods

__construct()  : mixed
Tokenizer constructor.
clearStack()  : mixed
Clear the token stack.
getNextToken()  : false|string
Get next token.
getStreamReader()  : StreamReader
Get the stream reader instance.
leapWhiteSpaces()  : bool
Leap white spaces.
pushStack()  : mixed
Push a token onto the stack.

Properties

$stack

A token stack.

protected array<string|int, string> $stack = []

Methods

clearStack()

Clear the token stack.

public clearStack() : mixed

getNextToken()

Get next token.

public getNextToken() : false|string
Return values
false|string

leapWhiteSpaces()

Leap white spaces.

public leapWhiteSpaces() : bool
Return values
bool

pushStack()

Push a token onto the stack.

public pushStack(string $token) : mixed
Parameters
$token : string

        
On this page

Search results