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

Class: Parser

Source Location: /phpDocumentor/Parser.inc

Class Parser

Class Overview

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
Author(s): API Tags:
Deprecated:  in favor of phpDocumentorTParser

Information Tags:
Version:  $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $
Copyright:  2000-2007 Kellin, Joshua Eichorn

Methods

[ Top ]
Descendants
Child Class Description
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

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Publisher

Publisher::$subscriber

Inherited From Publisher

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

[ Top ]
Method Summary
Parser   Parser()   Set up invariant parsing variables
void   categoryTagHandler()   handles @category
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   defaultTagHandler()   Handles all standard tags that only have a description
void   endTag()   Called to clean up at the end of parsing a @tag in a docblock
void   exampleTagHandler()   handles @example
void   getParserEventName()   Debugging function, takes an event number and attempts to return its name
void   globalTagHandler()   handles @global
void   invalidTagHandler()   Handles tags like '@filesource' that only work in PHP 4.3.0+
void   packageTagHandler()   handles @package
void   paramTagHandler()   handles @param
bool   parse()   Parse a new file
void   propertyTagHandler()   Handles @property(-read or -write) and @method magic tag
void   returnTagHandler()   handles @return
void   setupStates()   setup the parser tokens, and the pushEvent/popEvent arrays
void   staticvarTagHandler()   handles @staticvar
void   usesTagHandler()   handles @uses
void   varTagHandler()   handles @var

[ Top ]
Methods
Constructor Parser  [line 487]

  Parser Parser( )

Set up invariant parsing variables



[ Top ]
categoryTagHandler  [line 2046]

  void categoryTagHandler( string $word  )

handles @category

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @category

[ Top ]
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.

Parameters:
   $word: 
   $pevent: 

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


Redefined in descendants as:

[ Top ]
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.

Parameters:
   $word: 
   $pevent: 

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


Redefined in descendants as:

[ Top ]
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"

Parameters:
$value   $e:  integer an event number

API Tags:
See:  WordParser


Redefined in descendants as:

[ Top ]
defaultTagHandler  [line 1989]

  void defaultTagHandler( string $word  )

Handles all standard tags that only have a description

Tag Handlers

Parameters:
string   $word: 


[ Top ]
endTag  [line 1971]

  void endTag( )

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



[ Top ]
exampleTagHandler  [line 2031]

  void exampleTagHandler( string $word  )

handles @example

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @example

[ Top ]
getParserEventName  [line 2968]

  void getParserEventName( $value $value  )

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

Parameters:
$value   $value:  integer an event number


Redefined in descendants as:

[ Top ]
globalTagHandler  [line 2062]

  void globalTagHandler( string $word  )

handles @global

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @global

[ Top ]
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 ]
packageTagHandler  [line 2015]

  void packageTagHandler( string $word  )

handles @package

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @package

[ Top ]
paramTagHandler  [line 2192]

  void paramTagHandler( string $word  )

handles @param

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @param

[ Top ]
parse  [line 509]

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

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: 

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


Redefined in descendants as:

[ Top ]
propertyTagHandler  [line 2276]

  void propertyTagHandler( string $word  )

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

Tag Handlers

Parameters:
string   $word: 


[ Top ]
returnTagHandler  [line 2228]

  void returnTagHandler( string $word  )

handles @return

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @return

[ Top ]
setupStates  [line 2628]

  void setupStates( )

setup the parser tokens, and the pushEvent/popEvent arrays


API Tags:
See:  Publisher::$tokens, Publisher::$pushEvent, Publisher::$popEvent


Redefined in descendants as:

[ Top ]
staticvarTagHandler  [line 2134]

  void staticvarTagHandler( string $word  )

handles @staticvar

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @staticvar

[ Top ]
usesTagHandler  [line 2170]

  void usesTagHandler( string $word  )

handles @uses

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @uses

[ Top ]
varTagHandler  [line 2252]

  void varTagHandler( string $word  )

handles @var

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @var

[ Top ]

Documentation generated on Tue, 06 Dec 2011 07:20:36 -0600 by phpDocumentor 1.4.4