/*************************************************************************************************
** Project:     FSMGenerator
** Package:     FSMGenerator
** Module:      FSMGenerator::scanner
** File:        scanner.h
** Date:        2002.08.01
** Author:      Pavel Bekkerman (chpavel@tx.technion.ac.il)
** Copyright:   Copyright (C) 2002 Pavel Bekkerman
** License:
**              This program is free software; you can redistribute it and/or
**              modify it under the terms of the GNU General Public License as
**              published by the Free Software Foundation; either version 2 of
**              the License, or (at your option) any later version.
**
**              This program is distributed in the hope that it will be useful,
**              but WITHOUT ANY WARRANTY; without even the implied warranty of
**              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**              GNU General Public License for more details.
**
**              You should have received a copy of the GNU General Public License
**              along with this program; if not, write to the Free Software
**              Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
**
** Contact:     Pavel Bekkerman (chpavel@tx.technion.ac.il)
*************************************************************************************************/

#ifndef _SCANNER_H
#define _SCANNER_H

#ifndef ERROR_EOF
#define ERROR_EOF	0
#endif //ERROR_EOF

#ifndef ERROR_SUCCESS
#define ERROR_SUCCESS	1
#endif //ERROR_SUCCESS

#ifndef ERROR_FAILURE
#define ERROR_FAILURE	2
#endif //ERROR_FAILURE

typedef struct
{
        int     id;     // token id
        char    *text;  // token text
	int 	line;	// token line
} YYSTYPE;

extern YYSTYPE yylval;

extern int yylex( void );

#define TOKEN_SECTION_BEGIN		1000
#define TOKEN_SECTION			1001
#define TOKEN_SECTION_END		1002
#define TOKEN_SEMICOLLON		1003
#define TOKEN_DOT			1004
#define TOKEN_COLLON			1005
#define TOKEN_COMMA			1006
#define TOKEN_ARROW			1007
#define TOKEN_SECTION_NAME		1008
#define TOKEN_DIGIT			1009
#define TOKEN_SYMBOL			1010
#define TOKEN_STRING			1011
#define TOKEN_COMMENT			1012
#define TOKEN_NAME			1013

#endif //_SCANNER_H
