Revert "Use char instead of int for FSA rule input"
This reverts commit eb22abfb1b.
This commit is contained in:
@@ -8,9 +8,14 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define CHAR_COUNT 256
|
||||
#define ALPHABET_SIZE (CHAR_COUNT + 1)
|
||||
|
||||
// Use one more than any valid char to represent empty string
|
||||
#define EPSILON CHAR_COUNT
|
||||
|
||||
typedef struct {
|
||||
int next;
|
||||
char input;
|
||||
int input, next;
|
||||
} fsa_rule_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -28,6 +33,6 @@ void fsa_init(fsa_t *fsa);
|
||||
void fsa_free(const fsa_t *fsa);
|
||||
|
||||
int fsa_add_state(fsa_t *fsa);
|
||||
void fsa_add_rule(fsa_t *fsa, int from, int to, char input);
|
||||
void fsa_add_rule(fsa_t *fsa, int from, int to, int input);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user