287mdsahil / lexical_analyzer

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

Add thompson algo and changes in nfa #9

Closed imraniac closed 4 years ago

imraniac commented 4 years ago

Resolves #2 and minor modification to #8

pmcarpan commented 4 years ago

Apart from the above two changes, more or less, LGTM. Some braces can be omitted, but that can be handled later if required.

The methods for kleene, union and concat seem a little too long to me. Its okay, but can they be modularized? Like the renumbering part can be made into a separate function.

imraniac commented 4 years ago

Can create separate functions for copying the transitions in kleene and union methods

pmcarpan commented 4 years ago

Can create separate functions for copying the transitions in kleene and union methods

Okay. You can also do this in a future PR, if required. No pressure of doing it now.

Probably a general function can be made to cover all the three operators.