Class Parser

Description

PHP Parser for PHP 4.2.3-

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

Located in /phpDocumentor/Parser.inc (line 338)

Publisher
   |
   --Parser
Direct descendents
Class Description
 class phpDocumentorTParser Tokenizer-based parser for PHP source code
 class parserDescParser Parses a DocBlock description to retrieve abstract representations of
 class phpDocumentor_TutorialHighlightParser Highlights source code using parse()
 class ppageParser Global package page parser
 class XMLPackagePageParser Used to parse XML DocBook-based tutorials
 class PDFParser
Method 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)
Variables

Inherited Variables

Inherited from Publisher

Publisher::$subscriber
Methods
Constructor Parser (line 487)

Set up invariant parsing variables

Parser Parser ()
categoryTagHandler (line 2046)

handles @category

Tag Handlers

void categoryTagHandler (string $word)
  • string $word
checkEventPop (line 2612)

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

  • return: returns false, or the event number popped off of the stack
mixed checkEventPop ( $word,  $pevent)
  • $word
  • $pevent

Redefined in descendants as:
checkEventPush (line 2590)

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

  • return: returns false, or the event number
mixed checkEventPush ( $word,  $pevent)
  • $word
  • $pevent

Redefined in descendants as:
configWordParser (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"

void configWordParser ($value $e)
  • $value $e: integer an event number

Redefined in descendants as:
defaultTagHandler (line 1989)

Handles all standard tags that only have a description

Tag Handlers

void defaultTagHandler (string $word)
  • string $word
endTag (line 1971)

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

void endTag ()
exampleTagHandler (line 2031)

handles @example

Tag Handlers

void exampleTagHandler (string $word)
  • string $word
getParserEventName (line 2968)

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

void getParserEventName ($value $value)
  • $value $value: integer an event number

Redefined in descendants as:
globalTagHandler (line 2062)

handles @global

Tag Handlers

void globalTagHandler (string $word)
  • string $word
invalidTagHandler (line 2003)

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

Tag Handlers

void invalidTagHandler (string $word)
  • string $word
packageTagHandler (line 2015)

handles @package

Tag Handlers

void packageTagHandler (string $word)
  • string $word
paramTagHandler (line 2192)

handles @param

Tag Handlers

void paramTagHandler (string $word)
  • string $word
parse (line 509)

Parse a new file

  • staticvar: integer $endrecur: used for recursion limiting if a handler for an event is not found
bool parse ( &$parse_data, string $path, [int $base = 0], [ $packages = false], string $parse_data)
  • string $parse_data
  • string $path
  • int $base: number of directories to drop off the bottom when creating names using path
  • &$parse_data
  • $packages

Redefined in descendants as:
propertyTagHandler (line 2276)

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

Tag Handlers

void propertyTagHandler (string $word)
  • string $word
returnTagHandler (line 2228)

handles @return

Tag Handlers

void returnTagHandler (string $word)
  • string $word
setupStates (line 2628)

setup the parser tokens, and the pushEvent/popEvent arrays

void setupStates ()

Redefined in descendants as:
staticvarTagHandler (line 2134)

handles @staticvar

Tag Handlers

void staticvarTagHandler (string $word)
  • string $word
usesTagHandler (line 2170)

handles @uses

Tag Handlers

void usesTagHandler (string $word)
  • string $word
varTagHandler (line 2252)

handles @var

Tag Handlers

void varTagHandler (string $word)
  • string $word

Inherited Methods

Inherited From Publisher

 Publisher::publishEvent()
 Publisher::subscribe()

Documentation generated on Mon, 05 Dec 2011 21:39:48 -0600 by phpDocumentor 1.4.4