473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Source code as data structure in repositories.

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?
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #1
8 1987
"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message
news:Np********************@speakeasy.net...
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.
[snip]
Opinions?


My opinion is that your post is not topical for comp.lang.c++,
where the topic is the C++ *language*, not code repositories.

-Mike
Jul 22 '05 #2
Steven T. Hatton wrote:
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?


Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Jul 22 '05 #3
Steven T. Hatton wrote:
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 inquired 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.


These are Software Engineering and compiler design issues
that really are *not* on-topic here in the comp.lang.c++ newsgroup.
But please allow me to attempt to steer you back on-topic
be addressing the issue of C++ class and function template repositories.

The ANSI/ISO C++ standards do not specify how implementations
are to find template definitions and instantiate templates.
Some implementations use repositories for template source code
or some other representation of templates.
This is becoming a serious problem for C++ programmers
because there doesn't appear to be a solution
that is portable everywhere.

Jul 22 '05 #4
Steven T. Hatton wrote:
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 inquired 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.


These are Software Engineering and compiler design issues
that really are *not* on-topic here in the comp.lang.c++ newsgroup.
But please allow me to attempt to steer you back on-topic
be addressing the issue of C++ class and function template repositories.

The ANSI/ISO C++ standards do not specify how implementations
are to find template definitions and instantiate templates.
Some implementations use repositories for template source code
or some other representation of templates.
This is becoming a serious problem for C++ programmers
because there doesn't appear to be a solution
that is portable everywhere.

Jul 22 '05 #5
Thomas Matthews wrote:
Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)


That's a fair question. I have not been writing a lot of code. Mostly
because I don't have the kind of infrastructure to make the process
efficient. That has a lot to do with why I am talking about all this. You
may notice many, but not all, the topics I raise have to do with
development infrastructure.

I don't mean to belittle the extraordinary accomplishments of the KDevelop
team, but there are certain features not even they have found a way to
support. It's beginning to look like there's only one team left in the
league for full featured C++ IDEs. That is _very_ unhealthy for C++.

Because of the way my nervous system is wired, I rely on certain
functionality such as code completion and syntax highlighting more than
most people. Nonetheless, those features are force multipliers for any
programmer who masters them.

Imagine you could type the name of a class in, and hit a key combo to get a
pick list of all the available identifiers in your include path that match.
You could then select the appropriate match and the #include would
automatically be added to your source file.

Perhaps you can do that with VC++. I won't use it. I have my reasons.

But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:

http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

And one last thing. I don't learn the way other people do. I tend to master
things from the top down. I don't get the fine points until I get the big
picture.
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #6
Thomas Matthews wrote:
Out of curiosity, do you write any code or just analyze the
language. I seen many of your posts which analyze the language,
but not many that have code in them.

I would say to stop analyzing the language and just use it. :-)


That's a fair question. I have not been writing a lot of code. Mostly
because I don't have the kind of infrastructure to make the process
efficient. That has a lot to do with why I am talking about all this. You
may notice many, but not all, the topics I raise have to do with
development infrastructure.

I don't mean to belittle the extraordinary accomplishments of the KDevelop
team, but there are certain features not even they have found a way to
support. It's beginning to look like there's only one team left in the
league for full featured C++ IDEs. That is _very_ unhealthy for C++.

Because of the way my nervous system is wired, I rely on certain
functionality such as code completion and syntax highlighting more than
most people. Nonetheless, those features are force multipliers for any
programmer who masters them.

Imagine you could type the name of a class in, and hit a key combo to get a
pick list of all the available identifiers in your include path that match.
You could then select the appropriate match and the #include would
automatically be added to your source file.

Perhaps you can do that with VC++. I won't use it. I have my reasons.

But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:

http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

And one last thing. I don't learn the way other people do. I tend to master
things from the top down. I don't get the fine points until I get the big
picture.
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05 #7
Steven T. Hatton wrote:
But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:
Let me ask you one thing. What do you perceive to be the strength of an
XML representation as opposed to whatever abstract syntax tree the
compiler generates upon a parse? The one Java IDE I have studied in
detail (Eclipse, which is probably one of the best out there) works on
ASTs generated by its internal compiler. XML just seems superfluos.
http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

--
Daniel Sjöblom
Remove _NOSPAM to reply by mail
Jul 22 '05 #8
Steven T. Hatton wrote:
But this topic actually goes beyond that interest. The repository aspect
really wasn't the essential part. It was the data model backing the
displayed source code.

If this is possible, then I _know_ C++ can be defined in an XML grammar
representation:
Let me ask you one thing. What do you perceive to be the strength of an
XML representation as opposed to whatever abstract syntax tree the
compiler generates upon a parse? The one Java IDE I have studied in
detail (Eclipse, which is probably one of the best out there) works on
ASTs generated by its internal compiler. XML just seems superfluos.
http://www.w3.org/TR/MathML2/

I just happen to find the topic both interesting and compelling as regards
it's potential usefullness.

--
Daniel Sjöblom
Remove _NOSPAM to reply by mail
Jul 22 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: FISH | last post by:
Ever have one of those days when you're not sure if it's you who's gone mad, or the rest of the world? I have an Open Source project on SourceForge for communication with YSMG - Yahoo's IM...
8
by: Steven T. Hatton | last post by:
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. ...
0
by: Huihong | last post by:
Please check out our source code search engine here, http://www.codase.com e.g., search main method,...
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
4
by: Thomas Paul Diffenbach | last post by:
Can anyone point me to an open source library of /statically allocated/ data structures? I'm writing some code that would benefit from trees, preferably self balancing, but on an embedded system...
13
by: Naeem | last post by:
What are the ways data can be transported/moved among these Products. SQL Server, Access and Excel. The main ways are: Replication Service, BackUp and Restore, Data Link Server,Import/Export...
8
by: Huihong | last post by:
Please check out our newly released source code search engine here, http://www.codase.com e.g., search socket method call,...
0
by: Huihong | last post by:
Please check out our source code search engine here, http://www.codase.com e.g., search the "main" method,...
0
by: medha1 | last post by:
Are you a programmer? Have you ever had to search for open source code? We are surveying programmers on how they search for open source software on the web, as part of our project at the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.