[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/extensions/Webservices/third-party/ParserGenerator/ -> Parser.php (summary)

PHP_ParserGenerator, a php 5 parser generator. This is a direct port of the Lemon parser generator, found at {@link http://www.hwaci.com/sw/lemon/}

Author: Gregory Beaver <[email protected]>
Copyright: 2006 Gregory Beaver
License: http://www.php.net/license/3_01.txt PHP License 3.01
Version: CVS: $Id$
File Size: 827 lines (37 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PHP_ParserGenerator_Parser:: (5 methods):
  __construct()
  preprocess_input()
  Parse()
  parseonetoken()
  _printmulti()


Class: PHP_ParserGenerator_Parser  - X-Ref

The grammar parser for lemon grammar files.

__construct(PHP_ParserGenerator $lem)   X-Ref


preprocess_input(&$z)   X-Ref
Run the preprocessor over the input file text.  The Lemon variable
$azDefine contains the names of all defined
macros.  This routine looks for "%ifdef" and "%ifndef" and "%endif" and
comments them out.  Text in between is also commented out as appropriate.

param: string

Parse(PHP_ParserGenerator_Data $gp)   X-Ref
In spite of its name, this function is really a scanner.

It reads in the entire input file (all at once) then tokenizes it.
Each token is passed to the function "parseonetoken" which builds all
the appropriate data structures in the global state vector "gp".
param: PHP_ParserGenerator_Data

parseonetoken($token)   X-Ref
Parse a single token

param: string token

_printmulti($a, $b)   X-Ref
return a descriptive string for a multi-terminal token.

param: string $a
param: string $b
return: string



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1