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

Class: phpDocumentor_XML_Beautifier_Tokenizer

Source Location: /phpDocumentor/Converters/XML/DocBook/peardoc2/Tokenizer.php

Class phpDocumentor_XML_Beautifier_Tokenizer

Property Summary
array   $eventHandlers  

[ Top ]
Method Summary
phpDocumentor_XML_Beautifier_Tokenizer   phpDocumentor_XML_Beautifier_Tokenizer()   Initialize the $tokenpushEvent, $wordpushEvent arrays
mixed   checkEventPop()   this function checks whether parameter $word is a token for popping the current event off of the Event Stack.
mixed   checkEventPush()   this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.
void   configWordParser()   tell the parser's WordParser $wp to set up tokens to parse words by.
void   getParserEventName()  
void   incdataHandler()   Handler for real character data
bool   parseString()   Parse a new file
void   setupStates()   Initialize all parser state variables

[ Top ]
Properties
array   $eventHandlers = array(
PHPDOC_XMLTOKEN_EVENT_NOEVENTS => 'normalHandler',
PHPDOC_XMLTOKEN_EVENT_XML => 'parseXMLHandler',
PHPDOC_XMLTOKEN_EVENT_PI => 'parsePiHandler',
PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE => 'attrHandler',
PHPDOC_XMLTOKEN_EVENT_OPENTAG => 'tagHandler',
PHPDOC_XMLTOKEN_EVENT_IN_CDATA => 'realcdataHandler',
PHPDOC_XMLTOKEN_EVENT_DEF => 'defHandler',
PHPDOC_XMLTOKEN_EVENT_CLOSETAG => 'closetagHandler',
PHPDOC_XMLTOKEN_EVENT_ENTITY => 'entityHandler',
PHPDOC_XMLTOKEN_EVENT_COMMENT => 'commentHandler',
PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE => 'stringHandler',
PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE => 'stringHandler',
PHPDOC_XMLTOKEN_EVENT_CDATA => 'parseCdataHandler',
)
[line 64]

[ Top ]
Methods
Constructor phpDocumentor_XML_Beautifier_Tokenizer  [line 570]

  phpDocumentor_XML_Beautifier_Tokenizer phpDocumentor_XML_Beautifier_Tokenizer( )

Initialize the $tokenpushEvent, $wordpushEvent arrays



[ Top ]
checkEventPop  [line 535]

  mixed checkEventPop( $word, $pevent  )

this function checks whether parameter $word is a token for popping the current event off of the Event Stack.

Parameters:
   $word: 
   $pevent: 

API Tags:
Return:  returns false, or the event number popped off of the stack


[ Top ]
checkEventPush  [line 513]

  mixed checkEventPush( $word, $pevent  )

this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.

Parameters:
   $word: 
   $pevent: 

API Tags:
Return:  returns false, or the event number


[ Top ]
configWordParser  [line 504]

  void configWordParser( $value $e  )

tell the parser's WordParser $wp to set up tokens to parse words by.

tokens are word separators. In English, a space or punctuation are examples of tokens. In PHP, a token can be a ;, a parenthesis, or even the word "function"

Parameters:
$value   $e:  integer an event number

API Tags:
See:  WordParser
Usedby:  phpDocumentor_XML_Beautifier_Tokenizer::parseString() - pass $parse_data to prepare retrieval of tokens


[ Top ]
getParserEventName  [line 661]

  void getParserEventName( $value  )

Parameters:
   $value: 


[ Top ]
incdataHandler  [line 408]

  void incdataHandler( object XML $parser, string $cdata  )

Handler for real character data

Parameters:
object XML   $parser:  parser object
string   $cdata:  CDATA

API Tags:
Access:  protected


[ Top ]
parseString  [line 108]

  bool parseString( string $parse_data, Converter 1, false|string 2, false|integer 3  )

Parse a new file

The parse() method is a do...while() loop that retrieves tokens one by one from the $_event_stack, and uses the token event array set up by the class constructor to call event handlers.

The event handlers each process the tokens passed to them, and use the _addoutput() method to append the processed tokens to the $_line variable. The word parser calls newLineNum() every time a line is reached.

In addition, the event handlers use special linking functions _link() and its cousins (_classlink(), etc.) to create in-code hyperlinks to the documentation for source code elements that are in the source code.

Parameters:
Converter   1: 
false|string   2:  full path to file with @filesource tag, if this is a @filesource parse
false|integer   3:  starting line number from [email protected] linenum}
string   $parse_data: 

API Tags:
Staticvar:  integer $endrecur: used for recursion limiting if a handler for an event is not found
Uses:  phpDocumentor_XML_Beautifier_Tokenizer::setupStates() - initialize parser state variables
Uses:  phpDocumentor_XML_Beautifier_Tokenizer::configWordParser() - pass $parse_data to prepare retrieval of tokens


[ Top ]
setupStates  [line 553]

  void setupStates( boolean $parsedata, false|string 1  )

Initialize all parser state variables

Parameters:
false|string   1:  name of class we are going to start from
boolean   $parsedata:  true if we are highlighting an inline [email protected]} tag's output

API Tags:
Usedby:  phpDocumentor_XML_Beautifier_Tokenizer::parseString() - initialize parser state variables
Uses:  $_wp - sets to a new phpDocumentor_HighlightWordParser


[ Top ]

Documentation generated on Tue, 06 Dec 2011 07:21:24 -0600 by phpDocumentor 1.4.4