~ubuntu-branches/ubuntu/trusty/styx/trusty

« back to all changes in this revision

Viewing changes to libbase/prs.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederik Schüler
  • Date: 2007-07-01 23:06:53 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070701230653-8tcr3ow0d49alwj2
Tags: 1.7.5-1
* New upstream version.
* Bump standard to 2.7.2, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
      CFG_COM(Pdf->Tab->Kfg->TokKind[cTok])     ) return( PLR_SHIFT_NONE );
226
226
  if( PLR_MSHIFT[cState] == PLR_SHIFT_ERROR )     return( PLR_SHIFT_ERROR );
227
227
  for( i = PLR_MSHIFT[cState], j = i-1; 
228
 
       PLR_DSHIFT[i] >= 0 && i < PLR_DSHIFTCNT; ++i, --j )
 
228
       i < PLR_DSHIFTCNT && PLR_DSHIFT[i] >= 0; ++i, --j )
229
229
    if( PLR_DSHIFT[i] == cTok ) return( ABS(PLR_DSHIFT[j]) - 1 );
230
230
  return( PLR_SHIFT_ERROR );
231
231
}
240
240
        e_first = PLR_ACTE[i], 
241
241
        act     = PLR_ACT_ERROR, e_entry;
242
242
 
243
 
    for( ; EQSIGN(e_first,PLR_ACTE[i]) && i < PLR_ACTECNT; ++i )
 
243
    for( ; i < PLR_ACTECNT && EQSIGN(e_first,PLR_ACTE[i]); ++i )
244
244
    {
245
245
      if( ( e_entry = ABS(PLR_ACTE[i]) ) > PLR_PROD_OFFSET )
246
246
        act = e_entry - PLR_PROD_OFFSET;
824
824
  return( PLR_T_IMP(PTab)->Kfg->language );
825
825
}
826
826
 
 
827
int PLR_conflictCnt(PLR_Tab PTab)
 
828
/* number of conflicts of parse table 'PTab';
 
829
   available only after construction
 
830
*/
 
831
{
 
832
  BUG_NULL(PTab);
 
833
  return( PLR_T_IMP(PTab)->Conflicts );
 
834
}
 
835
 
827
836
int PLR_tokenCnt(PLR_Tab PTab)
828
837
/* number of tokens of parse table 'PTab' */
829
838
{
1118
1127
      i       = ABS(entry);
1119
1128
      e_first = actexp[i];
1120
1129
      action  = -2;
1121
 
      for( ; EQSIGN(e_first,actexp[i]) && i < cnt_actexp; ++i )
 
1130
      for( ; i < cnt_actexp && EQSIGN(e_first,actexp[i]); ++i )
1122
1131
      {
1123
1132
        if( ( e_entry = ABS(actexp[i]) ) > prodoffset )
1124
1133
        {