This is my favorite programming language. I'll put some of my projects here when I have some spare time. Most sources are for the linux/unix platform. But I'll also include some Visual C++ sources (again when I have the time).
- My first bison++/flex++ project:
A little xml parser similar to the domdocument of Qt from trolltech. The reasons for writing this include:
- Getting experience with bison++/flex++
- Learning more about xml.
- XML libraries like libxml and expat for the C++ platform, are too large for my simple needs or not free of licenses.
This little xml parser does most things qdomdocument of qt can do, just in a little different way. You can give the parser an istream and it generates a n-tree which can be traversed containing a set of different nodes. So you might say it's a simplified DOM (Document Object Model) implementation. As a little extra it turned out to be 4 times as fast as the Qt DOM implementation .
Here are the sources (download and install bison++ if you don't have it yet):
- xmlparser.tar.gz (last updated 6/5/2002)
- ftp://ftp.uncg.edu/people/wlestes/ (latest flex). but has bug with istream/ostream and the latest version has problems with generating classes (error: redefinition of class yyFlexLexer. I patched version 2.5.4a myself and this compiles/works fine on my ubuntu running gcc 4.0.3 and generating a flex class. You can get it here flex 2.5.4 patched for new gcc 4.x (last updated 10/10/2006).
- Next up is a modification of http://baseml.nerdhero.org.
Here we plugged the xml parser into an existing project which used the Qt library domdocument classes. By doing this we could remove all qt code from the project and the resulting baseml-noqt is 400% faster than the original.
This contains everything you need just do a ./configure, make and make install
- baseml-0.3-1.tar.gz (last updated 20/2/2002)
- RPM's and latest sources available at http://baseml.nerdhero.org
Ever wondered how to write an interpreter? Well I started a little project on sourceforge which tries to provide the most simple solution for this goal. No need for lex/yacc, just a few simple classes to give a fully functional interpreter. The syntax is a bit like pascal and it supports functions (recursive etc..), for loops, while, if else etc... I started a new page for it here where I might put up the syntax/semantics if I ever find the time which seems to be going much faster for me these days