Class: Parser

Source Location: /phpDocumentor/Parser.inc

Class Overview [line 338]

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

Variables

Constants

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 Constants

Inherited Methods

Class: Publisher

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


Class Details

PHP Parser for PHP 4.2.3-

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

Tags:

[ Top ]


Class Variables


Class Methods

Parser

Parser Parser( )

[line 487]

Set up invariant parsing variables

Parameters:

[ Top ]

categoryTagHandler

void categoryTagHandler( string $word)

[line 2046]

handles @category

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

checkEventPop

mixed checkEventPop( $word, $pevent)

[line 2612]

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 ]

checkEventPush

mixed checkEventPush( $word, $pevent)

[line 2590]

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 ]

configWordParser

void configWordParser( $value $e)

[line 2957]

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:

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 ]

defaultTagHandler

void defaultTagHandler( string $word)

[line 1989]

Handles all standard tags that only have a description

Tag Handlers

Parameters:

  • string $word -

[ Top ]

endTag

void endTag( )

[line 1971]

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

Parameters:

[ Top ]

exampleTagHandler

void exampleTagHandler( string $word)

[line 2031]

handles @example

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

getParserEventName

void getParserEventName( $value $value)

[line 2968]

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 ]

globalTagHandler

void globalTagHandler( string $word)

[line 2062]

handles @global

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

invalidTagHandler

void invalidTagHandler( string $word)

[line 2003]

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

Tag Handlers

Parameters:

  • string $word -

[ Top ]

packageTagHandler

void packageTagHandler( string $word)

[line 2015]

handles @package

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

paramTagHandler

void paramTagHandler( string $word)

[line 2192]

handles @param

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

parse

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

[line 509]

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 ]

propertyTagHandler

void propertyTagHandler( string $word)

[line 2276]

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

Tag Handlers

Parameters:

  • string $word -

[ Top ]

returnTagHandler

void returnTagHandler( string $word)

[line 2228]

handles @return

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

setupStates

void setupStates( )

[line 2628]

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

Parameters:

[ Top ]

staticvarTagHandler

void staticvarTagHandler( string $word)

[line 2134]

handles @staticvar

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

usesTagHandler

void usesTagHandler( string $word)

[line 2170]

handles @uses

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]

varTagHandler

void varTagHandler( string $word)

[line 2252]

handles @var

Tag Handlers

Tags:

Parameters:

  • string $word -

[ Top ]


Class Constants


Documentation generated on Tue, 06 Dec 2011 07:08:11 -0600 by phpDocumentor 1.4.4