michaelinux / mini-java

Automatically exported from code.google.com/p/mini-java
0 stars 0 forks source link

Add FAState and NFAState #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
* FAState
addTransition(FAState, FAState, Object)
getState(Object) : State

* NFAState : FAState
addTransition(FAState, FAState)
closure(Object) : Set<State>

Original issue reported on code.google.com by lemontree.cool on 5 Oct 2008 at 4:05

GoogleCodeExporter commented 9 years ago
* NFAState should inherit from FAState
* both states should have only data and no behavior

Original comment by lemontree.cool on 5 Oct 2008 at 1:38

GoogleCodeExporter commented 9 years ago
* there's actually no needs for FAState. FAState will contain itself; so even if
NFAState can inherit from FAState, it only contains FAState, not NFAState.

Original comment by lemontree.cool on 8 Oct 2008 at 1:39

GoogleCodeExporter commented 9 years ago
TestHelper.getNFAState(Character) : NFAState
* creates a new NFAState if there's none
* returns the NFAState corresponding to that Character

Original comment by lemontree.cool on 8 Oct 2008 at 1:43

GoogleCodeExporter commented 9 years ago
TestHelper:
* private createTransition
* private testTransition
* private parseTransition

Original comment by lemontree.cool on 8 Oct 2008 at 1:46

GoogleCodeExporter commented 9 years ago
should be called StateV2

Original comment by lemontree.cool on 8 Oct 2008 at 1:51

GoogleCodeExporter commented 9 years ago
in the implementation of equals(), one shouldn't use HashMap or TreeMap. since 
if
there's a loop, it gonna cause infinite recursions.

Original comment by lemontree.cool on 8 Oct 2008 at 2:01

GoogleCodeExporter commented 9 years ago
use IdentityMap

Original comment by lemontree.cool on 8 Oct 2008 at 2:02

GoogleCodeExporter commented 9 years ago

Original comment by lemontree.cool on 12 Oct 2008 at 9:17