Formal grammar of XML
问题 Im trying to build small parser for XML files in C. I know, i could find some finished solutions but, i need just some basic stuff for embedded project. I`m trying to create grammar for describing XML without attributes, just tags, but it seems it is not working and i was not able to figure out why. Here is the grammar: XML : FIRST_TAG NIZ NIZ : VAL NIZ | eps VAL : START VAL END | STR | eps Here is part of C code that implement this grammar : void check() { getSymbol(); if( sym == FIRST_LINE