S
Steven T. Hatton
There was recently some discussion of storing source code in databases. To
some extent that is a rather common practice. CVS, for example, provides a
means of storing source code in a database. In that case, the database
management system is indifferent to the type of file stored. There are
reasons not to store certain kinds of data in CVS, but in principle CVS
doesn't care.
An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I enquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code. If
source code were represented as and XML DOM object backing the edit buffer
of an IDE, it could certainly be stored using the same or a very similar
approach as that used by XML databases.
Before you reject the idea of representing C++ source code as XML, consider
MathML. The language of mathematics is huge in comparison to C++. If such
a thing can be done for mathematics, addressing not only syntax, but also
presentation, it can certainly be done for C++. The actual XML may never be
useful, but the DOM API, as well as the XML processing technology may prove
invaluable to managing C++ source.
Opinions?
some extent that is a rather common practice. CVS, for example, provides a
means of storing source code in a database. In that case, the database
management system is indifferent to the type of file stored. There are
reasons not to store certain kinds of data in CVS, but in principle CVS
doesn't care.
An example of a mechanism for storing more structured document information
is provided by XML databases such as XMLDB, Xindice, XML Cannon, etc. Not
too long ago I enquired on the Xerces C mailing list as to the availability
of a means of validating XML against BNF, or converting the C++ grammar
into an XML Schema which could then be used to validate source code. If
source code were represented as and XML DOM object backing the edit buffer
of an IDE, it could certainly be stored using the same or a very similar
approach as that used by XML databases.
Before you reject the idea of representing C++ source code as XML, consider
MathML. The language of mathematics is huge in comparison to C++. If such
a thing can be done for mathematics, addressing not only syntax, but also
presentation, it can certainly be done for C++. The actual XML may never be
useful, but the DOM API, as well as the XML processing technology may prove
invaluable to managing C++ source.
Opinions?