Pelzini

This is the code documentation for the Pelzini project

Page options:

Inherited members

class CAnalyser

Analyses the C tokens, and creates a set of ParserItem objects.

Authors

Variables

NameVisibilityDescription
$pos 
$token_pos 
$tokens 

Functions

NameVisibilityDescription
findTokenBackwardsprotectedFinds a token looking backwards from the current position.
findTokenForwardsprotectedFinds a token looking forward from the current position.
getPosprotectedReturns the current position
getTokenprotectedReturns a token at a specific position
getTokenPosprotectedGets the position of the last token found using one of the search functions
movePosBackwardprotectedMoves the internal token pointer backwards
movePosForwardprotectedMoves the internal token pointer forwards
processpublicShould create ParserItem objects that represent the provided tokens
resetStatepublicResets any state variables used by this class back to their initial state
setPosprotectedSets the current position
setTokensprotectedTells the analyser what tokens it should use

protected findTokenBackwards (from Analyser)

Token $Analyser->findTokenBackwards ( mixed $token_types [, mixed $stop_list ] );

Finds a token looking backwards from the current position.
Searching starts before the current token.
The token must be of the type specified

protected findTokenForwards (from Analyser)

Token $Analyser->findTokenForwards ( mixed $token_types [, mixed $stop_list ] );

Finds a token looking forward from the current position.
Searching starts after the current token.
The token must be of the type specified

protected getPos (from Analyser)

unknown $Analyser->getPos ( );

Returns the current position

protected getToken (from Analyser)

unknown $Analyser->getToken ( [ mixed $pos ] );

Returns a token at a specific position
If no position is specified, uses the current position

protected getTokenPos (from Analyser)

unknown $Analyser->getTokenPos ( );

Gets the position of the last token found using one of the search functions

protected movePosBackward (from Analyser)

void $Analyser->movePosBackward ( [ integer $num ] );

Moves the internal token pointer backwards

protected movePosForward (from Analyser)

void $Analyser->movePosForward ( [ integer $num ] );

Moves the internal token pointer forwards

public process

boolean $CAnalyser->process ( mixed $tokens , mixed $parser_file );

Should create ParserItem objects that represent the provided tokens
and apply those objects to the ParserFile specified.

public resetState

void $CAnalyser->resetState ( );

Resets any state variables used by this class back to their initial state

protected setPos (from Analyser)

void $Analyser->setPos ( mixed $pos );

Sets the current position

protected setTokens (from Analyser)

void $Analyser->setTokens ( mixed $tokens );

Tells the analyser what tokens it should use