Lines Matching full:spho
123 * - FEED : feeds one item and returns to spho->feedFollowState
165 * shortcut : spho
247 spho_subobj_t * spho;
253 spho = (spho_subobj_t *) this->subObj;
255 spho->curFst = 0;
258 spho->procState = SPHO_STEPSTATE_INIT;
259 spho->needMoreInput = TRUE;
260 spho->suppressParseWordBound = FALSE;
261 spho->suppressRecombWordBound = FALSE;
262 spho->breakPending = FALSE;
263 spho->force = 0;
264 spho->sentenceStarted = 0;
268 spho->headxBufSize = SPHO_MAXNR_HEADX;
269 spho->headxReadPos = 0;
270 spho->headxWritePos = 0;
272 spho->cbufWritePos = 0;
273 spho->cbufBufSize = SPHO_MAXSIZE_CBUF;
276 spho->phonBuf = spho->phonBufA;
277 spho->phonBufOut = spho->phonBufB;
278 spho->phonReadPos = 0;
281 spho->activeStartPos = 0;
282 spho->penultima = SPHO_POS_INVALID;
283 spho->activeEndPos = SPHO_POS_INVALID;
292 spho_subobj_t * spho;
304 spho = (spho_subobj_t *) this->subObj;
306 spho->numFsts = 0;
308 spho->curFst = 0;
313 spho->fst[spho->numFsts++] = fst;
316 spho->fixedIds = picoktab_getFixedIds(this->voice->kbArray[PICOKNOW_KBID_FIXED_IDS]);
317 spho->phones = picoktab_getPhones(this->voice->kbArray[PICOKNOW_KBID_TAB_PHONES]);
319 spho->syllSepId = picoktab_getSyllboundID(spho->phones);
320 spho->primStressId = picoktab_getPrimstressID(spho->phones);
321 spho->secondStressId = picoktab_getSecstressID(spho->phones);
323 PICODBG_DEBUG(("got %i fsts", spho->numFsts));
345 spho_subobj_t * spho;
347 spho = (spho_subobj_t *) this->subObj;
351 spho = (spho_subobj_t *) (this->subObj);
352 picotrns_deallocate_alt_desc_buf(spho->common->mm,&spho->altDescBuf);
363 spho_subobj_t * spho;
380 spho = (spho_subobj_t *) this->subObj;
382 spho->common = this->common;
385 spho->outBufSize = PICODATA_BUFSIZE_DEFAULT;
388 spho->altDescBuf = picotrns_allocate_alt_desc_buf(spho->common->mm, SPHO_MAX_ALTDESC_SIZE, &spho->maxAltDescLen);
389 if (NULL == spho->altDescBuf) {
390 picotrns_deallocate_alt_desc_buf(spho->common->mm,&spho->altDescBuf);
391 picoos_emRaiseException(spho->common->em,PICO_EXC_OUT_OF_MEM, NULL,NULL);
407 static picoos_int16 shift_range_left_1(spho_subobj_t *spho, picoos_int16 * from, picoos_int16 to)
423 writePos = spho->headxWritePos;
424 c_i = spho->headx[to].cind;
426 c_j = spho->headx[j].cind;
428 c_j = spho->cbufWritePos;
431 c_writePos = spho->cbufWritePos;
444 sphospho->cbuf[c_j++];
448 spho->headx[j].cind -= c_diff;
449 spho->headx[i++] = spho->headx[j++];
451 spho->headxWritePos -= diff;
453 spho->cbufWritePos -= c_diff;
456 "readPos,WritePos are now [%i,%i[, returning shift amount %i",*from, spho->headxWritePos, diff
461 static pico_status_t sphoAddPhoneme(register spho_subobj_t *spho, picoos_int16 pos, picoos_int16 sym) {
465 PICODBG_TRACE(("adding %i/%i (%c on plane %i) at phonBuf[%i]",pos,sym,unshifted,plane,spho->phonWritePos));
466 if (2* PICOTRNS_MAX_NUM_POSSYM <= spho->phonWritePos) {
471 spho->phonBuf[spho->phonWritePos].pos = pos;
472 spho->phonBuf[spho->phonWritePos].sym = sym;
473 spho->phonWritePos++;
478 static pico_status_t sphoAddStartPhoneme(register spho_subobj_t *spho) {
479 return sphoAddPhoneme(spho, PICOTRNS_POS_IGNORE,
480 (PICOKFST_PLANE_INTERN << 8) + spho->fixedIds->phonStartId);
483 static pico_status_t sphoAddTermPhonemes(register spho_subobj_t *spho, picoos_uint16 pos) {
484 return sphoAddPhoneme(spho, pos,
486 && sphoAddPhoneme(spho, PICOTRNS_POS_IGNORE,
487 (PICOKFST_PLANE_INTERN << 8) + spho->fixedIds->phonTermId);
491 static picoos_uint16 sphoGetSylAccent(register spho_subobj_t *spho,
496 spho = spho; /* avoid warning "var not used in this function"*/
500 /* return spho->fixedIds->accId[0]; */
509 /*return (spho->fixedIds->accId[0] == wacc) ? spho->fixedIds->accId[0]
510 : spho->fixedIds->accId[4]; */
524 register spho_subobj_t *spho, picoos_uint16 pos,
547 oldPos = spho->phonWritePos;
549 head = &(spho->headx[pos].head);
550 content = spho->cbuf + spho->headx[pos].cind;
564 rv = sphoAddPhoneme(spho,pos,fstSymbol);
577 rv = sphoAddPhoneme(spho,pos,fstSymbol);
588 curPos = spho->phonWritePos;
592 if (spho->primStressId == content[i]) {
596 } else if (spho->secondStressId == content[i]) {
600 } else if (spho->syllSepId == content[i]) {
602 rv = sphoAddPhoneme(spho, pos, fstSymbol);
604 fstSymbol = sphoGetSylAccent(spho,head->info2,curStress);
608 rv = sphoAddPhoneme(spho,pos,fstSymbol);
619 rv = sphoAddPhoneme(spho,pos,fstSymbol);
627 rv = sphoAddPhoneme(spho,pos,fstSymbol);
628 fstSymbol = sphoGetSylAccent(spho,head->info2,curStress);
631 rv = sphoAddPhoneme(spho,pos,fstSymbol);
636 j=spho->phonWritePos-1;
638 tmpPosSym.pos = spho->phonBuf[i].pos;
639 tmpPosSym.sym = spho->phonBuf[i].sym;
640 spho->phonBuf[i].pos = spho->phonBuf[j].pos;
641 spho->phonBuf[i].sym = spho->phonBuf[j].sym;
642 spho->phonBuf[j].pos = tmpPosSym.pos;
643 spho->phonBuf[j].sym = tmpPosSym.sym;
651 rv = sphoAddPhoneme(spho,pos,fstSymbol);
660 spho->phonWritePos = oldPos;
682 static pico_status_t getNextPosSym(spho_subobj_t * spho, picoos_int16 * pos, picoos_int16 * sym,
685 while ((spho->phonReadPos < spho->phonWritePos) && (PICOTRNS_POS_IGNORE == spho->phonBuf[spho->phonReadPos].pos)) {
686 PICODBG_DEBUG(("ignoring phone at spho->phonBuf[%i] because it has pos==IGNORE",spho->phonReadPos));
687 spho->phonReadPos++;
689 if ((spho->phonReadPos < spho->phonWritePos)) {
690 *pos = spho->phonBuf[spho->phonReadPos].pos;
692 *sym = spho->phonBuf[spho->phonReadPos++].sym;
806 static void putSideBoundToOutput(spho_subobj_t * spho)
816 ohead.info1 = spho->headx[spho->outReadPos].boundstrength;
817 ohead.info2 = spho->headx[spho->outReadPos].phrasetype;
818 sildur = spho->headx[spho->outReadPos].sildur;
832 spho->outBuf, spho->outBufSize, &clen);
834 spho->headx[spho->outReadPos].boundstrength = 0;
841 * and sildur of the current item (spho->headx[spho->outReadPos]) accordingly.
845 * @param spho
850 static void setSideBound(spho_subobj_t * spho, picoos_uint8 orig_strength, picoos_uint8 orig_type, picoos_uint8 fst_strength) {
860 spho->headx[spho->outReadPos].boundstrength = strength;
861 spho->headx[spho->outReadPos].sildur = -1;
862 PICODBG_DEBUG(("setting bound strength to fst-suggested value %c (was %c)",strength, spho->headx[spho->outReadPos].boundstrength, spho->breakTime));
866 if (spho->breakPending) {
870 strength = breakModifiedBoundStrength(strength, spho->breakTime, (PICODATA_ITEMINFO1_BOUND_PHR1 == orig_strength));
871 PICODBG_DEBUG(("setting bound strength to break-imposed value %c (was %c) and time to %i",strength, spho->headx[spho->outReadPos].boundstrength, spho->breakTime));
872 spho->headx[spho->outReadPos].boundstrength = strength;
873 spho->headx[spho->outReadPos].sildur = spho->breakTime;
874 spho->breakPending = FALSE;
876 if (spho->headx[spho->outReadPos].boundstrength) {
886 spho->lastPhraseType = orig_type;
888 if (spho->activeStartPos <= spho->lastPhraseBoundPos) {
894 spho->headx[spho->lastPhraseBoundPos].phrasetype
898 spho->lastPhraseBoundPos = spho->outReadPos;
899 spho->headx[spho->lastPhraseBoundPos].phrasetype
900 = spho->lastPhraseType;
903 spho->headx[spho->outReadPos].phrasetype = PICODATA_ITEMINFO2_NA;
905 spho->lastPhraseType = orig_type;
906 if (spho->activeStartPos <= spho->lastPhraseBoundPos) {
908 spho->headx[spho->lastPhraseBoundPos].phrasetype
909 = spho->lastPhraseType;
926 register spho_subobj_t *spho;
953 spho = (spho_subobj_t *) this->subObj;
960 spho->procState, spho->headxReadPos, spho->headxWritePos));
962 switch (spho->procState) {
970 spho->penultima = SPHO_POS_INVALID;
971 spho->activeEndPos = SPHO_POS_INVALID;
972 spho->headxReadPos = 0;
973 spho->phonReadPos = 0;
974 spho->phonWritePos = 0;
975 spho->lastPhraseType = PICODATA_ITEMINFO2_NA;
976 spho->lastPhraseBoundPos = -1;
978 spho->procState = SPHO_STEPSTATE_COLLECT;
991 remHeadxSize = spho->headxBufSize - spho->headxWritePos;
992 remCbufSize = spho->cbufBufSize - spho->cbufWritePos;
993 curPos = spho->headxWritePos;
995 PICODBG_DEBUG(("COLLECT getting item at headxWritePos %i (remaining %i)",spho->headxWritePos, remHeadxSize));
996 rv = picodata_cbGetItem(this->cbIn, spho->tmpbuf, PICODATA_MAX_ITEMSIZE, &blen);
998 rv = picodata_get_itemparts(spho->tmpbuf,
999 PICODATA_MAX_ITEMSIZE, &(spho->headx[spho->headxWritePos].head),
1000 &(spho->cbuf[spho->cbufWritePos]), remCbufSize, &blen);
1002 spho->headx[spho->headxWritePos].cind = spho->cbufWritePos;
1003 spho->headx[spho->headxWritePos].boundstrength = 0;
1004 spho->headxWritePos++;
1006 spho->cbufWritePos += blen;
1024 if (curPos < spho->headxWritePos) { /* we did get some new items */
1026 spho->headxWritePos - curPos));
1027 spho->needMoreInput = FALSE;
1029 if (spho->needMoreInput) { /* not enough items to proceed */
1033 spho->procState = SPHO_STEPSTATE_PROCESS_PARSE;
1039 if (spho->needMoreInput) { /* forced output because we can't get more data */
1040 spho->needMoreInput = FALSE;
1041 spho->force = TRUE;
1043 spho->procState = SPHO_STEPSTATE_PROCESS_PARSE;
1063 if (spho->headxReadPos >= spho->headxWritePos) {
1065 if (spho->force) {
1069 spho->force = FALSE;
1070 if (SPHO_POS_INVALID == spho->activeEndPos) {
1071 spho->activeEndPos = spho->headxReadPos;
1073 spho->procState = SPHO_STEPSTATE_PROCESS_TRANSDUCE;
1077 spho->needMoreInput = TRUE;
1078 spho->procState = SPHO_STEPSTATE_COLLECT;
1083 ihead = spho->headx[spho->headxReadPos].head;
1084 icontent = spho->cbuf + spho->headx[spho->headxReadPos].cind;
1094 if (spho->sentenceStarted) {
1097 spho->sentenceStarted = 0;
1100 sphoAddTermPhonemes(spho, spho->headxReadPos);
1101 spho->headxReadPos++;
1102 spho->activeEndPos = spho->headxReadPos;
1106 spho->penultima = spho->activeEndPos;
1109 spho->procState = SPHO_STEPSTATE_PROCESS_TRANSDUCE;
1121 spho->outBuf, spho->outBufSize,
1124 spho->headxReadPos++;
1125 spho->activeEndPos = spho->headxReadPos;
1126 spho->penultima = SPHO_POS_INVALID;
1127 spho->feedFollowState = SPHO_STEPSTATE_SHIFT;
1128 spho->procState = SPHO_STEPSTATE_FEED;
1133 spho->headxReadPos++;
1134 spho->activeEndPos = spho->headxReadPos;
1135 spho->penultima = SPHO_POS_INVALID;
1143 sphoAddStartPhoneme(spho);
1145 spho->sentenceStarted = 1;
1153 rv = sphoExtractPhonemes(this, spho, spho->headxReadPos,
1155 &spho->suppressParseWordBound);
1160 if ((spho->activeStartPos <= spho->headxReadPos) && ((PICODATA_ITEM_WORDPHON == ihead.type)
1161 || (SPHO_POS_INVALID == spho->activeEndPos)
1162 || (PICODATA_ITEM_BOUND == spho->headx[spho->activeEndPos].head.type))) {
1164 spho->penultima,spho->activeEndPos,spho->activeEndPos,spho
1165 spho->penultima = spho->activeEndPos;
1166 spho->activeEndPos = spho->headxReadPos;
1173 PICODBG_INFO(("PARSE returned from phoneme extraction with overflow, number of phonemes in phonBuf: %i; forced to TRANSDUCE", spho->phonWritePos));
1174 if ((SPHO_POS_INVALID == spho->activeEndPos) || (spho->activeStartPos == spho->activeEndPos)) {
1175 spho->activeEndPos = spho->headxReadPos;
1177 spho->procState = SPHO_STEPSTATE_PROCESS_TRANSDUCE;
1189 PICODBG_INFO(("PARSE going to next item: %i -> %i",spho->headxReadPos, spho->headxReadPos + 1));
1190 spho->headxReadPos++;
1198 PICODBG_DEBUG(("TRANSDUCE (%i-th of %i fsts",spho->curFst+1, spho->numFsts));
1201 if (spho->curFst >= spho->numFsts) {
1207 PICOTRNS_PRINTSYMSEQ(this->voice->kbArray[PICOKNOW_KBID_DBG], spho->phonBufOut, spho->phonWritePos);
1213 spho->curFst = 0;
1215 spho->outReadPos = 0;
1216 spho->phonReadPos = 0;
1218 spho->procState = SPHO_STEPSTATE_PROCESS_BOUNDS;
1229 PICODBG_INFO_MSG(("spho trying to transduce: "));
1230 PICOTRNS_PRINTSYMSEQ(this->voice->kbArray[PICOKNOW_KBID_DBG], spho->phonBuf, spho->phonWritePos);
1234 rv = picotrns_transduce(spho->fst[spho->curFst], FALSE,
1235 picotrns_printSolution, spho->phonBuf, spho->phonWritePos, spho->phonBufOut,
1236 &spho->phonWritePos,
1237 4*PICOTRNS_MAX_NUM_POSSYM, spho->altDescBuf,
1238 spho->maxAltDescLen, &nrSteps);
1243 PICODBG_INFO_MSG(("result of transduction: (output symbols: %i)", spho->phonWritePos));
1244 PICOTRNS_PRINTSYMSEQ(this->voice->kbArray[PICOKNOW_KBID_DBG], spho->phonBufOut, spho->phonWritePos);
1254 picotrns_eliminate_epsilons(spho->phonBufOut, spho->phonWritePos, spho->phonBuf,
1255 &spho->phonWritePos,4*PICOTRNS_MAX_NUM_POSSYM);
1257 spho->curFst++;
1271 spho->suppressRecombWordBound = FALSE;
1272 while (spho->outReadPos < spho->activeStartPos) {
1274 ihead = spho->headx[spho->outReadPos].head;
1275 /* icontent = spho->cbuf + spho->headx[spho->outReadPos].cind; */
1276 PICODBG_INFO(("in position %i, looking at item %s",spho->outReadPos,picodata_head_to_string(&ihead,msgstr,SPHO_MSGSTR_SIZE)));
1278 spho->suppressRecombWordBound = TRUE;
1280 spho->suppressRecombWordBound = FALSE;
1282 spho->outReadPos++;
1284 /* spho->outReadPos point now to the active region */
1287 spho->phonReadPos = 0;
1288 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho, &pos, &sym,
1289 spho->activeStartPos))) {
1298 while (spho->outReadPos < spho->activeEndPos) {
1301 ihead = spho->headx[spho->outReadPos].head;
1302 icontent = spho->cbuf + spho->headx[spho->outReadPos].cind;
1303 nextInPos = spho->outReadPos + 1;
1305 PICODBG_INFO(("in position %i, looking at item %s",spho->outReadPos,picodata_head_to_string(&ihead,msgstr,SPHO_MSGSTR_SIZE)));
1309 && (!spho->suppressRecombWordBound))) {
1315 spho->suppressRecombWordBound = TRUE;
1323 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1334 setSideBound(spho, orig_strength, orig_type,
1342 if (spho->breakPending) {
1343 spho->breakTime += time;
1345 spho->breakTime = time;
1346 spho->breakPending = TRUE;
1350 if (!spho->breakPending || (spho->breakTime <= 0)) {
1351 spho->breakTime = SPHO_SMALLEST_SIL_DUR;
1352 spho->breakPending = TRUE;
1354 setSideBound(spho, PICODATA_ITEMINFO1_NA,
1357 spho->breakTime = SPHO_SMALLEST_SIL_DUR;
1358 spho->breakPending = TRUE;
1361 if (breakBefore &&(!spho->breakPending || (spho->breakTime <= 0))) {
1362 spho->breakTime = SPHO_SMALLEST_SIL_DUR;
1363 spho->breakPending = TRUE;
1365 setSideBound(spho, PICODATA_ITEMINFO1_NA,
1369 spho->breakTime = SPHO_SMALLEST_SIL_DUR;
1370 spho->breakPending = TRUE;
1373 spho->suppressRecombWordBound = FALSE;
1378 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho, &pos,
1382 spho->outReadPos++;
1386 spho->outReadPos = 0;
1387 spho->phonReadPos = 0;
1388 spho->suppressRecombWordBound = FALSE;
1390 spho->procState = SPHO_STEPSTATE_PROCESS_RECOMB;
1403 spho->feedFollowState = SPHO_STEPSTATE_PROCESS_RECOMB;
1406 if (spho->outReadPos >= spho->activeEndPos) {
1407 PICODBG_DEBUG(("RECOMB reached active region's end at %i",spho->outReadPos));
1408 spho->procState = SPHO_STEPSTATE_SHIFT;
1413 ihead = spho->headx[spho->outReadPos].head;
1414 icontent = spho->cbuf + spho->headx[spho->outReadPos].cind;
1418 nextInPos = spho->outReadPos + 1;
1420 PICODBG_DEBUG(("RECOMB treating item in headx at pos %i",spho->outReadPos));
1421 if (nextInPos <= spho->activeStartPos) { /* we're in the (passive) left context. Just skip it */
1422 PICODBG_DEBUG(("RECOMB skipping item in the left context (%i <= %i)",nextInPos, spho->activeStartPos));
1424 spho->suppressRecombWordBound = 1;
1426 spho->suppressRecombWordBound = 0;
1430 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho,&pos,&sym,nextInPos))) {
1437 spho->outReadPos = nextInPos;
1439 if (spho->headx[spho->outReadPos].boundstrength) {
1442 putSideBoundToOutput(spho);
1444 spho->headx[spho->outReadPos].boundstrength = 0;
1446 spho->procState = SPHO_STEPSTATE_FEED;
1451 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1462 spho->suppressRecombWordBound = TRUE; /* if word following, don't need word boundary */
1464 spho->outReadPos = nextInPos;
1468 spho->wordStarted = TRUE;
1470 if (spho->suppressRecombWordBound) {
1472 spho->suppressRecombWordBound = FALSE;
1475 rv = getNextPosSym(spho, &pos, &sym, nextInPos);
1482 spho->procState = SPHO_STEPSTATE_PROCESS_SYL;
1486 PICODBG_DEBUG(("RECOMB consuming item from inBuf %i -> %i",spho->outReadPos, nextInPos));
1487 spho->outReadPos = nextInPos;
1493 spho->outBuf, spho->outBufSize, &clen);
1494 PICODBG_DEBUG(("RECOMB consuming item from inBuf %i -> %i",spho->outReadPos, nextInPos));
1495 spho->outReadPos = nextInPos;
1497 spho->procState = SPHO_STEPSTATE_FEED;
1510 /* consume all transduced phonemes with pos in in the range [spho->outReadPos,nextInPos[ */
1513 spho->feedFollowState = SPHO_STEPSTATE_PROCESS_SYL;
1516 ihead = spho->headx[spho->outReadPos].head;
1517 icontent = spho->cbuf + spho->headx[spho->outReadPos].cind;
1518 nextInPos = spho->outReadPos + 1;
1519 PICODBG_DEBUG(("SYL (1) treating item in headx at pos %i",spho->outReadPos));
1523 PICODBG_TRACE(("SYL expects accent at phonBuf[%i] = (%i,%i) (outReadPos=%i)", spho->phonReadPos, spho->phonBuf[spho->phonReadPos].pos, spho->phonBuf[spho->phonReadPos].sym,spho->outReadPos));
1524 rv = getNextPosSym(spho,&pos,&sym,nextInPos);
1535 PICODBG_DEBUG(("SYL (2) treating item in inBuf range [%i,%i[",spho->outReadPos,nextInPos));
1536 rv = getNextPosSym(spho,&pos,&sym,nextInPos);
1541 if (spho->wordStarted) {
1542 spho->wordStarted = FALSE;
1552 PICODBG_DEBUG(("SYL (3) treating item in inBuf range [%i,%i[",spho->outReadPos,nextInPos));
1555 + spho->syllSepId;
1557 spho->sylWritePos = 0;
1558 while (SPHO_POSSYM_OK == (rv = getNextPosSym(spho,&pos,&sym,nextInPos)) && (sym != sylsym)) {
1559 spho->sylBuf[spho->sylWritePos++] = picotrns_unplane(sym, &plane);
1564 PICODBG_DEBUG(("SYL (4) treating item in inBuf range [%i,%i[",spho->outReadPos,nextInPos));
1565 ohead.len = spho->sylWritePos;
1571 spho->outReadPos = nextInPos; /* advance to next item */
1572 spho->feedFollowState = SPHO_STEPSTATE_PROCESS_RECOMB; /* go to RECOMB after feed */
1576 PICODBG_DEBUG(("SYL (5) treating item in inBuf range [%i,%i[",spho->outReadPos,nextInPos));
1580 picodata_put_itemparts(&ohead, spho->sylBuf,
1581 PICODATA_BUFSIZE_DEFAULT, spho->outBuf,
1582 spho->outBufSize, &clen);
1584 spho->procState = SPHO_STEPSTATE_FEED;
1586 spho->procState = spho->feedFollowState;
1600 rv = picodata_cbPutItem(this->cbOut, spho->outBuf,
1601 spho->outBufSize, &clen);
1604 (picoos_uint8 *)"spho: ",
1605 spho->outBuf, spho->outBufSize);
1613 spho->procState = spho->feedFollowState;
1614 PICODBG_DEBUG(("FEED ok, going back to procState %i", spho->procState));
1618 spho->procState = spho->feedFollowState;
1635 if (spho->penultima != SPHO_POS_INVALID) {
1640 spho->penultima));
1641 shift = shift_range_left_1(spho, &spho->penultima, 0);
1646 spho->activeStartPos = spho->activeEndPos
1648 spho->lastPhraseBoundPos -= shift;
1649 spho->suppressParseWordBound = FALSE;
1650 spho->suppressRecombWordBound = FALSE;
1655 if (spho->activeStartPos == spho->activeEndPos) {
1657 spho->activeStartPos = 0;
1659 lastPhraseBoundActive = (spho->lastPhraseBoundPos >= spho->activeStartPos);
1662 spho->activeEndPos, spho->activeStartPos));
1663 shift = shift_range_left_1(spho, &spho->activeEndPos, spho->activeStartPos);
1669 spho->lastPhraseBoundPos -= shift;
1673 spho->procState = SPHO_STEPSTATE_INIT;
1681 } /* switch (spho->procState) */