Some crap
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
n0bdy 0833873e27 first 9 months ago
bin first 9 months ago
scanner first 9 months ago
tests first 9 months ago
work first 9 months ago
Makefile first 9 months ago
README first 9 months ago
dfa.c first 9 months ago
dfa.h first 9 months ago


DFA README - 20170124

* The following program requires flex and gcc to build. There is an included Makefile to simplify the build process.
* DFA requires two arguments, a file to read for the structure of the DFA and string to check. The syntax looks like:

$ ./dfa -f $FILE -s$STRING

*NOTE: The string following the -s option CANNOT have a space
* Optionally, -q can be given to quiet the output so that it only prints whether the string was ACCEPTED or REJECTED.
* The configuration file requires a set of states, an alphabet, a set of zero or more accept states and transition
arrows between states. There are sample configuration files located in the test/ directory.

#Configuration File Syntax:

* The states are defined by Q={q0,q1,...,qn}.
** NOTE: The FIRST state listed is considered the INITIAL STATE.
* The alphabet is defined with ALPH={a,b,...,n}
* The accept states are defined with A={q0,q1,...,qn}
* Transitions are defined by the ARROWS={ field
** The beginning of transitions must be the START and STOP state. After any number of characters from the alphabet
may be listed.
** There can only be one transition between two states per line (though multiple characters with identical
transitions can be listed).
q0,q3,b,d,c,h <---- OKAY
q0,q1,b q3,q4,c <---- ERROR

* The ARROWS variable must be set in the configuration file AFTER Q, ALPH and A.
* There cannot be spaces between sets. Q={ q0,q3 } will generate an error.
* Certain characters must be quoted in the configuration file to be accepted in the alphabet and transition states.
** This includes "#", "{", " ", "," and "}"