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,v 1.6 2006/08/17 03:23:26 cellog Exp $

Methods

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

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

Inherited From Publisher

Publisher::$subscriber

Inherited From Publisher

Publisher::publishEvent()
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   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 483]

  Parser Parser( )

Set up invariant parsing variables



[ Top ]
categoryTagHandler  [line 2042]

  void categoryTagHandler( string $word  )

handles @category

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @category

[ Top ]
checkEventPop  [line 2569]

  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 2547]

  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 2914]

  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 1985]

  void defaultTagHandler( string $word  )

Handles all standard tags that only have a description

Tag Handlers

Parameters:
string   $word: 


[ Top ]
endTag  [line 1967]

  void endTag( )

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



[ Top ]
exampleTagHandler  [line 2027]

  void exampleTagHandler( string $word  )

handles @example

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @example

[ Top ]
getParserEventName  [line 2925]

  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 2058]

  void globalTagHandler( string $word  )

handles @global

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @global

[ Top ]
invalidTagHandler  [line 1999]

  void invalidTagHandler( string $word  )

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

Tag Handlers

Parameters:
string   $word: 


[ Top ]
packageTagHandler  [line 2011]

  void packageTagHandler( string $word  )

handles @package

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @package

[ Top ]
paramTagHandler  [line 2188]

  void paramTagHandler( string $word  )

handles @param

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @param

[ Top ]
parse  [line 505]

  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 ]
returnTagHandler  [line 2224]

  void returnTagHandler( string $word  )

handles @return

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @return

[ Top ]
setupStates  [line 2585]

  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 2130]

  void staticvarTagHandler( string $word  )

handles @staticvar

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @staticvar

[ Top ]
usesTagHandler  [line 2166]

  void usesTagHandler( string $word  )

handles @uses

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @uses

[ Top ]
varTagHandler  [line 2248]

  void varTagHandler( string $word  )

handles @var

Tag Handlers

Parameters:
string   $word: 

Information Tags:
Tutorial:  @var

[ Top ]

Documentation generated on Tue, 24 Oct 2006 09:24:40 -0500 by phpDocumentor 1.3.1