String Manipulation in C
- by baris_a
Hi guys, I am helping my nephew for his C lab homework, it is a string manipulation assignment and applying Wang's algorithm.
Here is the BNF representation for the input.
<sequent> ::= <lhs> # <rhs>
<lhs> ::= <formulalist>| e
<rhs> ::= <formulalist>| e
<formulalist> ::= <formula>|<formula> , <formulalist>
<formula> ::= <letter>| - <formula>| (<formula><in?xop><formula>)
<in?xop> ::= & | | | >
<letter> ::= A | B | ... | Z
What is the best practice to handle and parse this kind of input in C? How can I parse this structure without using struct? Thanks in advance.