On Fri, 2012-10-12 at 15:11 +0200, Aziz K. wrote: > Hi, > > I can give you three options to choose from. > > There's the official grammar (don't know what the form is called): > > http://dlang.org/declaration.html > > A Parser Expression Grammar (PEG): > > https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/dparser.d > > The source code comments in my project using a pseudo-BNF format. They > shouldn't be too hard to decipher, but keep in mind that they're not 100% > complete and exact: > > http://dl.dropbox.com/u/17101773/next/2/dil/doc/dil.parser.Parser.html#Parser.parseModuleDecl
I think the official grammar rules in, let's call it K&R grammar, is the only choice here. Rather than scrape from the website is there a file in the Git repository with this grammar rule set? If so then a small program in say, Python ;-), would give a EBNF grammar representation fairly straightforwardly – read grammar ruleset, construct tree representing the ruleset, run visitor over tree to generate EBNF. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part