Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/cmd/upas/bayes/dfa.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/*
 * Deterministic regexp program.
 */
typedef struct Dreprog Dreprog;
typedef struct Dreinst Dreinst;
typedef struct Drecase Drecase;

struct Dreinst
{
	int isfinal;
	int isloop;
	Drecase *c;
	int nc;
};

struct Dreprog
{
	Dreinst *start[4];
	int ninst;
	Dreinst inst[1];
};

struct Drecase
{
	uint start;
	Dreinst *next;
};

Dreprog* dregcvt(Reprog*);
int dregexec(Dreprog*, char*, int);
Dreprog* Breaddfa(Biobuf *b);
void Bprintdfa(Biobuf*, Dreprog*);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].