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 c8ffe20b was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
932 bytes
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of the Cforall project |
---|
3 | * |
---|
4 | * A singleton class to encapsulate the bison-generated parser |
---|
5 | * |
---|
6 | * $Id: Parser.h,v 1.4 2002/09/09 16:47:14 rcbilson Exp $ |
---|
7 | * |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef PARSER_H |
---|
11 | #define PARSER_H |
---|
12 | |
---|
13 | #include <cstdio> |
---|
14 | |
---|
15 | #include "Parser/ParseNode.h" |
---|
16 | #include "LinkageSpec.h" |
---|
17 | |
---|
18 | class Parser |
---|
19 | { |
---|
20 | public: |
---|
21 | static Parser &get_parser(); |
---|
22 | |
---|
23 | /* do the actual parse */ |
---|
24 | void parse( FILE *input ); |
---|
25 | |
---|
26 | /* accessors to return the result of the parse */ |
---|
27 | DeclarationNode *get_parseTree() const { return parseTree; } |
---|
28 | int get_parseStatus() const { return parseStatus; } |
---|
29 | |
---|
30 | /* mutators to control parse options */ |
---|
31 | void set_debug( bool debug ); |
---|
32 | void set_linkage( LinkageSpec::Type linkage ); |
---|
33 | |
---|
34 | /* free the parse tree without actually destroying the parser */ |
---|
35 | void freeTree(); |
---|
36 | |
---|
37 | ~Parser(); |
---|
38 | |
---|
39 | private: |
---|
40 | Parser(); |
---|
41 | static Parser *theParser; |
---|
42 | DeclarationNode *parseTree; |
---|
43 | int parseStatus; |
---|
44 | }; |
---|
45 | |
---|
46 | #endif /* #ifndef PARSER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.