|
// 全置換による、十進 加算器 + 230 の場合。
// 頭にゼロ詰めして3桁にする
replaceall "\"([0-9]{1})\">" , "\"0\\1\">" , regular;
replaceall "\"([0-9]{2})\">" , "\"0\\1\">" , regular;
// 十の位を加算
replaceall "\"([0-9])0" , "\"+\\13" , regular;
replaceall "\"([0-9])1" , "\"+\\14" , regular;
replaceall "\"([0-9])2" , "\"+\\15" , regular;
replaceall "\"([0-9])3" , "\"+\\16" , regular;
replaceall "\"([0-9])4" , "\"+\\17" , regular;
replaceall "\"([0-9])5" , "\"+\\18" , regular;
replaceall "\"([0-9])6" , "\"+\\19" , regular;
replaceall "\"([0-9])7" , "\"+\\1+0" , regular;
replaceall "\"([0-9])8" , "\"+\\1+1" , regular;
replaceall "\"([0-9])9" , "\"+\\1+2" , regular;
// 桁上がりを吸収
replaceall "(\"\\+)0\\+" , "\\11" , regular;
replaceall "(\"\\+)1\\+" , "\\12" , regular;
// 中間状態マークを消去
replaceall "\"+" , "\"" ;
// 百の位を加算
replaceall "(\")0" , "\\12" , regular;
replaceall "(\")1" , "\\13" , regular;
|
|