[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/extensions/Webservices/third-party/ParserGenerator/ -> Symbol.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: 260 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PHP_ParserGenerator_Symbol:: (6 methods):
  Symbol_new()
  Symbol_count()
  Symbol_arrayof()
  Symbol_find()
  sortSymbols()
  same_symbol()


Class: PHP_ParserGenerator_Symbol  - X-Ref

Symbols (terminals and nonterminals) of the grammar are stored in this class

Symbol_new($x)   X-Ref
Return a pointer to the (terminal or nonterminal) symbol "x".
Create a new symbol if this is the first time "x" has been seen.
(this is a singleton)

param: string
return: PHP_ParserGenerator_Symbol

Symbol_count()   X-Ref
Return the number of unique symbols

return: int

Symbol_arrayof()   X-Ref
No description

Symbol_find($x)   X-Ref
No description

sortSymbols($a, $b)   X-Ref
Sort function helper for symbols

Symbols that begin with upper case letters (terminals or tokens)
must sort before symbols that begin with lower case letters
(non-terminals).  Other than that, the order does not matter.

We find experimentally that leaving the symbols in their original
order (the order they appeared in the grammar file) gives the
smallest parser tables in SQLite.
param: PHP_ParserGenerator_Symbol
param: PHP_ParserGenerator_Symbol

same_symbol(PHP_ParserGenerator_Symbol $a, PHP_ParserGenerator_Symbol $b)   X-Ref
Return true if two symbols are the same.




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