C# Class QUT.Gplex.Automaton.NFSA.NState

This class represents a state in the NFSA each state has an array of transitions on a particular character value, and a list *and* bitarray of epsilon transitions. We want to go "for every epsilon do" and also do bitwise boolean ops.
Exibir arquivo Open project: spark-shading-language/spark

Public Methods

Method Description
AddChrTrns ( int chr, QUT.Gplex.Automaton.NState nxt ) : void

Add a transition from NState "this" to NState "nxt", for the character "chr". If the characters are packed, transform from character ordinal to equivalence class ordinal.

AddClsTrans ( Leaf leaf, QUT.Gplex.Automaton.NState nxt ) : void

Add a transition from NState "this" to NState "nxt", for each character value in the leaf range list. If the characters are packed, transform from character ordinal to equivalence class ordinal.

AddEpsTrns ( QUT.Gplex.Automaton.NState nxt ) : void

Add an epsilon transition from "this" to "nxt"

NState ( NfsaInstance elem ) : System

Private Methods

Method Description
AddClsTrans ( BitArray cls, QUT.Gplex.Automaton.NState nxt ) : void

Add a transition from "this" to "next" for every true bit in the BitArray cls

AddRawTransition ( int ord, QUT.Gplex.Automaton.NState nxt ) : void

Add a transition to the NState. Assert: if the symbol ordinals are packed the mapping has already been performed

GetNext ( int sym ) : QUT.Gplex.Automaton.NState
SetNext ( int sym, QUT.Gplex.Automaton.NState dstState ) : void

Method Details

AddChrTrns() public method

Add a transition from NState "this" to NState "nxt", for the character "chr". If the characters are packed, transform from character ordinal to equivalence class ordinal.
public AddChrTrns ( int chr, QUT.Gplex.Automaton.NState nxt ) : void
chr int The character value
nxt QUT.Gplex.Automaton.NState The destination state
return void

AddClsTrans() public method

Add a transition from NState "this" to NState "nxt", for each character value in the leaf range list. If the characters are packed, transform from character ordinal to equivalence class ordinal.
public AddClsTrans ( Leaf leaf, QUT.Gplex.Automaton.NState nxt ) : void
leaf QUT.Gplex.Parser.Leaf The regex leaf node
nxt QUT.Gplex.Automaton.NState The destination state
return void

AddEpsTrns() public method

Add an epsilon transition from "this" to "nxt"
public AddEpsTrns ( QUT.Gplex.Automaton.NState nxt ) : void
nxt QUT.Gplex.Automaton.NState Destination state
return void

NState() public method

public NState ( NfsaInstance elem ) : System
elem NfsaInstance
return System