source:
src/Parser/ParserTypes.h
@
994d080
Last change on this file since 994d080 was 44f44617, checked in by , 8 years ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[b87a5ed] | 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 | // | |
[9335ecc] | 7 | // parser.hh -- |
[b87a5ed] | 8 | // |
9 | // Author : Peter A. Buhr | |
10 | // Created On : Sat Sep 22 08:58:10 2001 | |
11 | // Last Modified By : Peter A. Buhr | |
[9335ecc] | 12 | // Last Modified On : Wed Jun 28 22:10:17 2017 |
13 | // Update Count : 349 | |
[b87a5ed] | 14 | // |
[51b73452] | 15 | |
[9335ecc] | 16 | #ifndef PARSER_HH |
17 | #define PARSER_HH | |
[51b73452] | 18 | |
19 | int yylex(); | |
[5f2f2d7] | 20 | void yyerror( const char * ); |
[51b73452] | 21 | |
[984dce6] | 22 | #include <string> |
23 | #include "ParseNode.h" | |
[b87a5ed] | 24 | // External declarations for information sharing between lexer and scanner |
[984dce6] | 25 | class TypedefTable; |
[51b73452] | 26 | extern TypedefTable typedefTable; |
27 | ||
[b87a5ed] | 28 | // current location in the input |
[51b73452] | 29 | extern int yylineno; |
30 | extern char *yyfilename; | |
31 | ||
[b87a5ed] | 32 | struct Location { |
33 | char *file; | |
34 | int line; | |
[ab57786] | 35 | }; // Location |
[51b73452] | 36 | |
[ab57786] | 37 | struct Token { |
[5f2f2d7] | 38 | std::string *str; // must be pointer as used in union |
[b87a5ed] | 39 | Location loc; |
[51b73452] | 40 | |
[b87a5ed] | 41 | operator std::string *() { return str; } |
[ab57786] | 42 | }; // Token |
[51b73452] | 43 | |
[9335ecc] | 44 | #endif // PARSER_HH |
[b87a5ed] | 45 | |
46 | // Local Variables: // | |
47 | // tab-width: 4 // | |
48 | // mode: c++ // | |
49 | // compile-command: "make install" // | |
50 | // End: // |
Note: See TracBrowser
for help on using the repository browser.