apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: LemonSymbol

Source Location: /PHP_ParserGenerator-0.1.7/Main.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 205]


[ Top ]


Class Variables

$assoc =

[line 238]

  • Access: public

Type:   mixed


[ Top ]

$datatype =

[line 247]

  • Access: public

Type:   mixed


[ Top ]

$destructor =  0

[line 244]

  • Access: public

Type:   mixed


[ Top ]

$destructorln =

[line 246]

  • Access: public

Type:   mixed


[ Top ]

$dtnum =

[line 249]

  • Access: public

Type:   mixed


[ Top ]

$fallback =

[line 230]

  • Access: public

Type:   LemonSymbol


[ Top ]

$firstset =

[line 239]

  • Access: public

Type:   mixed


[ Top ]

$index =

[line 216]

  • Access: public

Type:   mixed


[ Top ]

$lambda =

[line 243]

  • Access: public

Type:   boolean


[ Top ]

$name =

[line 215]

  • Access: public

Type:   mixed


[ Top ]

$nsubsym =

[line 253]

  • Access: public

Type:   mixed


[ Top ]

$prec =

[line 231]

  • Access: public

Type:   mixed


[ Top ]

$rule =

[line 226]

  • Access: public

Type:   LemonRule


[ Top ]

$subsym = array()

[line 257]

  • Var: an array of LemonSymbol objects
  • Access: public

Type:   array


[ Top ]

$type =

[line 222]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

same_symbol   [line 331]

void same_symbol( LemonSymbol $a, LemonSymbol $b)

Return true if two symbols are the same.
  • Access: public

Parameters:

LemonSymbol   $a   — 
LemonSymbol   $b   — 

[ Top ]

sortSymbols   [line 321]

void sortSymbols( LemonSymbol $a, LemonSymbol $b)

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.

  • Access: public

Parameters:

LemonSymbol   $a   — 
LemonSymbol   $b   — 

[ Top ]

Symbol_arrayof   [line 295]

void Symbol_arrayof( )

  • Access: public

[ Top ]

Symbol_count   [line 290]

int Symbol_count( )

Return the number of unique symbols
  • Access: public

[ Top ]

Symbol_find   [line 300]

void Symbol_find( $x)

  • Access: public

Parameters:

   $x   — 

[ Top ]

Symbol_new   [line 266]

LemonSymbol Symbol_new( string $x)

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)

  • Access: public

Parameters:

string   $x   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:41:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.