(2012/02/28 2:24), d coder wrote:
Is it possible to parse any EBNF of arbitrary complexity using your
parser generator?

Yes, but some rewrites is required.

1) If your EBNF have (indirect) left recursion, you have to eliminate it because the DSL which ctpg uses to generate parser is based on PEG, parsing expression grammar.
For details, see: http://en.wikipedia.org/wiki/Parsing_expression_grammar .

2) As the example of parsing simple arithmetic expression shows, the parser generated by ctpg have type such as int and string. EBNF doesn't have type system so you have to add appropriate type conversion into your EBNF.

Thanks,
Hisayuki Mima

Reply via email to