Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
YYACCEPTを呼び出す前にパーサー バッファをクリアする方法はありますかyacc。
YYACCEPT
yacc
バッファをクリアしないとyyparse、2 回目の呼び出し時に問題が発生します。
yyparse
また、いくつかのグローバル変数を使用しているため、再入可能パーサーを使用できないことに注意してください。
前もって感謝します !!
確かにあります。flex マニュアルのこのセクションを参照してください。具体的には、 を呼び出すYY_FLUSH_BUFFER前に呼び出しyyparseます。
YY_FLUSH_BUFFER