Third iteration of QMake parser, looking for a parser generator

Andreas Pakulat apaku at
Thu Jul 5 13:47:59 UTC 2007

On 05.07.07 09:28:55, Adam Treat wrote:
> On Thursday 05 July 2007, Andreas Pakulat wrote:
> > > Let me know if you decide to
> > > write a hand-written lexer. I can send you an example of how I like
> > > to write scanners, you can look at it and decide if you want to use a
> > > similar approach.
> >
> > That would be cool, I've already got an idea how to write it, but that
> > would be using regexps (possibly QRegExp).
> Not that speed is an issue for you

It is an issue as I will have to run the parser each time a file is modified
on disk (i.e. saved). Its not anymore just run during opening the
project. (Although nothing of this is implemented currently).

>, but Roberto's lexers are *much* *much* faster than QRegExp.  They are
>really nifty pieces of code if you ask me.  The way he does keywords is
>genuinely beautiful.

Well, I'll see what he'll send me. I do want to have something fast,
however I also don't want to sit down for 2 hours trying to understand
the lexer everytime I need to change something... Its not about Roberto
producing code that is unreadable, its just about a state-machine in C++
is not as easy to understand - IMHO (especially with various lookups
into tables with just plain numbers) - as some if( regex.match(input)


Don't feed the bats tonight.

More information about the KDevelop-devel mailing list