今回作ったものをどう簡単に説明できるかわからないけど。id:kmori58さんによるyacc系パーサジェネレータkmyaccを「ベイエリア情報局: PHPのyaccを作ったよ」でbtoさんがPHPに対応させたものをさらに拡張して、クラス形式のパーサを生成できるようにしてみました。 追記: 下のサンプルのhoge.yが壊れてたので修正。 kmyacc.class.php.parser: <?php $meta @ @semval($) $this->yyval @semval($,%t) $this->yyval @semval(%n) $this->yyastk[$this->yysp-(%l-%n)] @semval(%n,%t) $this->yyastk[$this->yysp-(%l-%n)] @include; /* Prototype file of classed PHP p