EBNF for D? (sed script etc.)

BCS BCS at pathlink.com
Fri Mar 28 10:49:08 PDT 2008


Paul D Anderson wrote:
> BCS Wrote:
> 
>>As for part 1, the grammar is incomplete and wrong, but only in a few 
>>tiny places. I'm working on fixing them and am going to submit a patch 
>>to Walter in a few days. This is a result of something connected with 
>>part 2; I have a sed script that extracts the grammar from the HTML and 
>>converts it to EBNF (or a dialect there of) I'll release it if anyone is 
>>interested.
>>
> 
> 
> Thanks. I look forward to it.
> 
> Paul

It's posted:

http://www.dsource.org/projects/scrapple/browser/trunk/dparser

the relevant files are: "cut_gram2" and and "gram.sed".

"cut_gram2" is a bash script that runs the sed script and does a little 
filtering. Call it from the directory containing the .html docs or pass 
it the directory as the first arg.

The output will end up in "gram.inp" and isn't quite right (formatting 
errors and whatnot) I have another program that will convert it to 
something usable (and also factor out left recursions) but it's not 
ready for posting.

p.s. It is intended to be run on the doc as patched by me. With any 
luck, Walter will get my edits in post haste.



More information about the Digitalmars-d mailing list