Previous: , Up: 正規表現   [Contents][Index]


35.3.5 正規表現にまつわるトラブル

Emacsのregexp実装は他の多くの類似する実装と同じように概ね堅牢ですが、2つの問題のいずれかを引き起こすことがあります。それはマッチングが内部スタックスペースを使い果たしてエラーをシグナルしたり、完了まで長時間を要するかもしれないという問題です。以下のアドバイスはこれらの症状を軽減して、発生する問題を緩和する助けとなるでしょう。

上記アドバイスにしたがってなおregexpがスタックオーバーフローするようなら、ためらうことなくマッチングを複数の関数呼び出しで行い、それぞれの関数呼び出しではバックトラッキングが容易に含まれるように単純なregexpを使ってください。

Function: re--describe-compiled regexp &optional raw

To help diagnose problems in your regexps or in the regexp engine itself, this function returns a string describing the compiled form of regexp. To make sense of it, it can be necessary to read at least the description of the re_opcode_t type in the src/regex-emacs.c file in Emacs’ source code.

It is currently able to give a meaningful description only if Emacs was compiled with --enable-checking.

This page has generated for branch:master, commit:762705fb24fd90db318f2e51c1e762452d26f7e2 to check Japanese translation.