/* * This file is part of the Cforall project * * $Id: lex.h,v 1.2 2003/11/07 19:45:31 rcbilson Exp $ * * Prototypes that enable Roskind's c5.y to compile with g++ * Richard Bilson 5 Jan 2001 * */ #ifndef PARSER_LEX_H #define PARSER_LEX_H int yylex(); void yyerror(char *); extern "C" { #include } /* External declarations for information sharing between lexer and scanner */ #include "TypedefTable.h" extern TypedefTable typedefTable; /* current location in the input */ extern int yylineno; extern char *yyfilename; struct Location { char *file; int line; }; class Token { public: std::string *str; Location loc; operator std::string *() { return str; } }; #endif // ifndef PARSER_LEX_H