toge's diary

コンピュータ関連の趣味をつらつらと。

XCC0.5.1 yaccのXML版

http://freshmeat.net/projects/xcc/

SAXをXMLのlexと考えると、yaccがないじゃないかぁ〜という至極全うな考え方で作成されているみたいです。
なぜかHomepageがなくてどきどきしてしまいますが、もの自体は普通に動きますね。
ルールもXMLで書くことになっていて、これを書くのがちと面倒臭いな。

In the XML world, there are a few packages which fill in the role of lex (expat and libxml are the most known), but the high-level grammar parsing is usually done by a hand-written code; writing such a parser is a tedious and error-prone task.

というのには、うなずくしかないです。