Alright my friend, as per your application requirements, it is similar to the compiler which I have designed for generation of graphics . In your case, the values which the user will pass in will be parsed by my code or program, and will be automatically formatted in an XML output document format. Now as the XML uses a standard rule in XML document, so I just need to convert that rules in to the C-grammar according to which the user input will be analyzed and formatted.