作成したTokenizer.phpの差分
「phpLex.exeのコンパイル通った! - maru.cc@はてな」の続き。
cvsから落としてきた Tokenizer.lex から作成した Tokenizer.php とのdiff。
$ diff Tokenizer.php Tokenizer2.php 19c19 < // $Id: Tokenizer.php,v 1.61 2005/05/14 04:01:41 alan_k Exp $ --- > // $Id: Tokenizer.lex,v 1.63 2005/05/14 04:01:41 alan_k Exp $ 193a194 > var $_fatal = false; 319c320 < "Error: Unmatched input.\n" --- > "Error: Unmatched input - \"" 326,327c327,333 < return $this->raiseError($code, $this->yy_error_string[$code], $fatal); < } --- > $this->_fatal = $fatal; > $msg = $this->yy_error_string[$code]; > if ($code == 1) { > $msg .= $this->yy_buffer[$this->yy_buffer_start] . "\""; > } > return $this->raiseError($msg, $code, $fatal); > } 3187a3194,3196 > if ($this->_fatal) { > return; > } 3195,3197c3204,3209 < if ($yy_last_accept_state < 419) { < $this->yy_error(YY_E_INTERNAL, false); < } --- > if ($yy_last_accept_state < 419) { > $this->yy_error(YY_E_INTERNAL, false); > if ($this->_fatal) { > return; > } > } 4317a4330,4332 > if ($this->_fatal) { > return; > }
Tokenizer2.php が今回作成したものです。
見やすいようにインデントのスペースを4→2に変更しています。
ちなみに、PEARから落としてきたFlexyのバージョンは、1.3.3
Tokenizer.lexのcvsのリビジョンは Revision 1.63