25 lines
404 B
C
25 lines
404 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 = s.chart;
|
|
|
|
for(s.counter = s.chart; ; ++s.counter){
|
|
if(s.chart == (char *)0)
|
|
return (int)s.hand;
|
|
if((op = Ops_lookup(*s.counter)) == NULL)
|
|
return 127;
|
|
else
|
|
op(&s);
|
|
}
|
|
}
|