Pelzini

This is the code documentation for the Pelzini project

Page options:

Inherited members

class Token

This class is used to represent a token that has been tokenised using a Lexer. (e.g. the JavascriptLexer)
These tokens are used to create various ParserItems, by passing them to an Analyser (e.g. the JavascriptAnalyser)

Variables

NameVisibilityDescription
$curr_linenum (static) 
$linenum 
$type 
$value 

Functions

NameVisibilityDescription
__constructpublic 
getLineNumpublicGets the line number this toekn
getTypeNamepublicUses some PHP cleverness to get the name of the constant
getValuepublicGets the value of this token
gettypepublicGets the type of this token
setCurrLineNumpublic (static)Set the "current" line number. New tokens have a line number set to this figure.
setIncrLineNumpublic (static)Increment the "current" line number. New tokens have a line number set to this figure.

public __construct

void $Token->__construct ( mixed $type [, mixed $value ] );

This function does not have a description

public getLineNum

unknown $Token->getLineNum ( );

Gets the line number this toekn

public getTypeName

unknown $Token->getTypeName ( );

Uses some PHP cleverness to get the name of the constant
that this token referres to.
Good for debugging

public getValue

unknown $Token->getValue ( );

Gets the value of this token

public gettype

unknown $Token->gettype ( );

Gets the type of this token

public setCurrLineNum

void Token::setCurrLineNum ( int $line );

Set the "current" line number. New tokens have a line number set to this figure.

public setIncrLineNum

void Token::setIncrLineNum ( [ mixed $incr ] );

Increment the "current" line number. New tokens have a line number set to this figure.