Arnt Gulbrandsen
Send me mailAbout meAbout this blog
2010-04-26

Parser generators

I have a feeling that most (all?) parser generators are written with one overwhelming goal: Parse fast/well when the grammar and input are both correct.

Other worthwhile goals include: Handle buggy grammars well. Handle errant input well (some generators do try to do this, although I don't know any that both provide automatic fallback mechanisms and good ways to emit appropriate error messages). Provide a pleasant API between the generated parser and the program in which it lives. Leverage the compiler's diagnostics to help correctness as the program and grammar evolve (foo not used, enum value not handled in switch, blah). Lessen the effect of the language boundary, e.g. make it as easy/natural to singlestep the generated parser as the rest of the program.

I am frustrated. Stupid Monday + stupid grammar blah = frustration.

83% PHP

Github thinks aox is 83% PHP. That is even more of an insult than its previous supposition. 60% C might have been misleading, but that error was understandable (it thought cryptlib was part of aox). 83% PHP is just insulting.

Ohloh also smokes the good stuff: Archiveopteryx is GPL'd, thank you so much.

2010-04-22

ReadyNAS NV+, WD Caviar Green disks

WD Caviar Green disks (WD15EADS-00S2B0 in my case) like to unload the drive heads to save power. The ReadyNAS likes to load them again. This causes two problems: Frequent eight-second delays as the drive heads move away from the platters and then back towards them, and in my case, the drives would reach their stated lifetime (300,000 load cycles) in less than a year.

Several solutions exist. (more…)

2010-04-15

My Favicon

The icon was drawn by Brodd Nesset, based on exactly two sentences about what I wanted. I like it very much; it represents exactly what I want it to represent, and in a manner which represents me. Very grateful.

2010-04-07

Chris Lattner rocks

Finally there's a C++ compiler that makes a reasonable attempt at emitting helpful error messages.

Bjarne Stroustrup may have sins to answer for, (more…)

2010-04-03

Git, after all, not perforce

The earlier posts on git and perforce sound as if I'd rather use perforce than git. True in a way. Perforce rocks. It's practically bug-free, for a start — after more than a decade of use I can only remember one bug (using one variant of p4 obliterate made p4 diff report the wrong diff).

But rocking bug-freely isn't enough. (more…)