Admin Production rocket
Current Publication

統合プリプロセッサのサンプル

Enterprise Developer for Eclipse (including UNIX Components) (Japanese) V7.0
Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

統合プリプロセッサのサンプル

注: この統合プリプロセッサはネイティブ COBOL 用にのみサポートされます。

スタック可能な統合プリプロセッサのサンプルは、Visual COBOL サンプル ブラウザー ([All > Prep (Eclipse)]) で利用できます。Visual COBOL サンプル ブラウザーを起動する方法については、「サンプル ブラウザーを起動するには」を参照してください。その後、サンプルの readme の指示に従い、プリプロセッサをビルドしてデバッグします。

このプリプロセッサのサンプルを他のプリプロセッサのベースとして使用し、次を実演できます。

  • プリプロセッサを起動してソース入力を開く方法
  • ソースを修正しないでコンパイラに渡す方法
  • ソースを修正してコンパイラに渡す方法
  • COPY 文を処理する方法
  • 警告およびエラーを生成する方法
  • プリプロセッサのスタック方法。ここでは CP を使用します(CP は COPY REPLACING やその他の複雑な解析を処理するために使用できます)。

プリプロセッサのサンプルの説明

このプリプロセッサのサンプルでは、動詞を次のように認識して処理します。

  • MOV は MOVE に変換する
  • DIS は 2 行に変換する。1 行目は空白行の DISPLAY、2 行目は元の行の動詞 DIS を DISPLAY に変更した行です。
  • RETRIEVE を COPY に変換し、プリプロセッサによって展開する