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

Class: Parser

Source Location: /phpDocumentor/Parser.inc

Class Overview

Publisher
   |
   --Parser

PHP Parser for PHP 4.2.3-


Author(s):

Version:

  • $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $

Copyright:

  • 2000-2007 Kellin, Joshua Eichorn

Methods


Child classes:

phpDocumentorTParser
Tokenizer-based parser for PHP source code
parserDescParser
Parses a DocBlock description to retrieve abstract representations of
phpDocumentor_TutorialHighlightParser
Highlights source code using parse()
ppageParser
Global package page parser
XMLPackagePageParser
Used to parse XML DocBook-based tutorials
PDFParser

Inherited Variables

Inherited Methods

Class: Publisher

Publisher::publishEvent()
Publish an event
Publisher::subscribe()
Adds a subscriber to the $subscriber array().

Class Details

[line 338]
PHP Parser for PHP 4.2.3-

This parser is slower than the tokenizer-based parser, and is deprecated.




Tags:

author:  Joshua Eichorn <[email protected]>
author:  Gregory Beaver <[email protected]>
version:  $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $
copyright:  2000-2007 Kellin, Joshua Eichorn
deprecated:  in favor of phpDocumentorTParser


[ Top ]


Class Methods


constructor Parser [line 487]

Parser Parser( )

Set up invariant parsing variables



[ Top ]

method categoryTagHandler [line 2046]

void categoryTagHandler( string $word)

handles @category

Tag Handlers




Tags:

tutorial:  @category


Parameters:

string   $word  

[ Top ]

method checkEventPop [line 2612]

mixed checkEventPop( $word, $pevent)

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



Tags:

return:  returns false, or the event number popped off of the stack


Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::checkEventPop()
This function checks whether parameter $word is a token for popping the current event off of the Event Stack.

Parameters:

   $word  
   $pevent  

[ Top ]

method checkEventPush [line 2590]

mixed checkEventPush( $word, $pevent)

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



Tags:

return:  returns false, or the event number


Overridden in child classes as:

phpDocumentor_TutorialHighlightParser::checkEventPush()
This function checks whether parameter $word is a token for pushing a new event onto the Event Stack.

Parameters:

   $word  
   $pevent  

[ Top ]

method configWordParser [line 2957]

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"




Tags:

see:  WordParser


Overridden in child classes as:

phpDocumentor_HighlightParser::configWordParser()
Give the word parser necessary data to begin a new parse
phpDocumentor_TutorialHighlightParser::configWordParser()
Tell the parser's WordParser $wp to set up tokens to parse words by.

Parameters:

$value   $e   integer an event number

[ Top ]

method defaultTagHandler [line 1989]

void defaultTagHandler( string $word)

Handles all standard tags that only have a description

Tag Handlers




Parameters:

string   $word  

[ Top ]

method endTag [line 1971]

void endTag( )

Called to clean up at the end of parsing a @tag in a docblock



[ Top ]

method exampleTagHandler [line 2031]

void exampleTagHandler( string $word)

handles @example

Tag Handlers




Tags:

tutorial:  @example


Parameters:

string   $word  

[ Top ]

method getParserEventName [line 2968]

void getParserEventName( $value $value)

Debugging function, takes an event number and attempts to return its name



Overridden in child classes as:

parserDescParser::getParserEventName()
phpDocumentor_TutorialHighlightParser::getParserEventName()
searches for a parser event name based on its number
XMLPackagePageParser::getParserEventName()
debugging function
PDFParser::getParserEventName()
Return the name of the parser event

Parameters:

$value   $value   integer an event number

[ Top ]

method globalTagHandler [line 2062]

void globalTagHandler( string $word)

handles @global

Tag Handlers




Tags:

tutorial:  @global


Parameters:

string   $word  

[ Top ]

method invalidTagHandler [line 2003]

void invalidTagHandler( string $word)

Handles tags like '@filesource' that only work in PHP 4.3.0+

Tag Handlers




Parameters:

string   $word  

[ Top ]

method packageTagHandler [line 2015]

void packageTagHandler( string $word)

handles @package

Tag Handlers




Tags:

tutorial:  @package


Parameters:

string   $word  

[ Top ]

method paramTagHandler [line 2192]

void paramTagHandler( string $word)

handles @param

Tag Handlers




Tags:

tutorial:  @param


Parameters:

string   $word  

[ Top ]

method parse [line 509]

bool parse( &$parse_data, string $path, [int $base = 0], [ $packages = false], string $parse_data)

Parse a new file



Tags:

staticvar:  integer $endrecur: used for recursion limiting if a handler for an event is not found


Overridden in child classes as:

phpDocumentorTParser::parse()
Parse a new file
phpDocumentor_HighlightParser::parse()
Parse a new file
parserDescParser::parse()
Parse a long or short description for tags
phpDocumentor_TutorialHighlightParser::parse()
Parse a new file
ppageParser::parse()
Parse a new file
XMLPackagePageParser::parse()
Parse a new file
PDFParser::parse()
Parse text for PDFParser XML tags, and add the text to the PDF file

Parameters:

string   $parse_data  
string   $path  
int   $base   number of directories to drop off the bottom when creating names using path
   &$parse_data  
   $packages  

[ Top ]

method propertyTagHandler [line 2276]

void propertyTagHandler( string $word)

Handles @property(-read or -write) and @method magic tag

Tag Handlers




Parameters:

string   $word  

[ Top ]

method returnTagHandler [line 2228]

void returnTagHandler( string $word)

handles @return

Tag Handlers




Tags:

tutorial:  @return


Parameters:

string   $word  

[ Top ]

method setupStates [line 2628]

void setupStates( )

setup the parser tokens, and the pushEvent/popEvent arrays



Tags:



Overridden in child classes as:

phpDocumentor_HighlightParser::setupStates()
Initialize all parser state variables
parserDescParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays
phpDocumentor_TutorialHighlightParser::setupStates()
Initialize all parser state variables
ppageParser::setupStates()
set up invariant Parser variables
XMLPackagePageParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays
PDFParser::setupStates()
setup the parser tokens, and the pushEvent/popEvent arrays

[ Top ]

method staticvarTagHandler [line 2134]

void staticvarTagHandler( string $word)

handles @staticvar

Tag Handlers




Tags:

tutorial:  @staticvar


Parameters:

string   $word  

[ Top ]

method usesTagHandler [line 2170]

void usesTagHandler( string $word)

handles @uses

Tag Handlers




Tags:

tutorial:  @uses


Parameters:

string   $word  

[ Top ]

method varTagHandler [line 2252]

void varTagHandler( string $word)

handles @var

Tag Handlers




Tags:

tutorial:  @var


Parameters:

string   $word  

[ Top ]


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