Class Parser

(line 338)

Description

Publisher
   |
   --Parser

Located in File: /phpDocumentor/Parser.inc

PHP Parser for PHP 4.2.3-

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



Classes extended from Parser:
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

Class Variables

Summary:

Class Constants

Summary:

Method Detail

Summary:
Parser Parser ()
void categoryTagHandler (string $word)
mixed checkEventPop ( $word,  $pevent)
mixed checkEventPush ( $word,  $pevent)
void configWordParser ($value $e)
void defaultTagHandler (string $word)
void endTag ()
void exampleTagHandler (string $word)
void getParserEventName ($value $value)
void globalTagHandler (string $word)
void invalidTagHandler (string $word)
void packageTagHandler (string $word)
void paramTagHandler (string $word)
bool parse ( &$parse_data, string $path, [int $base = 0], [ $packages = false], string $parse_data)
void propertyTagHandler (string $word)
void returnTagHandler (string $word)
void setupStates ()
void staticvarTagHandler (string $word)
void usesTagHandler (string $word)
void varTagHandler (string $word)

Constructor Parser (line 487)

Parser Parser( )

Set up invariant parsing variables

Info

Method categoryTagHandler (line 2046)

void categoryTagHandler( string $word)

handles @category

Tag Handlers

Parameters

  • string $word:

Info

Method checkEventPop (line 2612)

mixed checkEventPop( $word, $pevent)

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.

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

Parameters

  • $word:
  • $pevent:

Info

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

Method checkEventPush (line 2590)

mixed checkEventPush( $word, $pevent)

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.

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

Parameters

  • $word:
  • $pevent:

Info

  • return - returns false, or the event number

Method configWordParser (line 2957)

void configWordParser( $value $e)

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.

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

Info

Method defaultTagHandler (line 1989)

void defaultTagHandler( string $word)

Handles all standard tags that only have a description

Tag Handlers

Parameters

  • string $word:

Info

Method endTag (line 1971)

void endTag( )

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

Info

Method exampleTagHandler (line 2031)

void exampleTagHandler( string $word)

handles @example

Tag Handlers

Parameters

  • string $word:

Info

Method getParserEventName (line 2968)

void getParserEventName( $value $value)

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

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

Parameters

  • $value $value: integer an event number

Info

Method globalTagHandler (line 2062)

void globalTagHandler( string $word)

handles @global

Tag Handlers

Parameters

  • string $word:

Info

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:

Info

Method packageTagHandler (line 2015)

void packageTagHandler( string $word)

handles @package

Tag Handlers

Parameters

  • string $word:

Info

Method paramTagHandler (line 2192)

void paramTagHandler( string $word)

handles @param

Tag Handlers

Parameters

  • string $word:

Info

Method parse (line 509)

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

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

Parse a new 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:

Info

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

Method propertyTagHandler (line 2276)

void propertyTagHandler( string $word)

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

Tag Handlers

Parameters

  • string $word:

Info

Method returnTagHandler (line 2228)

void returnTagHandler( string $word)

handles @return

Tag Handlers

Parameters

  • string $word:

Info

Method setupStates (line 2628)

void setupStates( )

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

setup the parser tokens, and the pushEvent/popEvent arrays

Info

Method staticvarTagHandler (line 2134)

void staticvarTagHandler( string $word)

handles @staticvar

Tag Handlers

Parameters

  • string $word:

Info

Method usesTagHandler (line 2170)

void usesTagHandler( string $word)

handles @uses

Tag Handlers

Parameters

  • string $word:

Info

Method varTagHandler (line 2252)

void varTagHandler( string $word)

handles @var

Tag Handlers

Parameters

  • string $word:

Info

Inherited Variables

Inherited Class Variable Summary

Inherited From Class Publisher

Publisher::$subscriber - Array of references objects that have Subscribed to this publisher

Inherited Methods

Inherited Method Summary

Inherited From Class Publisher

Publisher::publishEvent() - Publish an event

Publisher::subscribe() - Adds a subscriber to the $subscriber array().



Documentation generated on Mon, 05 Dec 2011 21:28:36 -0600 by phpDocumentor 1.4.4