Though I think the definition of the parser struct should be
struct parser { const char* s; const char* p; struct grid* g; };
Though I think the definition of the parser struct should be
based on the rest of the code.