diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2020-11-19 17:51:05 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2020-11-19 17:51:05 +0000 |
commit | 12e75ea93823cee60843a967d5f38e53622c3125 (patch) | |
tree | df90172ef97a6136438ccc463812ad7f08ceaee7 /qm.h | |
parent | 1b51acd8802543fdb53b490ff16b085eb89aba11 (diff) | |
download | Quine-McCluskey-12e75ea93823cee60843a967d5f38e53622c3125.tar.gz Quine-McCluskey-12e75ea93823cee60843a967d5f38e53622c3125.zip |
added parsing from string into structs and added print func
Diffstat (limited to 'qm.h')
-rw-r--r-- | qm.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#ifndef QM_C +#define QM_C + +#include <string.h> + +typedef struct { + char var; + bool not_; +} Variable; + +typedef struct { + unsigned int numVars; + Variable vars[26]; +} DNFTerm; + +typedef struct { + unsigned int numTerms; + DNFTerm terms[100]; +} DNF; + +unsigned int strcnt(const char* str, const char cnt); +DNF parseDNFStr(const char* inpStr); +DNFTerm parseDNFTerm(const char* termStr); +void printForm(const DNF form); +void printForm2(const DNF form); + +#endif
\ No newline at end of file |