File: error.h

package info (click to toggle)
libsmi 0.1.7-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 10,364 kB
  • ctags: 2,173
  • sloc: ansic: 10,484; sh: 7,338; yacc: 6,150; lex: 1,524; makefile: 162
file content (40 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * error.h --
 *
 *      Definitions for error handling.
 *
 * Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
 *
 * See the file "COPYING" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * @(#) $Id: error.h,v 1.14 1999/06/17 16:56:55 strauss Exp $
 */

#ifndef _ERROR_H
#define _ERROR_H

#include "scanner-smi.h"
#include "parser-smi.h"

#include "errormacros.h" /* list of error macros generated from error.c */



#ifdef yyerror
#undef yyerror
#endif
#define yyerror(msg) printError(parserPtr, ERR_OTHER_ERROR, msg)


extern int line;			 /* Current line in source file.     */
extern int column;			 /* Current column in current line.  */
extern int character;			 /* Current absolute byte position.  */

extern int errorLevel;                   /* Higher level for more warnings   */

extern void printError(Parser *parserPtr, int id, ...);

extern void printErrorAtLine(Parser *parserPtr, int id, int line, ...);

#endif /* _ERROR_H */