Table of Contents

Class: FSMachine Zope-2.2.1-src/lib/python/Products/ZGadflyDA/gadfly/kjParser.py

the FSM class

Methods   
DUMP
Expects
NewState
SetMap
SetReduction
__init__
map
  DUMP 
DUMP (
        self,
        DumpMapData=1,
        DumpStateData=1,
        ForbiddenMark={},
        )

ForbiddenMark is for filtering out maps to an error state

  Expects 
Expects ( self,  State )

what tokens does a state expect?

  NewState 
NewState (
        self,
        kind,
        AdditionalInfo=[],
        )

"allocate" a new state of specified kind kind must either be TRANSFLAG, TERMFLAG or a rule object returns the number of the new state

Exceptions   
TypeError
  SetMap 
SetMap (
        self,
        fromState,
        TokenRep,
        toState,
        )

Install a "shift" or "goto transition in the FSM: supports nondeterminism by storing a sequence of possible transitions

Exceptions   
NondetError
  SetReduction 
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.

Exceptions   
ReductError
  __init__ 
__init__ ( self,  rootNonTerm )

Evaluate determines whether rules should be evaluated after reductions. Context is an argument passed to the list reduction function

  map 
map (
        self,
        current_state,
        current_token,
        )

Find the action indicated by fsm on (current_state, current_token) input.

note: in the event of nondeterministic choice this chooses the first possibility listed. ParseObj.DoOneReduction() currently uses the internal structure of StateTokenMap directly, rather than using this function.

Exceptions   
FlowError

Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6