source: src/Parser/lex.h @ 4aa0858

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 4aa0858 was 5f2f2d7, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

fix constant types, remove unnecessary string copying, work on regression testing, fix several memory leaks

  • Property mode set to 100644
File size: 1.0 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// lex.h --
8//
9// Author           : Peter A. Buhr
10// Created On       : Sat Sep 22 08:58:10 2001
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Mon Jun  8 20:28:48 2015
13// Update Count     : 341
14//
15
16#ifndef PARSER_LEX_H
17#define PARSER_LEX_H
18
19int yylex();
20void yyerror( const char * );
21
22// External declarations for information sharing between lexer and scanner
23#include "TypedefTable.h"
24extern TypedefTable typedefTable;
25
26// current location in the input
27extern int yylineno;
28extern char *yyfilename;
29
30struct Location {
31    char *file;
32    int line;
33};
34
35class Token {
36  public:
37    std::string *str;                                                                   // must be pointer as used in union
38    Location loc;
39
40    operator std::string *() { return str; }
41};
42
43#endif // PARSER_LEX_H
44
45// Local Variables: //
46// tab-width: 4 //
47// mode: c++ //
48// compile-command: "make install" //
49// End: //
Note: See TracBrowser for help on using the repository browser.