Thread overview
[Issue 3597] New: Need single source for parser and documentation grammar.
Dec 07, 2009
BCS
Dec 09, 2009
Sobirari Muhomori
Dec 09, 2009
BCS
Jan 27, 2010
Don
December 07, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3597

           Summary: Need single source for parser and documentation
                    grammar.
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: shro8822@vandals.uidaho.edu


--- Comment #0 from BCS <shro8822@vandals.uidaho.edu> 2009-12-07 10:00:34 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3597



--- Comment #1 from Sobirari Muhomori <dfj1esp02@sneakemail.com> 2009-12-09 04:24:46 PST ---
From *code*? o.O

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3597



--- Comment #2 from BCS <shro8822@vandals.uidaho.edu> 2009-12-09 10:10:58 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 27, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3597


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au
           Severity|normal                      |enhancement


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2010-01-27 02:44:53 PST ---
Changing this to enhancement since there's actually no identified bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=3597


brian-schott@cox.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brian-schott@cox.net


--- Comment #4 from brian-schott@cox.net 2013-05-30 13:51:55 PDT ---
I'm making an attempt at documenting the grammar here:

https://github.com/Hackerpilot/DGrammar/blob/master/D.g4

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------