source: translator/Parser/lex.h@ c8ffe20b

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new string with_gc
Last change on this file since c8ffe20b was 51b73452, checked in by Peter A. Buhr <pabuhr@…>, 11 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.