Folks I'm implementing a weird thing, I have to write a utility to parse a syntax diagram in plain text format and convert it to xml format, the thing basically is identical as this from IBM(like in the "Creating a No-Conversion Job" part): http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls17.htm Typical parser/lexer like ANTLR / yacc/ bison seems cannot deal with this kind of stuff, one idea I have is to convert the syntax diagram to a character bitmap and define some function like more_up,move_down, left, right or so in order to traverse the whole diagram to simulate the understanding process as human naked eye. Tho it sounds not proficient enough, I didn't figure out other better approach. Did anybody once play with a similar scenario? Maybe you could kindly shed some light on this.
Thank you in advance!