File: turng.h

package info (click to toggle)
cmix 2.0.11-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,224 kB
  • ctags: 5,925
  • sloc: cpp: 29,558; ansic: 11,452; yacc: 2,020; sh: 1,795; makefile: 1,228; lex: 484; perl: 278
file content (29 lines) | stat: -rw-r--r-- 627 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _TURNG_H
#define _TURNG_H

typedef int InstructionTag;
#define Left     0 /* Left        */
#define Right    1 /* Right       */
#define Write    2 /* Write a     */
#define Goto     3 /* Goto  i     */
#define IfGoto   4 /* If a Goto i */
#define Stop     5 /* Stop        */
#define ReadGoto 6 /* ReadGoto    */

typedef struct Instruction {
  InstructionTag tag; 
  char a;
  int i;
} Instruction;

#define MAXINSTRS 31

extern int instrs;

extern Instruction instruction[MAXINSTRS];

void readTuringProgram(char* filename);
void printstatus(char*, int);
#pragma cmix pure: readTuringProgram() printstatus()

#endif