ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since eaace25 was
7d4f6ed,
checked in by Peter A. Buhr <pabuhr@…>, 7 years ago
|
remainder of pretty printer
|
-
Property mode set to
100644
|
File size:
1.2 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 | // token.h -- |
---|
8 | // |
---|
9 | // Author : Peter A. Buhr |
---|
10 | // Created On : Wed Jun 28 22:47:58 2017 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Wed Jun 28 23:02:06 2017 |
---|
13 | // Update Count : 5 |
---|
14 | // |
---|
15 | |
---|
16 | #ifndef __TOKEN_H__ |
---|
17 | #define __TOKEN_H__ |
---|
18 | |
---|
19 | struct Token { |
---|
20 | std::string text; // text of terminal or non-terminal token |
---|
21 | int kind; // kind of terminal or non-terminal token |
---|
22 | std::list<std::string> ws_list; // list of whitespace and comments before terminal token |
---|
23 | Token *left, *down; // binary parse tree links |
---|
24 | |
---|
25 | Token( const std::string &, int ); |
---|
26 | Token( const std::string &, std::list<std::string> &, int ); |
---|
27 | void addLeftTail( Token * ); |
---|
28 | void addDownLeftTail( Token * ); |
---|
29 | bool isTerminal(); |
---|
30 | int getKind() const; |
---|
31 | std::string getText() const; |
---|
32 | std::string getWS(); |
---|
33 | bool isComment(); |
---|
34 | std::string getComment(); |
---|
35 | }; |
---|
36 | |
---|
37 | #endif // __TOKEN_H__ |
---|
38 | |
---|
39 | // Local Variables: // |
---|
40 | // tab-width: 4 // |
---|
41 | // mode: c++ // |
---|
42 | // compile-command: "make install" // |
---|
43 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.