287mdsahil / lexical_analyzer

JU BCSEIII Compiler Design Project
GNU General Public License v3.0
3 stars 0 forks source link

Thompson construction to output an NFA #2

Closed imraniac closed 4 years ago

imraniac commented 4 years ago

Implement:


287mdsahil commented 4 years ago

Please discuss the data structures used to represent an NFA.

imraniac commented 4 years ago

NFA structure will have

  1. Two maps for epsilon and symbol transition, from one state to another.
  2. An array list: collection of all the NFA states

The NFA state struct will have "isFinal" attribute. Is anything else needs to be added? @pmcarpan

pmcarpan commented 4 years ago

Suggestion: make the Thompson algo a separate class with only static methods?

What do you mean by "isFinal" attr in state struct?