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

Class: LemonData

Source Location: /PHP_ParserGenerator-0.1.7/Main.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 1113]


[ Top ]


Class Variables

$accept =

[line 1153]

  • Access: public

Type:   mixed


[ Top ]

$acceptln =

[line 1154]

  • Access: public

Type:   mixed


[ Top ]

$arg =

[line 1136]

  • Access: public

Type:   mixed


[ Top ]

$argv0 =

[line 1169]

  • Access: public

Type:   mixed


[ Top ]

$basisflag =

[line 1167]

  • Access: public

Type:   mixed


[ Top ]

$declare_classcode =

[line 1145]

  • Access: public

Type:   mixed


[ Top ]

$declare_classln =

[line 1146]

  • Access: public

Type:   mixed


[ Top ]

$error =

[line 1147]

  • Access: public

Type:   mixed


[ Top ]

$errorcnt =

[line 1130]

  • Access: public

Type:   mixed


[ Top ]

$errorln =

[line 1148]

  • Access: public

Type:   mixed


[ Top ]

$errsym =

[line 1134]

  • Access: public

Type:   LemonSymbol


[ Top ]

$extracode =

[line 1155]

  • Access: public

Type:   mixed


[ Top ]

$extracodeln =

[line 1156]

  • Access: public

Type:   mixed


[ Top ]

$failure =

[line 1151]

  • Access: public

Type:   mixed


[ Top ]

$failureln =

[line 1152]

  • Access: public

Type:   mixed


[ Top ]

$filename =

[line 1161]

  • Access: public

Type:   mixed


[ Top ]

$filenosuffix =

[line 1162]

  • Access: public

Type:   mixed


[ Top ]

$has_fallback =

[line 1168]

  • Access: public

Type:   mixed


[ Top ]

$includeln =

[line 1142]

  • Access: public

Type:   mixed


[ Top ]

$include_classcode =

[line 1143]

  • Access: public

Type:   mixed


[ Top ]

$include_classln =

[line 1144]

  • Access: public

Type:   mixed


[ Top ]

$include_code =

[line 1141]

  • Access: public

Type:   mixed


[ Top ]

$name =

[line 1135]

  • Access: public

Type:   mixed


[ Top ]

$nconflict =

[line 1165]

  • Access: public

Type:   mixed


[ Top ]

$nrule =

[line 1123]

  • Access: public

Type:   mixed


[ Top ]

$nstate =

[line 1122]

  • Access: public

Type:   mixed


[ Top ]

$nsymbol =

[line 1124]

  • Access: public

Type:   mixed


[ Top ]

$nterminal =

[line 1125]

  • Access: public

Type:   mixed


[ Top ]

$outname =

[line 1163]

  • Access: public

Type:   mixed


[ Top ]

$overflow =

[line 1149]

  • Access: public

Type:   mixed


[ Top ]

$overflowln =

[line 1150]

  • Access: public

Type:   mixed


[ Top ]

$rule =

[line 1121]

  • Access: public

Type:   LemonRule


[ Top ]

$sorted =

[line 1117]

  • Var: array of LemonState objects
  • Access: public

Type:   array


[ Top ]

$stacksize =

[line 1140]

  • Access: public

Type:   mixed


[ Top ]

$start =

[line 1139]

  • Access: public

Type:   mixed


[ Top ]

$symbols = array()

[line 1129]

  • Var: array of LemonSymbol objects
  • Access: public

Type:   array


[ Top ]

$tablesize =

[line 1166]

  • Access: public

Type:   mixed


[ Top ]

$tokendest =

[line 1157]

  • Access: public

Type:   mixed


[ Top ]

$tokendestln =

[line 1158]

  • Access: public

Type:   mixed


[ Top ]

$tokenprefix =

[line 1164]

  • Access: public

Type:   mixed


[ Top ]

$tokentype =

[line 1137]

  • Access: public

Type:   mixed


[ Top ]

$vardest =

[line 1159]

  • Access: public

