kfind문서

내부 구조 · scan

matcher

Matcher는 byte anchor를 넓게 찾고 program verifier로 형태 조건을 좁힙니다.

anchor index

여러 program이 같은 anchor를 공유하면 automaton state와 hit list를 공유합니다. Anchor는 candidate coverage를 보존하는 범위에서 길고 희소한 surface를 우선합니다.

NFC와 NFD variant는 별도 byte pattern이지만 같은 logical program과 source span projection으로 연결됩니다.

후보 window

Hit offset에서 core가 시작·끝날 수 있는 제한된 window만 검사합니다. 조사어미 automaton은 suffix Unicode scalar를 전이하며 불완전한 소비를 거부합니다.

Structural verifier는 token 전체가 필요한 경우에만 compact resource index를 조회합니다.

match 선택

같은 start에서 여러 program이 승인되면 더 긴 완성 token과 결정적 program key를 사용해 non-overlap 결과를 만듭니다. Origin은 손실 없이 합칩니다.

Phrase mode에서는 atom 후보를 먼저 보존한 뒤 순서와 gap을 적용하므로 단일 atom의 최장 match가 다음 atom을 숨기지 않습니다.