cpiParseNextSibling

目的

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

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

構文

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

パラメーター

parser
パーサー・オブジェクトのアドレス (入力)。
context
プラグイン・コンテキストのアドレス (入力)。
currentElement
現行の構文エレメントのアドレス (入力)。

戻り値

なし。

サンプル

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

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

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

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

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