diff --git a/src/table.c b/src/table.c index f8aafd7..6968a18 100644 --- a/src/table.c +++ b/src/table.c @@ -33,6 +33,21 @@ void fillTable() { table[1]['o'] = 2; table[2]['\n'] = ACCEPT; + table[2][' '] = START; + + table[START]['d'] = 1; + table[1]['x'] = 2; + table[1]['y'] = 2; + table[2]['='] = 3; + table[3]['-'] = 4; + for (int i = '0'; i <='9'; i++) { + table[3][i] = 5; + table[4][i] = 5; + table[5][i] = 5; + } + table[5]['\n'] = ACCEPT; + table[5][' '] = START; + // TODO Expand the table to pass (and fail) the described syntax // table[...][...] = ...