25 lines
400 B
C
25 lines
400 B
C
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "blang.h"
|
|
#include "ops.h"
|
|
|
|
int main(int argc, char **argv){
|
|
struct State s;
|
|
int c;
|
|
void (*op)(struct State *);
|
|
|
|
s.chart = *(argv+1);
|
|
s.counter = 0;
|
|
|
|
for(s.counter = 0; ; ++s.counter){
|
|
if(s.chart == (char *)0)
|
|
return (int)s.hand;
|
|
if((op = Ops_lookup(s.chart[s.counter])) == NULL)
|
|
return 127;
|
|
else
|
|
op(&s);
|
|
}
|
|
}
|