Bug 3597 – Need single source for parser and documentation grammar.
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-12-07T10:00:00Z
Last change time
2014-02-13T00:47:39Z
Keywords
spec
Assigned to
nobody
Creator
shro8822
Comments
Comment #0 by shro8822 — 2009-12-07T10:00:34Z
In light of all the recent grammar documentation issues; I'm going to suggest that either the parser or the BNF documentation or both need to be generated from a single source.
Given that Walker is unlikely to dump his hand written parser, the most likely solution would be to somehow extract the grammar from the parser source and insert it into the docs as a set of macros.
Comment #1 by dfj1esp02 — 2009-12-09T04:24:46Z
From *code*? o.O
Comment #2 by shro8822 — 2009-12-09T10:10:58Z
From general code it would be crazy to attempt it, but IIRC the parser code is very regular. With some refactoring it might be possible to make it regular enough to extract the grammar mechanically.
Comment #3 by clugdbug — 2010-01-27T02:44:53Z
Changing this to enhancement since there's actually no identified bug.