Changeset b87a5ed for translator/Parser/Parser.h
- Timestamp:
- May 16, 2015, 3:36:19 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- a32b204
- Parents:
- b8508a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/Parser.h
rb8508a2 rb87a5ed 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 */ 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 // Parser.h -- 8 // 9 // Author : Rodolfo G. Esteves 10 // Created On : Sat May 16 14:56:50 2015 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 16 14:58:56 2015 13 // Update Count : 2 14 // 9 15 10 16 #ifndef PARSER_H … … 16 22 #include "LinkageSpec.h" 17 23 18 class Parser 19 { 20 public: 21 static Parser &get_parser(); 24 class Parser { 25 public: 26 static Parser &get_parser(); 22 27 23 /* do the actual parse */ 24 28 // do the actual parse 29 void parse( FILE *input ); 25 30 26 /* accessors to return the result of the parse */ 27 28 31 // accessors to return the result of the parse 32 DeclarationNode *get_parseTree() const { return parseTree; } 33 int get_parseStatus() const { return parseStatus; } 29 34 30 /* mutators to control parse options */ 31 32 35 // mutators to control parse options 36 void set_debug( bool debug ); 37 void set_linkage( LinkageSpec::Type linkage ); 33 38 34 /* free the parse tree without actually destroying the parser */ 35 39 // free the parse tree without actually destroying the parser 40 void freeTree(); 36 41 37 ~Parser(); 38 39 private: 40 Parser(); 41 static Parser *theParser; 42 DeclarationNode *parseTree; 43 int parseStatus; 42 ~Parser(); 43 private: 44 Parser(); 45 static Parser *theParser; 46 DeclarationNode *parseTree; 47 int parseStatus; 44 48 }; 45 49 46 #endif /* #ifndef PARSER_H */ 50 #endif // PARSER_H 51 52 // Local Variables: // 53 // tab-width: 4 // 54 // mode: c++ // 55 // compile-command: "make install" // 56 // End: //
Note: See TracChangeset
for help on using the changeset viewer.