source: translator/Parser/lex.h @ 51b7345

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 51b7345 was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 732 bytes
Line 
1/*
2 * This file is part of the Cforall project
3 *
4 * $Id: lex.h,v 1.2 2003/11/07 19:45:31 rcbilson Exp $
5 *
6 * Prototypes that enable Roskind's c5.y to compile with g++
7 * Richard Bilson       5 Jan 2001
8 *
9 */
10
11#ifndef PARSER_LEX_H
12#define PARSER_LEX_H
13
14int yylex();
15void yyerror(char *);
16extern "C" {
17#include <malloc.h>
18}
19
20/* External declarations for information sharing between lexer and scanner */
21#include "TypedefTable.h"
22extern TypedefTable typedefTable;
23
24/* current location in the input */
25extern int yylineno;
26extern char *yyfilename;
27
28struct Location
29{
30  char *file;
31  int line;
32};
33
34class Token
35{
36public:
37  std::string *str;
38  Location loc;
39
40  operator std::string *() { return str; }
41};
42
43#endif // ifndef PARSER_LEX_H
Note: See TracBrowser for help on using the repository browser.