Skip to content

A lex program which convert NFA to DFA and simulate DFA using its transtion table. and return matches or not

Notifications You must be signed in to change notification settings

B16CS006/NFA_to_DFA_Subset_Construction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# NFA to DFA conversion

The exercise to convert NFA to DFA using subset construction.

Our lexical analyzer should be named as mylex and should take the following intput as command line arguments.

	-> number of states
	-> number of final states
	-> number of input symbols(i.e. alphabet size)

If other than given input are given as input than the program is terminated

While reading the specification file
	reading table we don't read the first row and first char of each row

INPUT:
	Input is read from a file named input.txt

OUTPUT:
	Output is printed to screen as MATCHED( if matches) and ERROR (if not matches) and also the new DFA table


Lex program file :	source.l
executable file	 :	mylex
input file	 :	input.txt
specification file:	specification.txt

-> Just run the following command to make an executable file
	make

-> To clean the unnecessary file run the following command
	make clean

-> To run the executable file type follwing command (note that exe file is present in the directory.)
	./mylex (number of state) (number of final state) (number of input symbols)



About

A lex program which convert NFA to DFA and simulate DFA using its transtion table. and return matches or not

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published