Type:   mixed


[ Top ]

$vardestln =

[line 1160]

  • Access: public

Type:   mixed


[ Top ]

$vartype =

[line 1138]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

append_str   [line 2533]

void append_str( string $zText, int $n)

Append text to a dynamically allocated string. If zText is 0 then reset the string to be empty again. Always return the complete text of the string (which is overwritten with each call).

n bytes of zText are stored. If n==0 then all of zText is stored.

If n==-1, then the previous character is overwritten.


Parameters:

string   $zText   — 
int   $n   — 

[ Top ]

axset_compare   [line 2708]

void axset_compare( $a, $b)

Compare to axset structures for sorting purposes

Parameters:

   $a   — 
   $b   — 

[ Top ]

CompressTables   [line 1644]

void CompressTables( )

Reduce the size of the action tables, if possible, by making use of defaults.

In this version, we take the most frequent REDUCE action and make it the default.


[ Top ]

compute_action   [line 1744]

void compute_action( LemonAction $ap)

Given an action, compute the integer value for that action which is to be put in the action table of the generated machine.

Return negative if no action should be generated.


Parameters:

LemonAction   $ap   — 

[ Top ]

emit_code   [line 2507]

void emit_code( $out, LemonRule $rp, &$lineno)

Generate code which executes when the rule "rp" is reduced. Write the code to "out". Make sure lineno stays up-to-date.

Parameters:

   $out   — 
LemonRule   $rp   — 
   &$lineno   — 

[ Top ]

emit_destructor_code   [line 2659]

void emit_destructor_code( $out, LemonSymbol $sp, &$lineno)

The following routine emits code for the destructor for the

symbol sp


Parameters:

   $out   — 
LemonSymbol   $sp   — 
   &$lineno   — 

[ Top ]

FindActions   [line 1483]

void FindActions( )

Compute the reduce actions, and resolve conflicts.

[ Top ]

FindFirstSets   [line 1206]

void FindFirstSets( )


[ Top ]

FindFollowSets   [line 1908]

void FindFollowSets( )

Compute all followsets.

A followset is the set of all symbols which can come immediately after a configuration.


[ Top ]

FindLinks   [line 1458]

void FindLinks( )

Construct the propagation links

[ Top ]

FindRulePrecedences   [line 1180]

void FindRulePrecedences( )


[ Top ]

FindStates   [line 1278]

void FindStates( )

Compute all LR(0) states for the grammar. Links are added to between some states so that the LR(1) follow sets can be computed later.

[ Top ]

ReportOutput   [line 1769]

void ReportOutput( )

Generate the "y.output" log file

[ Top ]

ReportTable   [line 1941]

void ReportTable( int $mhflag)

Generate C source code for the parser

Parameters:

int   $mhflag   —  Output in makeheaders format if true

[ Top ]

resolve_conflict   [line 1574]

void resolve_conflict( LemonAction $apx, LemonAction $apy, LemonSymbol|null $errsym)

Resolve a conflict between the two given actions. If the conflict can't be resolve, return non-zero.

NO LONGER TRUE: To resolve a conflict, first look to see if either action is on an error rule. In that case, take the action which is not associated with the error rule. If neither or both actions are associated with an error rule, then try to use precedence to resolve the conflict.

If either action is a SHIFT, then it must be apx. This function won't work if apx->type==REDUCE and apy->type==SHIFT.


Parameters:

LemonAction   $apx   — 
LemonAction   $apy   — 
LemonSymbol|null   $errsym   —  The error symbol (if defined. NULL otherwise)

[ Top ]

ResortStates   [line 1708]

void ResortStates( )

Renumber and resort states so that states with fewer choices occur at the end. Except, keep state 0 as the first state.

[ Top ]

translate_code   [line 2565]

void translate_code( LemonRule $rp)

zCode is a string that is the action associated with a rule. Expand the symbols in this string so that the refer to elements of the parser stack.

Parameters:

LemonRule   $rp   — 

[ Top ]


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