24 lines
406 B
C
24 lines
406 B
C
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "libblang.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 != '!'; ++s.counter);
|
|
|
|
for(;; ++s.counter){
|
|
if(s.chart == (char *)0)
|
|
return (int)s.hand;
|
|
if((op = Ops_lookup(*s.counter)) != NULL)
|
|
op(&s);
|
|
}
|
|
}
|