cpiParseFirstChild

目的

指定した構文エレメントの最初の子を構文解析します。 これは、現行の構文エレメントの最初の子エレメントが必要な場合に、ブローカーによって呼び出されます。

定義されている場所 タイプ メンバー
CPI_VFT 必須 iFpParseFirstChild

構文

void cpiParseFirstChild(
  CciParser*     parser,
  CciContext* context,
  CciElement*  currentElement);

パラメーター

parser
パーサー・オブジェクトのアドレス (入力)。
context
パーサー・オブジェクトが所有するコンテキストのアドレス (入力)。
currentElement
現行の構文エレメントのアドレス (入力)。

戻り値

なし。

サンプル

この例は、サンプル・パーサー・ファイル BipSampPluginParser.c から取られています (477 行から 508 行)。

void cpiParseFirstChild(
  CciParser*     parser,
  CciContext* context,
  CciElement* element
){
  PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
  int                rc;

  if ((!cpiElementCompleteNext(&rc, element)) &&
      (cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME)) {

    while ((!cpiElementCompleteNext(&rc, element))     &&
           (!cpiFirstChild(&rc, element)) &&
           (pc->iCurrentElement))
    {
      pc->iCurrentElement = parseNextItem(parser, context, pc->iCurrentElement);
    }
  }

  if (pc->trace) {
    fprintf(pc->tracefile, "PLUGIN: <- cpiParseFirstChild()¥n");
    fflush(pc->tracefile);
  }

  return;
}
関連概念
ユーザー定義のパーサー
ユーザー定義拡張機能
関連タスク
C でのパーサーの作成
関連資料
cpiParseLastChild
C パーサー・インプリメンテーション関数
特記事項 | 商標 | ダウンロード | ライブラリー | サポート | フィードバック
Copyright IBM Corporation 1999, 2006 最終更新: 08/21/2006
as08080_