정의 대상 | 유형 | 구성원 |
CPI_VFT | 필수 | iFpParseLastChild |
void cpiParseLastChild( CciParser* parser, CciContext* context, CciElement* currentElement);
없음
다음 예는 샘플 구문 분석기 파일 BipSampPluginParser.c에서 발췌한 것입니다(515 - 544행).
void cpiParseLastChild( CciParser* parser, CciContext* context, CciElement* element ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int rc; if ((cpiElementType(&rc, element) == CCI_ELEMENT_TYPE_NAME)) { while ((!cpiElementCompleteNext(&rc, element)) && (pc->iCurrentElement)) { pc->iCurrentElement = parseNextItem(parser, context, pc->iCurrentElement); } } if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: <- cpiParseLastChild()\n"); fflush(pc->tracefile); } return; }
이 코드의 목적은 마지막 하위 요소에 도달할 때까지 요소의 하위 요소를 구분 분석하는 것입니다. 요소의 마지막 하위 요소 비트스트림에서 정확한 오프셋을 모르는 경우 이러한 종류의 구조를 구문 분석기에 사용할 수 있습니다.