phpDocumentor phpDocumentor
WordParsers
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

Class: phpDocumentorTWordParser

Source Location: /phpDocumentor/phpDocumentorTWordParser.inc

Class phpDocumentorTWordParser

Class Overview

Like WordParser, but expects an array of tokens from the tokenizer instead of a string.

Located in /phpDocumentor/phpDocumentorTWordParser.inc [line 46]

WordParser
   |
   --phpDocumentorTWordParser
Author(s): Information Tags:
Version:  $Id: WordParser.inc,v 1.3 2006/04/30 22:18:14 cellog Exp $
Since:  1.2

Methods

[ Top ]
Direct descendents
Child Class Description
phpDocumentor_HighlightWordParser Retrieve tokens from an array of tokens organized by line numbers

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From WordParser

WordParser::backupPos()
Backup to the previous token so that it can be retrieved again in a new context.
WordParser::getBlock()
Unused
WordParser::getPos()
Returns the current pointer position, or 1 character after the end of the word
WordParser::getSource()
Retrieve source code for the last function/method
WordParser::getWord()
Retrieve a token from the token list
WordParser::setPos()
Set the internal cursor within the source code
WordParser::setSeperator()
WordParser::setup()
Initialize the WordParser
WordParser::setWhitespace()
set parser to return or strip whitespace

[ Top ]
Method Summary
static void   concatTokens()   Utility function to convert a series of tokens into a string
static void   tokenEquals()   Utility function to determine whether two tokens from the tokenizer are equal
void   addFileSource()   Wrapper for addSource() used to retrieve the entire source code
void   addSource()   Generate source token arrays organized by line number
void   backupPos()  
void   findGlobal()   Tell the phpDocumentorTWordParser to return the entire global variable if it is found.
array   getFileSource()  
array   getSource()  
string|array   getWord()   Retrieve a token for the phpDocumentorTParser
void   setup()   Uses http://www.php.net/token_get_all to tokenize the source code.

[ Top ]
Methods
static method concatTokens  [line 158]

  static void concatTokens( $a  )

Utility function to convert a series of tokens into a string

Parameters:
   $a: 


[ Top ]
static method tokenEquals  [line 147]

  static void tokenEquals( $a, $b  )

Utility function to determine whether two tokens from the tokenizer are equal

Parameters:
   $a: 
   $b: 


[ Top ]
addFileSource  [line 232]

  void addFileSource( array $word  )

Wrapper for addSource() used to retrieve the entire source code

organized by line number in setup()

Parameters:
array   $word:  full file source code


[ Top ]
addSource  [line 252]

  void addSource( array|string $word, [boolean $file = false], array|string 2  )

Generate source token arrays organized by line number

This code will split up tokens that contain "\n" and add them to the source code as separate tokens on different lines.

Parameters:
array|string   2:  next token, for lookahead splitting
array|string   $word:  token to add
boolean   $file:  true if this should be added to $_file_source

API Tags:
Uses:  _set_sars()


[ Top ]
backupPos  [line 303]

  void backupPos( )



Redefinition of:
WordParser::backupPos()
Backup to the previous token so that it can be retrieved again in a new context.

Redefined in descendants as:

[ Top ]
findGlobal  [line 294]

  void findGlobal( array $tokens  )

Tell the phpDocumentorTWordParser to return the entire global variable if it is found.

Parameters:
array   $tokens:  tokens that represent the global variable definition

API Tags:
Uses:  $_global_search


[ Top ]
getFileSource  [line 126]

  array getFileSource( )


API Tags:
Return:  source code tokens split up by line number
Usedby:  parserExampleTag::parserExampleTag() - uses to parse an example and retrieve all tokens by line number


[ Top ]
getSource  [line 115]

  array getSource( )



Redefinition of:
WordParser::getSource()
Retrieve source code for the last function/method

[ Top ]
getWord  [line 181]

  string|array getWord( )

Retrieve a token for the phpDocumentorTParser


API Tags:
Return:  token from tokenizer


Redefinition of:
WordParser::getWord()
Retrieve a token from the token list

Redefined in descendants as:

[ Top ]
setup  [line 99]

  void setup( &$input  )

Uses http://www.php.net/token_get_all to tokenize the source code.

Parameters:
   &$input: 


Redefinition of:
WordParser::setup()
Initialize the WordParser

Redefined in descendants as:

[ Top ]

Documentation generated on Tue, 24 Oct 2006 09:25:55 -0500 by phpDocumentor 1.3.1