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 마지막 갱신 날짜: 2006/08/21
as08070_