27 lines
415 B
C
27 lines
415 B
C
|
#ifndef _PROGRAM_H
|
||
|
#define _PROGRAM_H
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#include "table.h"
|
||
|
#include "program.h"
|
||
|
|
||
|
#define LINE_LEN 100
|
||
|
#define SYMBOL_LEN 20
|
||
|
#define STATE_LEN 20
|
||
|
|
||
|
struct instruction
|
||
|
{
|
||
|
int state;
|
||
|
int symbol;
|
||
|
int write;
|
||
|
short int move;
|
||
|
int nextstate;
|
||
|
};
|
||
|
|
||
|
struct table *program_new();
|
||
|
int program_load(FILE *f, struct table *prg, struct table *st, struct table *sym);
|
||
|
|
||
|
#endif
|