# 2.11BSD#431 - /usr/ingres/source/parser/yyerror.y

##### Functions

    _neederr          X
    _yyerror          X

##### Variables

    _Messages         X

       1: /*
       2: ** This is the QUEL syntax-error diagnostic routine.   Yyerror()  is
       3: **	called whenever the parser is unable to recognize the syntax of a
       4: **	user query, or the scanner discovers a lexical error.
       5: **	It returns via reset();
       6: */
       7:
       8: /*
       9: ** The vector following is used to map error numbers for
      10: **	incomplete commands.  The partial command is identified
      11: **	by 'Opflag' and is used to index the vector.  The contents
      12: **	of the vector location is the error number.  The 0 entries
      13: **	are for those command which can never be incomplete without
      14: **	generating a syntax error from the yacc parser.  In other
      15: **	words, they should never happen.
      16: */
      17: int Messages[] =
      18: {
      19:     0,      /* mdRETTERM */
      20:     2502,       /* mdRETR */
      21:     2503,       /* mdAPP */
      22:     2504,       /* mdREPL */
      23:     2505,       /* mdDEL */
      24:     0,      /* mdCOPY */
      25:     0,      /* mdCREATE */
      26:     2506,       /* mdDESTROY */
      27:     2507,       /* mdHELP */
      28:     0,      /* mdINDEX */
      29:     2508,       /* mdMODIFY */
      30:     2509,       /* mdPRINT */
      31:     0,      /* mdRANGE */
      32:     0,      /* mdSAVE */
      33:     0,      /* mdDEFINE, not user specifiable */
      34:     2510,       /* mdRET_UNI */
      35:     2511,       /* mdVIEW */
      36:     0,      /* mdUPDATE, not user specifiable */
      37:     0,      /* mdRESETREL, not user specifiable */
      38:     2512,       /* mdDISPLAY, help view, help integrity, help permit */
      39:     0,      /* mdNETQRY, reserved for distr ingres */
      40:     0,      /* mdMOVEREL, reserved for distr ingres */
      41:     2513,       /* mdPROT */
      42:     2514,       /* mdINTEG */
      43:     0,      /* mdDCREATE, reserved for distr ingres */
      44:     0,      /* mdWAITQRY, reserved for distr ingres */
      45:     2515        /* mdREMQM, destroy permit, destroy integrity */
      46: };
      47:
      48: yyerror(num, a, b, c)
      49: int num;
      50: char    *a, *b, *c;
      51: {
      52:     char        buff[30];
      53:     register char   *buf;
      54:
      55:     buf = buff;
      56:     if (num == SYMERR || num == NXTCMDERR)
      57:     {
      58:         /* syntax error */
      59:         a = buf;
      60:         b = 0;
      61:         switch (Lastok.toktyp)
      62:         {
      63:           case I2CONST:
      64:             itoa(i2deref(Lastok.tok), buf);
      65:             break;
      66:
      67:           case I4CONST:
      68:             smove(locv(i4deref(Lastok.tok)), buf);
      69:             break;
      70:
      71:           case F4CONST:
      72:             ftoa(f4deref(Lastok.tok), buf, 10, 3, 'n');
      73:             break;
      74:
      75:           case F8CONST:
      76:             ftoa(f8deref(Lastok.tok), buf, 10, 3, 'n');
      77:             break;
      78:
      79:           case SCONST:
      80:             smove(Lastok.tok, buf);
      81:             break;
      82:
      83:           case 0:
      84:             a = "EOF";
      85:             break;
      86:
      87:           default:
      88:             syserr("bad Lastok format");
      89:         }
      90:     }
      91: #	ifdef xPTR3
      92:     tTfp(13, 0, "yyerror: %d\n", num);
      93: #	endif
      94:     if (num == NXTCMDERR)
      95:     {
      96:         num = Messages[Opflag];
      97:         b = 0;
      98:     }
      99:     error(num, iocv(yyline), a, b, c, 0);
     100:
     101:     /* clean up and sync with monitor */
     102:     endgo();
     103:
     104:     /* execute non-local goto */
     105:     reset();
     106: }
     107: int
     108: neederr(errnum)
     109: int errnum;
     110: {
     111:     yyerror(errnum, 0);
     112: }

#### Defined functions

_neederr defined in line 107; used 4 times

- in /usr/ingres/source/parser/call_p.c line 54-57(2)
- in /usr/ingres/source/parser/control.c line 45-48(2)

_yyerror defined in line 48; used 40 times

- in line 111
- in /usr/ingres/source/parser/attfcn.c line 80, 162
- in /usr/ingres/source/parser/control.c line 92-97(2)
- in /usr/ingres/source/parser/format.c line 50, 70, 139, 207, 214, 239, 252, 276, 288, 308
- in /usr/ingres/source/parser/master.grammar line 101, 211, 224, 336, 390, 410, 425, 434, 445, 483, 588, 710, 719, 745, 753, 761, 798
- in /usr/ingres/source/parser/p_util.c line 103-106(2), 112
- in /usr/ingres/source/parser/rngfcn.c line 275
- in /usr/ingres/source/parser/tree.c line 67, 262, 282-286(2)

#### Defined variables

_Messages defined in line 17; used 1 times

- in line 96

#### Usage of this include

yyerror.y used 1 times

- in /usr/ingres/source/parser/master.grammar line 890

Last modified: 1995-02-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 949 |