Package lemon :: Package external :: Package gadfly :: Module kjParseBuild :: Class CFSMachine
[show private | hide private]
[frames | no frames]

Class CFSMachine

FSMachine --+
            |
           CFSMachine


a derived FSM class, with closure computation methods defined
(compilable FSMachine)

Method Summary
  __init__(self, nonterm)
  Eclosure(self, Epsilon, DoNullMaps)
return the epsilon closure of the FSM as a new FSM...
  NewSetState(self, kind, InSet)
add an set-marked state to self if not present...
    Inherited from FSMachine
  DUMP(self, DumpMapData, DumpStateData, ForbiddenMark)
ForbiddenMark is for filtering out maps to an error state...
  Expects(self, State)
what tokens does a state expect?...
  map(self, current_state, current_token)
Find the action indicated by fsm on (current_state, current_token) input.
  NewState(self, kind, AdditionalInfo)
"allocate" a new state of specified kind...
  SetMap(self, fromState, TokenRep, toState)
Install a "shift" or "goto transition in the FSM:...
  SetReduction(self, fromState, TokenRep, Rulenum)
Install a reduction transition in the FSM: a reduction is represented by mapping to a rule index no nondeterminism is allowed.

Method Details

Eclosure(self, Epsilon, DoNullMaps=0)

return the epsilon closure of the FSM as a new FSM

DoNullMap, if set, will map unexpected tokens to
the "empty" state (usually creating a really big fsm)

NewSetState(self, kind, InSet)

add an set-marked state to self if not present
uses self.States[s][1] as the set marking the state s

only used by Eclosure above

Generated by Epydoc 2.0 on Mon Nov 10 15:07:44 2003 http://epydoc.sf.net