cpiParsePreviousSibling

目的

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

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

構文

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

パラメーター

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

戻り値

なし。

サンプル

void cpiParsePreviousSibling(
CciParser*     parser,
CciContext* context,
CciElement* element
){
PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ;
int                rc;
while ((!cpiElementCompletePrevious(&rc, cpiParent(&rc, element))) &&
(!cpiPreviousSibling(&rc, element))       &&
(pc->iCurrentElement))
{
pc->iCurrentElement = parsePreviousItem(parser, context, pc->iCurrentElement);
}
if (pc->trace) {
fprintf(pc->tracefile, "PLUGIN: <- cpiParsePreviousSibling()¥n");
fflush(pc->tracefile);
}
return;
}

このコード例は、cpiParseNextSibling で使用されるものに似ています。 ビット・ストリームを右から左に構文解析する際には、上述のコンテキスト内で cpiParsePreviousSibling を使用してください。

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